Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 'Stop Debugging' do programmatically in windbg?

Tags:

windbg

dbgeng

I try to replicate the cleanup that is done by windbg after opening a dump, analyzing it and then 'Stop Debugging'.

When I try to do this in my own program, I leak a lot of memory. I release the com interfaces I have addref:ed and I call SymCleanup, but that does not unmap loaded images or release memory allocated by dbgeng.

The samples provided in the DDK does not seem to provide any more info here. Any secret sauce here?

What I would like is a sample demonstrating open and closing dump files including loading the corresponding images and symbols, without leaking resources.

like image 825
Staffan Gustafsson Avatar asked Feb 01 '26 06:02

Staffan Gustafsson


1 Answers

IDebugClient::EndSession(DEBUG_END_PASSIVE) as @blabb suggested solved the problem.

like image 155
Staffan Gustafsson Avatar answered Feb 03 '26 10:02

Staffan Gustafsson