🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Srini Sankaran Wed, 29 Nov 1989 19:22
bug in whatis command
#332
Author: 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--------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads