I am working on a kernel mode driver. When the driver is not running, I can set a break point using bu xxxxx!driverentry etc. and this seems to work fine. However if I connect windbg after the driver is running and attempt to set breakpoints within the source code it says the module is not loaded and will not set the break point. If I try bu xxxx!routinename it says it has set the breakpoint, however it never hits it even though I know the routine is called. I have an application running which talks to the driver and changes lights, so I know it is running. I have tried loading symbols with the ld command, but it always reply’s that the module is not loaded. This seems a rather simple and fundamental problem, but I have not worked with windbg much. Can anyone assist me?
When you connect WinDbg after the driver is loaded, you need to type “.reload” to get it to scan for loaded modules and load the symbols.
While slightly off topic, you may want to use the extension “!itoldyouso ”. I have no idea about the history/naming of this extension, but it is incredibly useful.
As Kosta already mentioned, I would first see if your symbols match
your driver’s binary (‘!chksym’ or ‘!itoldyouso’ - same thing). They
most likely do not. In such case turn on verbose symbols loading logs
with ‘!sym noisy’ and then force load your symbols for your driver
with ‘.reload /f <your_driver.sys>’. If symbols are still not loaded
(you should get a list of places where debugger attempts to load
matching PDB), check if your symbols path is correct (see ‘.sympath’).
Hope it helps.
Kris
On Wed, Jan 9, 2013 at 12:52 AM, wrote:
> I am working on a kernel mode driver. When the driver is not running, I can set a break point using bu xxxxx!driverentry etc. and this seems to work fine. However if I connect windbg after the driver is running and attempt to set breakpoints within the source code it says the module is not loaded and will not set the break point. If I try bu xxxx!routinename it says it has set the breakpoint, however it never hits it even though I know the routine is called. I have an application running which talks to the driver and changes lights, so I know it is running. I have tried loading symbols with the ld command, but it always reply’s that the module is not loaded. This seems a rather simple and fundamental problem, but I have not worked with windbg much. Can anyone assist me?
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
–
Kris</your_driver.sys>
Thanks for the help. .reload /f xxxx.sys seems to do the trick. I thought I had tried that before, but I must have gotten something wrong.