Debugging shared segment

I create a shared segment using a DLL and I am wondering why I cannot see the variables in Visual Studio 2005 debugger. Notice that I map the shared memory to a structure.

Here is an example:

1st DLL Code in C
================================================================

#define SEG0SIZE 200000

#pragma data_seg(".FUN")
__declspec (dllexport) char test0[SEG0SIZE] = {""};
#pragma data_seg()
#pragma comment(linker, "-section:.FUN,rws")

2nd DLL Code in C++
================================================================
extern "C" __declspec(dllimport)
struct abc_test {
unsigned char dummy1[16];
unsigned char val1;
unsigned char dummy2[16];
unsigned char val2;
} test0;

================================================================

I cannot see the value of test0.val1 or even the address of test0.

Even when I bring in just test0, I cannot see the address.

extern "C"
{
__declspec (dllimport) char test0[200000];
}

Was this changed for security?

Why have you done that?
It is actually legacy code that I am running a shared memory as a database for a simulation.
The short answer, I don't know.

But you might be able to see the values in a Memory window.
Topic archived. No new replies allowed.