April 24, 2023 at 02:06 #34151MSTParticipant
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.
MSTApril 24, 2023 at 11:57 #34162supportKeymaster
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).April 26, 2023 at 07:53 #34166MSTParticipant
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?
Attachments:You must be logged in to view attached files.April 30, 2023 at 15:42 #34182supportKeymaster
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-22.214.171.1241.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.
- You must be logged in to reply to this topic.