This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Incorrect mn10300 dwarf2 debugging info
- To: binutils at sourceware dot cygnus dot com
- Subject: Incorrect mn10300 dwarf2 debugging info
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 26 May 2000 08:58:36 -0300
- Organization: Cygnus Solutions, a Red Hat Company
md_assemble() may modify the variable `size' before we use it to
generate frag offsets, so we must take a copy of it with the actual
size of the instruction. Ok to install?
Index: gas/ChangeLog
from Alexandre Oliva <aoliva@cygnus.com>
* config/tc-mn10300.c (md_assemble): Copy size to real_size before
it is modified, and use the real_size to compute the frag address
for dwarf2 line info.
Index: gas/config/tc-mn10300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mn10300.c,v
retrieving revision 1.6
diff -u -r1.6 tc-mn10300.c
--- gas/config/tc-mn10300.c 2000/05/12 06:16:30 1.6
+++ gas/config/tc-mn10300.c 2000/05/26 11:54:28
@@ -902,7 +902,7 @@
struct mn10300_opcode *next_opcode;
const unsigned char *opindex_ptr;
int next_opindex, relaxable;
- unsigned long insn, extension, size = 0;
+ unsigned long insn, extension, size = 0, real_size;
char *f;
int i;
int match;
@@ -1480,6 +1480,8 @@
if (opcode->format == FMT_D4)
size = 6;
+ real_size = size;
+
if (relaxable && fc > 0)
{
int type;
@@ -1760,7 +1762,7 @@
/* We want the offset of the start of this instruction within the
the current frag. */
- addr = frag_now->fr_address + frag_now_fix () - size;
+ addr = frag_now->fr_address + frag_now_fix () - real_size;
/* And record the information. */
dwarf2_gen_line_info (addr, &debug_line);
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me