This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: substitute gdb convenience variable into gdb command


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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]