This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR debug/47471 (set prologue_end in .debug_line)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Dodji Seketeli <dodji at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Mar 2011 11:10:30 +0200
- Subject: Re: [PATCH] PR debug/47471 (set prologue_end in .debug_line)
- References: <m3pqp8ii7n.fsf@redhat.com> <4D93EE06.6000501@redhat.com>
On Thu, 31 Mar 2011 04:59:18 +0200, Richard Henderson wrote:
> On 03/30/2011 11:19 AM, Dodji Seketeli wrote:
> > First, it avoids emitting two consecutive .loc that are identical.
> > Strictly speaking that should fix this issue in this particular case.
>
> What's the compatibility strategy? I.e. how does gdb tell that we're
> not using the double-loc mechanism? Does it scan the line ops and if
> you see any prologue_end marks assume that double-loc is not in effect?
Currently GDB ignores / has no support for DW_LNS_set_prologue_end.
> Are you actually going to be able to delete any code within gdb, due
> to the need to interpret older debug info?
No code is going to be deleted from GDB.
For -O2 -g code the prologue does not (will not) need to be known to GDB:
[patch] Do not skip prologue for -O2 -g with GCC VTA Re: [patch] Fix for PR gdb/12573
http://sourceware.org/ml/gdb-patches/2011-03/msg01129.html
For -O0 -g code the line number information may be good enough. For
compatibility with older GDBs the line number tricks should remain in place
and in such case DW_LNS_set_prologue_end is redundant for -O0 -g.
I thought DW_LNS_set_prologue_end would be cleaner for -O0 -g but that may not
be required.
Thanks,
Jan