gdb Digest 13 Aug 2002 16:12:56 -0000 Issue 925

Jim Ingham jingham@apple.com
Tue Aug 13 15:21:00 GMT 2002


Keith,

The new output looks great (though Rab will be less than happy, he's 
going to have to rewhack ProjectBuilder a bunch to get this working 
again...).

I have had to hack around in the mi a bit, and it is SO much more 
pleasant now that I am able to pop in and out of the mi interpreter 
when developing/debugging mi commands.  My fingers revolt if I have to 
type verbose mi commands by hand for a whole session!  So it would be 
fine to have it as just a maint command (though to tell the truth, it 
ain't gonna get a lot of traffic whatever you call it...).  But I do 
think it is worth keeping.

Jim

On Tuesday, August 13, 2002, at 02:30  PM, Keith Seitz wrote:

> On Tue, 13 Aug 2002, Jim Ingham wrote:
>
>> Was this really hard to get working?  I don't remember it being
>> particularly difficult when I did it the first time.
>
> Yes and no. I do/did have it working, but it required some ugliness to 
> pop
> back out of the command_loop into command_loop_hook.
>
> The reason you didn't find much difficulty doing it is because I've
> massaged your code a little, particularly in the area of 
> interpreter-exec.
>
> For example, compare what I've proposed as the new MI output:
>
> (gdb)
> -interpreter-exec console "break main"
> &"During symbol reading, couldn't parse type; debugger out of date?.\n"
> &"During symbol reading, bad structure-type format.\n"
> ~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"
> =breakpoint-create,number="1"
> ^done
> (gdb)
> -interpreter-exec console list
> ~"734\t      catch_errors (captured_command_loop, 0, \"\", 
> RETURN_MASK_ALL);\n"
> ~"735\t    }\n"
> ~"736\t  /* No exit -- exit is through quit_command.  */\n"
> ~"737\t}\n"
> ~"738\t\n"
> ~"739\tint\n"
> ~"740\tmain (int argc, char **argv)\n"
> ~"741\t{\n"
> ~"742\t  struct captured_main_args args;\n"
> ~"743\t  args.argc = argc;\n"
> ^done
> (gdb)
>
> As you can see, all the output is properly encapsulated to allow for
> asynchronous event notifications. The next step will be to get native
> inferiors to do proper I/O encapsulation.
>
>> Maybe tell me off line what problems you were having, and I will see 
>> if
>> I remember what I did?
>
> I can certainly get it working, even though I think it is kinda messy. 
> I
> can even clean that up, but I had to ask: is it really worth it? Maybe 
> a
> maintainence command or something would be better? I just don't want to
> see it be too easy for someone to really screw himself up.
>
> (I'm glad I kept my patches for this lying around!)
>
> In any case, if that's what people want, I can certainly put it back in
> after the "initial" implementation is approved and checked into cvs.
>
> Keith
>
>
--
Jim Ingham                                   jingham@apple.com
Developer Tools - gdb
Apple Computer



More information about the Gdb mailing list