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]

bug in read_2u (in dwarf2cfi.c)


The function read_2u (in dwarf2cfi.c) has a small, but fatal bug.
Since read_2u is a helper function, this bug can probably cause
many different kinds of errors. The symptom I encountered was
that, during a backtrace, gdb threw the error
"dwarf cfi error: unknown cfa instruction".

 
2003-03-25  Mark Dettinger <dettinge at de dot ibm dot com>
 
        * dwarf2cfi.c: function read_2u was corrected.

 
*** dwarf2cfi.c Mon Feb 10 12:50:20 2003
--- dwarf2cfi.c.new     Tue Mar 25 18:21:14 2003
*************** read_2u (bfd *abfd, char **p)
*** 345,351 ****
    unsigned ret;
 
    ret = bfd_get_16 (abfd, (bfd_byte *) * p);
!   (*p)++;
    return ret;
  }
 
--- 345,351 ----
    unsigned ret;
 
    ret = bfd_get_16 (abfd, (bfd_byte *) * p);
!   (*p) += 2;
    return ret;
  }


-Mark Dettinger


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


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