This is the mail archive of the gdb-patches@sources.redhat.com 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: RFA: handle zero-length types in value_from_register


Andrew Cagney <cagney@gnu.org> writes:

> > The patches I posted here:
> > http://sources.redhat.com/ml/gdb-patches/2004-01/msg00717.html
> > haven't gotten any more comments since my last revision, so I've
> > committed them.
> 
> Jim, did you read this thread?
> http://sources.redhat.com/ml/gdb-patches/2004-02/msg00075.html
> Andrew

No, I hadn't --- thanks.  I've committed the following.

2004-02-19  Jim Blandy  <jimb@redhat.com>

	* findvar.c (value_from_register): Doc fix.

*** findvar.c.~1.73.~	2004-02-17 23:24:28.000000000 -0500
--- findvar.c	2004-02-19 17:39:16.000000000 -0500
***************
*** 627,640 ****
           error.  
  
           Zero-length types can legitimately arise from declarations
!          like 'struct {}'.  GDB may also create them when it finds
!          bogus debugging information; for example, in GCC 2.95.4 and
!          binutils 2.11.93.0.2, the STABS BINCL->EXCL compression
!          process can create bad type numbers.  GDB reads these as
!          TYPE_CODE_UNDEF types, with zero length.  (That bug is
!          actually the only known way to get a zero-length value
!          allocated to a register --- which is what it takes to make it
!          here.)
  
           We'll just attribute the value to the original register.  */
        VALUE_LVAL (v) = lval_register;
--- 627,640 ----
           error.  
  
           Zero-length types can legitimately arise from declarations
!          like 'struct {}' (a GCC extension, not valid ISO C).  GDB may
!          also create them when it finds bogus debugging information;
!          for example, in GCC 2.95.4 and binutils 2.11.93.0.2, the
!          STABS BINCL->EXCL compression process can create bad type
!          numbers.  GDB reads these as TYPE_CODE_UNDEF types, with zero
!          length.  (That bug is actually the only known way to get a
!          zero-length value allocated to a register --- which is what
!          it takes to make it here.)
  
           We'll just attribute the value to the original register.  */
        VALUE_LVAL (v) = lval_register;




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