Debugger issue - VC++ v6

A

A C

Hi
Can someone explain why the following is happening.

ProjectA <-- depends on B, C, ....
ProjectB
ProjectC... etc

Project B contains b.cpp and b.h. Also has conditional compiler directive
which is NOT present in ProjectA
ProjectA includes b.h

b.h defines a struct which uses the conditional compile directive to
determine whether to include a new item.
eg typedef struct {
double b1,
#ifdef MY_B_DIRECTIVE
bnew,
#endif MY_B_DIRECTIVE
b2;} b_struct_t;

If we run the project and stop at the near the beginning of b.cpp and look
at an object that contains members of type b_struct_t (or has children
objects which contain members....) the debugger does not display correctly.
The code itself is working fine, correct values in the right place, but the
debugger does not display them correctly. I think it is getting the member
vars before the b_struct_t variables (well the child object thata contains
it anyway) correct, but not after.

If we include MY_B_DIRECTIVE in ProjectA it works fine.

Is ProjectA setting the object sizes etc for the debugger? Or something
else? Is there are way around this? as we are not meant to be setting
ProjectA
directives.

regards
A
 
M

Mike Wahler

A C said:
Hi
Can someone explain why the following is happening.

ProjectA <-- depends on B, C, ....
ProjectB
ProjectC... etc

Project B contains b.cpp and b.h. Also has conditional compiler directive
which is NOT present in ProjectA
ProjectA includes b.h

b.h defines a struct which uses the conditional compile directive to
determine whether to include a new item.
eg typedef struct {
double b1,
#ifdef MY_B_DIRECTIVE
bnew,
#endif MY_B_DIRECTIVE
b2;} b_struct_t;

If we run the project and stop at the near the beginning of b.cpp and look
at an object that contains members of type b_struct_t (or has children
objects which contain members....) the debugger does not display
correctly.

Debuggers are not topical here. Only the standard C++ language.
See: http://www.slack.net/~shiva/welcome.txt

Ask about the VC++ debugger at newsgroup:
microsoft.public.vc.debugger

If your news server doesn't have this group, connect your news client
to Microsoft's public news server: msnews.microsoft.com

Information about Microsoft developer products also available
at www.msdn.microsoft.com

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top