On Tue, Mar 22, 2011 at 03:29:26PM -0700, Ian Lance Taylor wrote:
> Mike Stump <mikest...@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

Reply via email to