This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: implementing eval 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: Fri, 15 Feb 2008 09:58:49 -0800
- Subject: Re: implementing eval command
- References: <f36b08ee0802140818j2c5d26d5yb09c3662b81f8444@mail.gmail.com>
Moving this to "gdb" list, since it is not a patch.
On Thu, 2008-02-14 at 18:18 +0200, Yakov Lerner wrote:
> I'd like to make a patch that implements eval command, as follows.
> I have following idea to implement eval simply:
> Syntax of eval will be similar to the syntax of 'printf' command:
> eval "string with %..." comma-separated-expressions
> Implementation relies on existing printf_command() function,
> by rewriting printf_command into pair of functions, one that computes
> result of printf as allocated string; both printf_command and eval_command
> will use compute_printf() function.
> What do you think ?
Hmmm, that would be one way of getting around the
limitations of some commands that can't accept expressions
as arguments (mentioned in another thread).
What do you see as the context for this eval command?
How do you imagine it will be used?