From: Daniel Jacobowitz <drow@false.org>
To: Steve Rodrigues <steverod@netapp.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] Indirect access to GDB history variables
Date: Sat, 16 Dec 2006 17:10:00 -0000 [thread overview]
Message-ID: <20061216171025.GB14012@nevyn.them.org> (raw)
In-Reply-To: <20061215024050.GA8750@linden.netapp.com>
On Thu, Dec 14, 2006 at 06:40:50PM -0800, Steve Rodrigues wrote:
> Feature: This patch enables users to programmatcially access the value history
> through a GDB variable, by overloading the "$$" construct to contain a variable
> name. For example, if my script had printed out values $10-$27, but only every
> 3rd one was interesting (it was a pointer I wished to examine further), I could
> do the following:
>
> set $i=10
> while ($i < 28)
> p *$$i
> set $i+= 3
> end
>
> ... and I'd see values of $10, $13, $16 and so on. This makes it easier to
> compose scripts together when debugging.
I've got to say I don't like it much :-( But the reason isn't your
fault; in fact, as CLI extensions go, this is pretty elegant.
Changing the CLI is touchy because of how weakly specified it is.
An example of how the weak specification leaves us grasping at syntax:
this introduces something which you can do with "$i" that you can't do
with "$1", because $$i and $$1 would mean different things.
I think that we should take the long-postponed jump to embedding
scripting languages, rather than adding more complexity to the existing
CLI. Maybe I'll take another stab at that this weekend.
If others disagree, though, I could be easily persuaded.
> Testing: This has been tested by hand. I've been trying to write a test
> case but have been having no luck getting the test suite to run (due to
> old versions of Tcl/expect on the systems this was developed on).
If we do go forward with this patch, I'd be happy to help you with a
test case (or with getting the testsuite going).
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-12-16 17:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 2:41 Steve Rodrigues
2006-12-15 8:43 ` Eli Zaretskii
2006-12-16 17:10 ` Daniel Jacobowitz [this message]
2006-12-16 18:40 ` Eli Zaretskii
2006-12-16 18:45 ` Daniel Jacobowitz
2006-12-16 19:43 ` Eli Zaretskii
2006-12-18 5:46 ` Steve Rodrigues
2006-12-18 13:40 ` Daniel Jacobowitz
[not found] <20061215182551.GA10789@siml11.eng.netapp.com>
2006-12-16 9:34 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061216171025.GB14012@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=steverod@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox