* [rfa/dwarf] Handle debug_line extended ops correctly
@ 2004-06-16 15:44 Daniel Jacobowitz
2004-06-16 17:07 ` Jim Blandy
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-06-16 15:44 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Coulter, Jim Blandy, Elena Zannoni
This has been hanging around in my tree for a while. The HP-UX ia64
compiler generates things like this in .debug_line:
Extended opcode 32: UNKNOWN: length 51
Extended opcode 32: UNKNOWN: length 146
146 is different as a byte and as a uleb128, so we get confused. Of course,
we're going to bail out shortly anyway because we don't accept unknown
extended ops (probably for the best); but we might as well parse the length
right.
OK?
--
Daniel Jacobowitz
2004-06-16 Daniel Jacobowitz <dan@debian.org>
PR gdb/1658
* dwarf2read.c (dwarf_decode_lines): Read the length of the extended
operation as a uleb128. Found by Michael Coulter.
Index: gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.153
diff -u -p -r1.153 dwarf2read.c
--- gdb/dwarf2read.c 15 Jun 2004 01:04:19 -0000 1.153
+++ gdb/dwarf2read.c 16 Jun 2004 15:38:49 -0000
@@ -5986,7 +5986,8 @@ dwarf_decode_lines (struct line_header *
else switch (op_code)
{
case DW_LNS_extended_op:
- line_ptr += 1; /* ignore length */
+ read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
extended_op = read_1_byte (abfd, line_ptr);
line_ptr += 1;
switch (extended_op)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa/dwarf] Handle debug_line extended ops correctly
2004-06-16 15:44 [rfa/dwarf] Handle debug_line extended ops correctly Daniel Jacobowitz
@ 2004-06-16 17:07 ` Jim Blandy
2004-06-16 17:16 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2004-06-16 17:07 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, Michael Coulter, Elena Zannoni
Daniel Jacobowitz <drow@false.org> writes:
> This has been hanging around in my tree for a while. The HP-UX ia64
> compiler generates things like this in .debug_line:
> Extended opcode 32: UNKNOWN: length 51
> Extended opcode 32: UNKNOWN: length 146
>
> 146 is different as a byte and as a uleb128, so we get confused. Of course,
> we're going to bail out shortly anyway because we don't accept unknown
> extended ops (probably for the best); but we might as well parse the length
> right.
>
> OK?
Okay.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa/dwarf] Handle debug_line extended ops correctly
2004-06-16 17:07 ` Jim Blandy
@ 2004-06-16 17:16 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-06-16 17:16 UTC (permalink / raw)
To: gdb-patches
On Wed, Jun 16, 2004 at 12:07:30PM -0500, Jim Blandy wrote:
> Daniel Jacobowitz <drow@false.org> writes:
>
> > This has been hanging around in my tree for a while. The HP-UX ia64
> > compiler generates things like this in .debug_line:
> > Extended opcode 32: UNKNOWN: length 51
> > Extended opcode 32: UNKNOWN: length 146
> >
> > 146 is different as a byte and as a uleb128, so we get confused. Of course,
> > we're going to bail out shortly anyway because we don't accept unknown
> > extended ops (probably for the best); but we might as well parse the length
> > right.
> >
> > OK?
>
> Okay.
Committed, thanks.
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-16 17:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-16 15:44 [rfa/dwarf] Handle debug_line extended ops correctly Daniel Jacobowitz
2004-06-16 17:07 ` Jim Blandy
2004-06-16 17:16 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox