This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] -thread-info new command


On Wed, Apr 11, 2007 at 09:52:16AM +1200, Nick Roberts wrote:
>  > > 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.
> 
> We must be reading a different book:

Don't understand what you mean.

> /* Print a list of thread ids currently known, and the total number of
>    threads. To be used from within catch_errors. */

This comment is out of date.

> static int

This is the bit I was talking about, since catch_excepions_with_msg
requires it be "int" and not "enum gdb_rc".

> do_captured_list_thread_ids (struct ui_out *uiout, void *arg)
> {
>   ...
>   do_cleanups (cleanup_chain);
>   ui_out_field_int (uiout, "number-of-threads", num);
>   return GDB_RC_OK;
> }
> 
> I think your ChangeLog entry should have read:
> 
> 	* thread.c (gdb_list_thread_ids): Likewise.
> 	(gdb_thread_select): Likewise.

Yes, you're right.  Thanks.  I just fixed it.

(diff -p and my carelessness are to blame)

>  > 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.
> 
> It would also help stop bugs in front ends from being reported on the gdb
> mailing list.

Maybe - not if the front end didn't handle it...

-- 
Daniel Jacobowitz
CodeSourcery


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