This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas dwarf2 assert failure for misaligned sections?
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: amodra at bigpond dot net dot au, <binutils at sources dot redhat dot com>
- Date: Wed, 4 Dec 2002 00:00:39 -0500 (EST)
- Subject: Re: gas dwarf2 assert failure for misaligned sections?
On Tue, 3 Dec 2002, DJ Delorie wrote:
> > > > I guess we should be emitting a normal error here rather than using
> > > > an assert.
> > >
> > > I tried to get the right file/line info, but by the time we're
> > > encoding dwarf2 info (esp wrt relaxing the dwarf2 frags), we've lost
> > > track of where the error really occurred.
> >
> > Correct line and file info should be in the frag being
> > processed. Passing it or the frag through to out_inc_line_addr
> > to emit_inc_line_addr and doesn't help?
>
> I tried implementing this, but the frags were all empty (i.e. both
> fr_file and fr_line were zero).
>
> Is it worth going further, and finding out where those frags are
> generated and fill them in?
Since you ask: yes. ;-) Breaking after allocating the frag in
frag_new (or whereever) matching one of those addresses and
doing a backtrace in gdb to spot the caller seems easy enough
(looking from here). With luck you'd catch some real issue too,
at the same time.
brgds, H-P