🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #332

bug in whatis command

#332
From: Srini Sankaran
Date: Wed, 29 Nov 1989 19:22
31 lines
1092 bytes
gdb makes a mistake in printing "whatis" information on pointer-to-a-pointer
to a struct. To reproduce the bug, do the following:

1. gcc -g foo.c -o foo
2. gdb foo
3. break main
4. whatis foo
5. whatis bar

If you look at the gdb output to steps 4 & 5 above, they are the same. 
However one is a ptr to a struct and the other is ptr-to-ptr to a struct.

Environment: AT&T 6386 WGS with Interactive Systems' Sys V Unix 

-srini...
nancy!srini@uunet.uu.net

------------------BEGIN foo.c---------------
typedef struct
{
    int a;
} *foo_ptype;

void main(int argc, char* argv[])
{

    foo_ptype foo, *bar;
    foo = 0;
}

-----------END foo.c--------------
Technical Details
Message-ID: <8911291922.AA26908@artm14.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!nancy!srini%artm14

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!nancy!srini%artm14
From: nancy!srini%artm14@UUNET.UU.NET (Srini Sankaran)
Newsgroups: gnu.gdb.bug
Subject: bug in whatis command
Message-ID: <8911291922.AA26908@artm14.UUCP>
Date: 29 Nov 89 19:22:44 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 31