tags:

views:

403

answers:

1

I've got a couple of programs that communicate using a named memory section. Is there any way that I can view the contents of this shared memory section from WinDBG, either in user mode or kernel mode? I don't have a pointer to it, but I do know the name.

A: 

Using a user-mode debugger... would it be possible for you to write a very simple test app that acquires access to the named memory section (i.e. calls OpenFileMapping then MapViewOfFile), and then run that app under a debugger? You should be able to step past the calls to get access to the section, and then inspect that app's view of the section.

(In case it helps, the "Second Process" heading on this MSDN page provides sample code for a process to access a named, shared memory section and map it into its address space.)

I'm generally a fan of writing small test tools to help out debugging things like this... If you want to make things easier, you can even write the test tool to automatically break into any attached debuggers (using a function like DebugBreak).

Reuben