Connecting Tech Pros Worldwide Forums | Help | Site Map

Debugger issue - VC++ v6

A C
Guest
 
Posts: n/a
#1: Jul 22 '05
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




Mike Wahler
Guest
 
Posts: n/a
#2: Jul 22 '05

re: Debugger issue - VC++ v6



"A C" <no@sp.am> wrote in message
news:yLR_b.1213$SZ.55731@news.xtra.co.nz...[color=blue]
> 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[/color]
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


Closed Thread