This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mn10300 assembler relaxation breaks dwarf2 debugging info


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
> adjusted.

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.

-- 
Alan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]