diff options
author | Geoffrey Keating <geoffk@geoffk.org> | 2001-11-13 20:13:30 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@geoffk.org> | 2001-11-13 20:13:30 +0000 |
commit | 1a509dcc12769a52569c270c67356cc81739c28c (patch) | |
tree | af34ff69925b2a11d721b111dddd4f32de0f6e7e /binutils | |
parent | 8b982acfc63906d5207737a6e2072ed70884fe0e (diff) | |
download | gdb-1a509dcc12769a52569c270c67356cc81739c28c.zip gdb-1a509dcc12769a52569c270c67356cc81739c28c.tar.gz gdb-1a509dcc12769a52569c270c67356cc81739c28c.tar.bz2 |
Index: bfd/ChangeLog
2001-11-11 Geoffrey Keating <geoffk@redhat.com>
* dwarf2.c (decode_line_info): Properly deal with unknown standard
opcodes.
Index: binutils/ChangeLog
2001-11-11 Geoffrey Keating <geoffk@redhat.com>
* readelf.c (display_debug_lines): Deal with unknown standard
opcodes. Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin,
DW_LNS_set_isa.
Index: include/elf/ChangeLog
2001-11-11 Geoffrey Keating <geoffk@redhat.com>
* dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 9 | ||||
-rw-r--r-- | binutils/readelf.c | 50 |
2 files changed, 47 insertions, 12 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index dc85cc1..6fc2f62 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,9 +1,16 @@ +2001-11-13 Geoffrey Keating <geoffk@redhat.com> + + * readelf.c (display_debug_lines): Deal with unknown standard + opcodes. Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin, + DW_LNS_set_isa. + 2001-11-13 Timothy Wall <twall@alum.mit.edu> + * MAINTAINERS: Add self as tic54x maintainer. This target includes the IBM C54XDSP clone. 2001-11-12 * Steven J. Hill <sjhill@realitydiluted.com> - + * bucomm.c (make_tempname): Use mkstemp in place of mktemp. 2001-11-09 Jeffrey A Law (law@cygnus.com) diff --git a/binutils/readelf.c b/binutils/readelf.c index a58200f..1d5300a 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -5888,7 +5888,19 @@ display_debug_lines (section, start, file) op_code = * data ++; - switch (op_code) + if (op_code >= info.li_opcode_base) + { + op_code -= info.li_opcode_base; + adv = (op_code / info.li_line_range) * info.li_min_insn_length; + state_machine_regs.address += adv; + printf (_(" Special opcode %d: advance Address by %d to 0x%lx"), + op_code, adv, state_machine_regs.address); + adv = (op_code % info.li_line_range) + info.li_line_base; + state_machine_regs.line += adv; + printf (_(" and Line by %d to %d\n"), + adv, state_machine_regs.line); + } + else switch (op_code) { case DW_LNS_extended_op: data += process_extended_line_op (data, info.li_default_is_stmt, @@ -5958,20 +5970,36 @@ display_debug_lines (section, start, file) adv, state_machine_regs.address); break; + case DW_LNS_set_prologue_end: + printf (_(" Set prologue_end to true\n")); + break; + + case DW_LNS_set_epilogue_begin: + printf (_(" Set epilogue_begin to true\n")); + break; + + case DW_LNS_set_isa: + adv = read_leb128 (data, & bytes_read, 0); + data += bytes_read; + printf (_(" Set ISA to %d\n"), adv); + break; + default: - op_code -= info.li_opcode_base; - adv = (op_code / info.li_line_range) * info.li_min_insn_length; - state_machine_regs.address += adv; - printf (_(" Special opcode %d: advance Address by %d to 0x%lx"), - op_code, adv, state_machine_regs.address); - adv = (op_code % info.li_line_range) + info.li_line_base; - state_machine_regs.line += adv; - printf (_(" and Line by %d to %d\n"), - adv, state_machine_regs.line); + printf (_(" Unknown opcode %d with operands: "), op_code); + { + int i; + for (i = standard_opcodes[op_code - 1]; i > 0 ; --i) + { + printf ("0x%lx%s", read_leb128 (data, &bytes_read, 0), + i == 1 ? "" : ", "); + data += bytes_read; + } + putchar ('\n'); + } break; } } - printf ("\n"); + putchar ('\n'); } return 1; |