This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: substitute gdb convenience variable into gdb command
- From: Michael Snyder <msnyder at specifix dot com>
- To: Yakov Lerner <iler dot ml at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 12 Feb 2008 11:41:33 -0800
- Subject: Re: substitute gdb convenience variable into gdb command
- References: <f36b08ee0802120754r59b72f64vb9164965da338686@mail.gmail.com>
On Tue, 2008-02-12 at 17:54 +0200, Yakov Lerner wrote:
> How do I substitute value of gdb convenience variable into gdb command ?
>
> For example:
> set $thread_num=5
> thread apply $thread_num where
> Error parsing $thread_num where
> eval thread apply $thread_num where
> Undefined command: "eval". Try "help".
>
> Thanks
> Y.L.
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.
Somebody should fix that... ;-)