This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: FW: Segfault in varobj.c


 

> -----Original Message-----
> From: Nick Roberts [mailto:nickrob@snap.net.nz] 
> Sent: 28 July 2007 02:41
> To: Robert Norton
> Cc: gdb@sourceware.org
> Subject: Re: FW: Segfault in varobj.c
> 
> Your example crashes with GDB 6.6 for me in the way you first 
> reported.
 
Interesting! I think I needed an array of teststructs in the end.
Another one for the test suite?

>  > Suppose I'll just have to go with a workaround until such 
> time as we can
>  > upgrade. 
> 
> Yes.  It appears to be fixed in current CVS but isn't handled 
> by GDB 6.6.

OK. I managed to avoid the segfault by backporting get_value_type and
changing the line

  switch (TYPE_CODE (parent->type))

In c_type_of_child to 

  switch (TYPE_CODE (get_value_type(parent)))

This is still not right since the pointer fields which previously caused
a crash can now be expanded twice in eclipse. It seems gdb gets the type
of the child of the pointer wrong (it thinks it is still a pointer) and
allows it to be expanded again, but at least it doesn't crash!

Thanks for your assistance,

Robert

> -- 
> Nick                                           
> http://www.inet.net.nz/~nickrob
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]