Staffan Gustafsson
Staffan Gustafsson

Reputation: 354

What does 'Stop Debugging' do programmatically in windbg?

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.

Upvotes: 3

Views: 120

Answers (1)

Staffan Gustafsson
Staffan Gustafsson

Reputation: 354

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

Upvotes: 1

Related Questions