This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
patch for binutils/readelf.c, DW_LNS_const_add_pc bug
- To: binutils@sourceware.cygnus.com
- Subject: patch for binutils/readelf.c, DW_LNS_const_add_pc bug
- From: Jim Wilson <wilson@cygnus.com>
- Date: Thu, 26 Aug 1999 15:40:19 -0700
- cc: wilson@cygnus.com, nickc@cygnus.com
The offset needs to be multiplied by the minimum instruction size.
Thu Aug 26 15:36:01 1999 Jim Wilson <wilson@cygnus.com>
* readelf.c (display_debug_lines, case DW_LNS_const_add_pc): Multiply
adv by info.li_min_insn_length.
Index: readelf.c
===================================================================
RCS file: /cvs/cvsfiles/devo/binutils/readelf.c,v
retrieving revision 1.85
diff -p -r1.85 readelf.c
*** readelf.c 1999/08/26 03:52:31 1.85
--- readelf.c 1999/08/26 22:35:40
*************** display_debug_lines (section, start, fil
*** 4398,4404 ****
break;
case DW_LNS_const_add_pc:
! adv = (255 - info.li_opcode_base) / info.li_line_range;
state_machine_regs.address += adv;
printf (_(" Advance PC by constant %d to 0x%lx\n"), adv,
state_machine_regs.address);
--- 4398,4405 ----
break;
case DW_LNS_const_add_pc:
! adv = (((255 - info.li_opcode_base) / info.li_line_range)
! * info.li_min_insn_length);
state_machine_regs.address += adv;
printf (_(" Advance PC by constant %d to 0x%lx\n"), adv,
state_machine_regs.address);