Discussion:
Wrong type used to display variabled when the type is multiply def
(too old to reply)
Nemaco
2009-03-26 11:08:02 UTC
Permalink
Dear all,
We have a legacy project where the same type name is used in several module.
But each module has its own definition.
When we are using the debugger, Studio 2005 pick up one of them, which is
not the good one in moste case.
How can we say to the debugger which type definition must been used.

To give an exemple to clarify my point we have:
foobar1.h
typedef struct {
int var1;
int var2;
} Workspace;

foobar2.h
typedef struct {
char arg1;
char arg2;
} Workspace;

foobar3.c
#include "foobar1.h"
int dummy()
{
Workspace wkp; // <-- if we "watch" it, Workspace foobar2.h will be used
}

We cannot change the name fo the variable as recommend in
http://support.microsoft.com/default.aspx/kb/822551
and it seems to be only applicable for studio.Net

Thanks
Scot T Brennecke
2009-04-01 18:57:41 UTC
Permalink
This is one of the reasons the concept of namespaces was invented.
Post by Nemaco
Dear all,
We have a legacy project where the same type name is used in several module.
But each module has its own definition.
When we are using the debugger, Studio 2005 pick up one of them, which is
not the good one in moste case.
How can we say to the debugger which type definition must been used.
foobar1.h
typedef struct {
int var1;
int var2;
} Workspace;
foobar2.h
typedef struct {
char arg1;
char arg2;
} Workspace;
foobar3.c
#include "foobar1.h"
int dummy()
{
Workspace wkp; // <-- if we "watch" it, Workspace foobar2.h will be used
}
We cannot change the name fo the variable as recommend in
http://support.microsoft.com/default.aspx/kb/822551
and it seems to be only applicable for studio.Net
Thanks
Loading...