This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Implement -thread-info.
On Fri, Mar 14, 2008 at 08:03:47PM +0300, Vladimir Prus wrote:
> > Oh, one other thing. I went back to look at Denis's patches. He made
> > -thread-info without an argument describe the current thread only.
> > Doesn't that seem useful, especially before we get notifications
> > completely hammered out? I do not see any other MI command that
> > reports the current thread.
> >
> > So that would mean we needed -thread-list-all-threads back again.
>
> Hmm, I'd rather not. Currently, the current thread is reported by
> *stopped, and is not supposed to randomly change -- because the
> target is fully stopped while frontend talks with gdb. Therefore,
> using -thread-info as a roundabout way to get the current thread
> does not really give you anything.
>
> For non-stop mode, I have long and evil plans that I'll post soon,
> but they don't require this either.
I find it strange that -thread-info gives information about multiple
threads, myself. But this isn't worth arguing about; we'll do it
your way.
> +@{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)",
> + frame=@{addr="0x0804891f",func="foo",args=[@{name="i",value="10"@}],
> + file="/tmp/a.c",fullname="/tmp/a.c",line="158"@}@}],
If we're adding the level then please update the example.
> /* That switch put us at the top of the stack (leaf frame). */
> switch_to_thread (tp->ptid);
> - print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
> + print_stack_frame (get_selected_frame (NULL), 1, LOCATION);
mi_like_p? This will print out the #0 in the CLI too.
Otherwise OK.
--
Daniel Jacobowitz
CodeSourcery