Re: Struct self pointers turn to void* in gdb

2010-12-11 Thread Stone
On Dec 10, 11:36 pm, Tom Tromey wrote: > > "Stone" == Stone   writes: > > Stone> However, when I debugged the code in gdb, all the ptr*'s turned to > Stone> void*. > > Stone> Is there anyone knows the reason for this please? > > Maybehttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=45088 > > Tom O

Re: Struct self pointers turn to void* in gdb

2010-12-10 Thread Tom Tromey
> "Stone" == Stone writes: Stone> However, when I debugged the code in gdb, all the ptr*'s turned to Stone> void*. Stone> Is there anyone knows the reason for this please? Maybe http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45088 Tom ___ help-gpl

Struct self pointers turn to void* in gdb

2010-12-09 Thread Stone
Hi. I wrote a smart pointer struct (named ptr) as a linked list, like this: struct ptr{ int node; ptr *next; ptr(){} ptr(int _node, ptr *_next){ node=_node; next=_next; } }; struct list_t{ ptr *sht; int size; void push(int node){ size++; sht=new ptr(node,