This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: restoring multi-line breakpoint commands


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]