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


> From: amodra@one.net.au
> Date: Mon, 14 May 2001 17:08:46 +0930

> 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.
> And the current frag too.

I agree.  That'd be more intuitive.

> BTW, this bug probably affects all gas ports with relaxable insns.

Not CRIS, FWIW.  Well, at least not after I fixed it.  Sorry, I
must've missed browsing other ports for the same bug.

> Yikes, the situation is even worse.  If md_assemble makes use of
> frag_var for variable size insns, the current frag is finished and a
> new one started.  dwarf2_emit_insn will be fiddling with the wrong
> frag.

Right.  Ports need to do something like
dwarf2_emit_insn (size_of_initial_fixed_piece) and call it
directly (or before other frag_* calls) after the first
frag_more (size_of_initial_fixed_piece) for an insn.

brgds, H-P


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