This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Patch: restoring multi-line breakpoint commands
- To: Keith Seitz <keiths at cygnus dot com>
- Subject: Re: Patch: restoring multi-line breakpoint commands
- From: Tom Tromey <tromey at redhat dot com>
- Date: 02 Oct 2001 17:17:11 -0600
- Cc: Insight List <insight at sourceware dot cygnus dot com>
- References: <Pine.GSO.4.33.0110021450070.10108-100000@makita.cygnus.com>
- Reply-To: tromey at redhat dot com
Tom> Ok to commit?
Keith> Yes, but there is still a problem. :-(
Thanks. I'll check it in. I'll probably wait for my main.c patch to
be approved, though, so I don't have to move everything around in my
source tree.
>> printf "Hello!\n"
>> set $i=0
>> while ($i<10)
>> printf "i=%d\n", $i
>> set $i=$i+1
>> end
>> end
Keith> This gets us the command list: {printf "Hello\n"} {set $i=0} {($i<10)}
Keith> Obviously, we're missing some information here. :-(
Yeah. When I was digging around I noticed that gdb command chains use
a weird data structure. It didn't occur to me, though, that
gdb_get_breakpoint_info() might not handle them correctly.
I think we need a more complicated piece of code to generate the
command info. For one thing stuff like `while' has to be added to the
command string by gdbtk. For another gdbtk has to recurse down into
the body of control commands.
Keith> PS. As far as sessions go, should we encapsulate this stuff in
Keith> a class/namespace, too? I know it doesn't really matter, but
Keith> maybe it would be "cleaner"?
I agree. I don't know why I didn't use a namespace in the first
place. Probably just an ancient habit.
Tom