substitute gdb convenience variable into gdb command

Michael Snyder msnyder@specifix.com
Tue Feb 12 22:17:00 GMT 2008


On Tue, 2008-02-12 at 14:55 -0500, Daniel Jacobowitz wrote:
> On Tue, Feb 12, 2008 at 11:41:33AM -0800, Michael Snyder wrote:
> > Hmm!  That's a bit of an oversight...
> > thread_apply_command calls strtol.  It ought to call
> > one of the built-in expression parsing functions.
> 
> Not really.  It would become pretty much impossible to parse the
> command if you did that.  There's no reliable way to find the end of
> an expression if it has unknown text afterwards.

You're right.  I ran into the same issue when I did the
dump and restore commands.  I used parse_and_eval_long, 
but only because I arranged the command syntax so that
the integer value was the last argument on the command line.

In this case it isn't the last argument, so we can't do that.





More information about the Gdb mailing list