Re: [RFC] -thread-info new command

Daniel Jacobowitz
2007-04-10T14:53:59Z

On Wed, Mar 28, 2007 at 09:33:52AM +1200, Nick Roberts wrote:
> > Once upon a time there were supposed to be more things using "libgdb"
> > - these gdb_* wrapper functions. It didn't come to pass.
>
> I thought the gdb_* wrapper function were just designed to catch exceptions.

They were designed to isolate users of libgdb from GDB's internal
exception handling mechanism, which is basically the same thing.

> Does your statement defeat the logic of my suggestion?

Honestly, I'm not sure. I looked at your patch again; I don't think I
understand why you want to change gdb_breakpoint.

> > 2007-03-27 Daniel Jacobowitz <dan@codesourcery.com>
> >
> > * breakpoint.c (gdb_breakpoint_query): Really return an
> > enum gdb_rc.
> > (gdb_breakpoint): Likewise.
> > * thread.c (do_captured_list_thread_ids): Likewise.
> > (do_captured_thread_select): Likewise.
> > * mi/mi-main.c (mi_cmd_thread_select): Expect an enum gdb_rc.
> > (mi_cmd_thread_list_ids): Remove bogus initialization.
>
> I think that the do_captured_* functions should have return type enum gdb_rc
> not int.

Yes, it would be nice - but unfortunately they can't, since
catch_exceptions_with_msg requires the function to return an int. So
I checked it in the way it is. We need to cut down on the number of
exception handling interfaces, but I'm not going to tackle that one
today!

> More generally though, re my patch, does make_cleaunp work on
> deprecated_set_gdb_event_hooks? Do you think it's a good idea to distinguish
> between user errors, e.g, "No stack." and front end errors, e.g,
> "-var-delete: Usage: [-c] EXPRESSION."?

It would be nice if front ends could separately detect "the front end
has done something silly" -I do not think it's a big deal, but it
might make correct front ends easier to write, and that would help
everybody.

--
Daniel Jacobowitz
CodeSourcery