Debugging pre build kernel without building a module

Sysprogs forums Forums VisualKernel Debugging pre build kernel without building a module

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34151
    MST
    Participant

    Hi,

    is there a way to debug a pre build kernel using a project without building any module (maybe except the helper module)? I know the option to use “Quick debug Linux kernel” but then I’m missing the option to dive into the kernel symbol file in  the solution explorer that I have when debugging a kernel module.

    greets,
    MST

    #34162
    support
    Keymaster

    Hi,

    VisualKernel manages the kernel symbols via Kernel Releases – special read-only projects that include all necessary files, IntelliSense index, etc.

    Normally, if you select the kernel release via Quick Debug Linux Kernel -> Kernel Symbols for Debugging, it will suggest adding the kernel release project to Solution Explorer first time you stop at some code within the kernel itself.

    You can also add the .vkrnlrelease file directly to Solution Explorer by selecting Add->Existing Project and then pointing VisualKernel to the .vkrnlrelease file (see any of the module .sln files for the exact path).

    #34166
    MST
    Participant

    Hi,
    I tried your advice but unfortunately I am not successful.
    Let me explain: My setup for this is a “three machine setup” so I am using a linuxVM to debug. The connection via quick debug works and I reach the breakpoint in “kgdb_breakpoint”. So in principle debugging works.  As you see in the attached KernelSymbols.png the kernel symbols are cached on the VM. I get the message, that the “selected symbols match the running kernel”. But how can I access the source code that is connected to my actual debug run? In visual studio there is only “debug_core.c” open and when I see that I is cached on my windows PC from the VM. But it is the only source file in the cache directory (see CacheDirectory.png)! How can I cache the rest of the source code? Or is there another option? Can I copy it manually or will visual kernel not recognize it?

    On your second remark: I tried adding and existing project but the dialog won’t show me .vkrnlrelease files (see ProjectChoices.png). How can I add them?

    greets,
    MST

    Attachments:
    You must be logged in to view attached files.
    #34182
    support
    Keymaster

    No problem, we have rechecked the Kernel Release workflow with the 3-machine setups, and indeed it was somewhat confusing. You can still add the .vkrnlrelease files to Solution Explorer by copying the full path to the Open File dialog, but it wasn’t suggesting the .vkrnlrelease extension automatically.

    Please try this build: VisualKernel-4.0.101.2361.msi. It will now show the .vkrnlrelease files in the Add->Existing Project dialog, and will also point to the files inside the kernel release when stopped in a debugger, as long as the kernel release project is added to the solution.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.