substitute gdb convenience variable into gdb command

Michael Snyder msnyder@specifix.com
Tue Feb 12 19:41:00 GMT 2008


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...   ;-)





More information about the Gdb mailing list