Different output from -gdb-show than show

Pedro Alves pedro@codesourcery.com
Tue Aug 31 20:03:00 GMT 2010


On Tuesday 31 August 2010 20:39:51, Marc Khouzam wrote:
> > -----Original Message-----
> > From: gdb-owner@sourceware.org 
> > [mailto:gdb-owner@sourceware.org] On Behalf Of Michael Snyder
> > Sent: Tuesday, August 31, 2010 3:33 PM
> > To: Pedro Alves
> > Cc: gdb@sourceware.org; Marc Khouzam
> > Subject: Re: Different output from -gdb-show than show
> > 
> > Pedro Alves wrote:
> > 
> > > Note "Forward." vs "forward".
> > > 
> > >>   2010-08-31  Michael Snyder  
> > <msnyder@msnyder-server.eng.vmware.com>
> > >>
> > >>         * infrun.c (set_exec_direction_func): Error out if 
> > target does not
> > >>         support reverse execution.
> > > 
> > > Okay.
> > 
> > Thanks, applied to trunk and branch.
> 
> Thanks guys!
> 
> Here is what I'm planning to do to see if a target supports reverse
> execution:
> 
> -gdb-set exec-direction reverse
> show exec-direction
> -gdb-set exec-direction forward
> 
> If the 'show' command shows "Reverse", I'll know that the target
> supports reverse execution.  (I have to do it like this because 
> I also want it to work for 7.0 and 7.1)
> 
> That is the only thing I found that gave me that info without
> side-effects.  Makes sense?

Yes.  You may want to issue an "-gdb-set exec-direction forward"
upfront to clean up any stale state from a previous run/target
as well...  Also, it may wreck havoc in non-stop if the target is
already executing...  I think listing support for reverse
in "-list-target-features" would be nice?

-- 
Pedro Alves



More information about the Gdb mailing list