This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Arm dwarf line debug info
On Sunday 19 March 2006 20:27, Daniel Jacobowitz wrote:
> On Sun, Mar 19, 2006 at 07:29:05PM +0000, Paul Brook wrote:
> > +#ifdef OBJ_ELF
> > + /* The size of the instruction is unknown, so tie the debug info to
> > the + start of the function. */
> > + dwarf2_emit_insn (0);
> > +#endif
>
> s/function/instruction/?
Yes. Updated patch below
Paul
Index: gas/config/tc-arm.c
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/config/tc-arm.c,v
retrieving revision 1.248
diff -u -p -r1.248 tc-arm.c
--- gas/config/tc-arm.c 17 Mar 2006 14:03:36 -0000 1.248
+++ gas/config/tc-arm.c 19 Mar 2006 19:11:12 -0000
@@ -7982,6 +8044,12 @@ output_relax_insn (void)
symbolS *sym;
int offset;
+#ifdef OBJ_ELF
+ /* The size of the instruction is unknown, so tie the debug info to the
+ start of the instruction. */
+ dwarf2_emit_insn (0);
+#endif
+
switch (inst.reloc.exp.X_op)
{
case O_symbol:
@@ -8000,10 +8068,6 @@ output_relax_insn (void)
to = frag_var (rs_machine_dependent, INSN_SIZE, THUMB_SIZE,
inst.relax, sym, offset, NULL/*offset, opcode*/);
md_number_to_chars (to, inst.instruction, THUMB_SIZE);
-
-#ifdef OBJ_ELF
- dwarf2_emit_insn (INSN_SIZE);
-#endif
}
/* Write a 32-bit thumb instruction to buf. */