This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mn10300 assembler relaxation breaks dwarf2 debugging info
- To: amodra at one dot net dot au
- Subject: Re: mn10300 assembler relaxation breaks dwarf2 debugging info
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Mon, 14 May 2001 12:58:17 +0200
- CC: aoliva at redhat dot com, binutils at sources dot redhat dot com
> 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