|
| Issue (DbgHelp): long*/int* |
 |
Tue, 18 Mar 2008 15:21:43 -070 |
Hi All,
After reading a few posts from Roger [1,2], I was able to dump the
data types (includeing pointers) of variables in my program.
I imagine this issue has to do with the compiler and linker, and the
resulting PDB file. It surfaces through DbgHelp.
The underlying BaseType of a long* is indexed as an int, even though
there is a distinction between a long and int. I verified Visual
Studio's 'Local' and 'Watch' windows display the same behavior
(display that a long* is an int*).
Jeff
[1]
http://groups.google.com/group/microsoft.public.windbg/browse_thread/thread/5d26
372af841c247
|
| Post Reply
|
| Re: Issue (DbgHelp): long*/int* |
 |
Wed, 19 Mar 2008 03:22:30 -070 |
On Mar 18, 10:21 pm, Jeffrey Walton <noloa...@gmail.com> wrote:
> Hi All,
>
> After reading a few posts from Roger [1,2], I was able to dump the
> data types (includeing pointers) of variables in my program.
Good news!
It is a little bit tricky to follow the right sequence of calls :-)
> I imagine this issue has to do with the compiler and linker, and the
> resulting PDB file. It surfaces through DbgHelp.
>
> The underlying BaseType of a long* is indexed as an int, even though
> there is a distinction between a long and int. I verified Visual
> Studio's 'Local' and 'Watch' windows display the same behavior
> (display that a long* is an int*).
Uh??
Not a problem I've seen....
May be off this group and a bug in your tool chain.
Testing the following code with VS 2005 (32 bit):-
----- simple.cpp
int main()
{
int i[2] = {1,2};
int *pi = i;
long l[2] = {3,4};
long *pl = l;
return pl[0] ? pi[0] : pi[1];
}
----------
cl /Zi simple.cpp
Locals window shows me:
l long[2]
pl long*
i int[2]
pi int*
What do you see?
Regards,
|
| Post Reply
|
| Re: Issue (DbgHelp): long*/int* |
 |
Wed, 19 Mar 2008 07:48:38 -070 |
On Mar 19, 6:22 am, roger....@gmail.com wrote:
> On Mar 18, 10:21 pm, Jeffrey Walton <noloa...@gmail.com> wrote:
>
> > [SNIP]
>
> > I imagine this issue has to do with the compiler and linker, and the
> > resulting PDB file. It surfaces through DbgHelp.
>
> > [SNIP]
>
> Uh??
> Not a problem I've seen....
> May be off this group and a bug in your tool chain.
Yep... copy and paste - I changed the other declarations from an int
to long (but not the pointer). This is why I call them 'issues' rather
than bugs. Usually the issue is with me.
> Testing the following code with VS 2005 (32 bit):-
>
> ----- simple.cpp
> int main()
> {
> [SNIP]
> }
>
>
> What do you see?
>
> Regards,
> Roger.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|