This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Implement -thread-info.
On Monday 18 February 2008 09:25:29 Nick Roberts wrote:
> > Presently, the MI -thread-info and -thread-list-all-threads
> > commands are not implemented, so a frontend wishing to know
> > the state of all threads upon stop is required to manually iterate
> > over threads, or use CLI. This patch implements -thread-info,
> > that prints essentially the same information as 'info thread' in CLI.
> > The new command can either print information for all threads, or
> > for a specific one provided as argument, making -thread-list-all-threads
> > not necessary.
>
> mi_info_threads is nearly the same function as thread_command.
You probably meant info_threads_command?
> Can this be
> used in a dual way just as -break-list uses breakpoint_1?
I don't know -- I actually have no idea what magic makes breakpoint_1 to
work both for MI and CLI. Do you happen to know?
> Also Denis Pilat has already proposed a patch for -thread-info:
> http://sourceware.org/ml/gdb-patches/2007-03/msg00167.html
I did not notice that.
>
> How does your patch compare? (assuming the problem of return type is solved
> as has been done for thread_select).
It appears that my patch:
1. Does not bother with making non-throwing function, as MI top-level can
handle exceptions.
2. Allows to print information about all threads.
I don't know what problem of return type you refer to -- can you clarify?
- Volodya