This is the mail archive of the
mailing list for the binutils project.
Re: mn10300 assembler relaxation breaks dwarf2 debugging info
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: mn10300 assembler relaxation breaks dwarf2 debugging info
- From: amodra at one dot net dot au
- Date: Mon, 14 May 2001 17:08:46 +0930
- Cc: binutils at sources dot redhat dot com
- References: <email@example.com>
On Mon, May 14, 2001 at 02:21:13AM -0300, Alexandre Oliva wrote:
> The assembler manages to mess up the addresses of regions associated
> with source lines when doing relaxations. The problem is that we
> anchor debugging info to the end of an insn minus its size. However,
> when relaxation modifies the size of the insn, debugging info isn't
Why should it need to be adjusted? The start of the instruction
relative to the beginning of the frag surely doesn't change during
relaxation, and that's what the "end of an insn minus its size" is
calculating. Isn't the problem really that the "size" param of
dwarf2_emit_insn is actually the maximum size of the insn? (See
what frag_now_fix returns).
IMNSHO, passing the size of the insn to dwarf2_emit_insn is a bit
silly; Why not pass the start of the insn instead? It's easy to
save the current frag offset at the start of md_assemble.