This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: debugging
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Mike Stump <mikestump at comcast dot net>, GCC Development <gcc at gcc dot gnu dot org>, jan dot kratochvil at redhat dot com
- Date: Wed, 23 Mar 2011 08:51:25 +0100
- Subject: Re: debugging
- References: <3642E6E3-8DDE-4D23-922B-B6B8262D27B5@comcast.net> <mcrvczapz5l.fsf@google.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Mar 22, 2011 at 03:29:26PM -0700, Ian Lance Taylor wrote:
> Mike Stump <mikestump@comcast.net> writes:
>
> > So, I was trying to debug some stuff with the top of the tree on a suse linux x86_64 box and got:
> >
> > (gdb) p mode
> > Unhandled dwarf expression opcode 0xf3
> >
> > which I don't find entertaining. I know I _could_ install a new gdb, and most likely this would fix the problem, but, I don't want to do that right now. I think gcc should avoid codes that gdb doesn't support. I rebuilt with --O0, just to try and avoid the issue, and that didn't work either. :-(
At -O0 -g DW_OP_GNU_entry_value isn't emitted, you need var-tracking for it,
nothing else creates it.
> I haven't looked, but you should be able to use, e.g., -gdwarf-2
> -gstrict-dwarf. If that doesn't work then something has gone wrong.
Even -gdwarf-3 -gstrict-dwarf or -gdwarf-4 -gstrict-dwarf or
-fno-var-tracking-assignments will stop emitting them.
Alternatively, new enough gdb will ignore them:
http://sources.redhat.com/ml/gdb-cvs/2011-03/msg00268.html
or alternatively
http://sourceware.org/git/?p=archer.git;a=shortlog;h=refs/heads/archer-jankratochvil-entryval
is the git branch with gdb support for this, though as I was told
it is a GDB 7.4 material rather than 7.3 (the msg00268.html
commit is hopefully GDB 7.3 material).
Jakub