From: George Anzinger <george@mvista.com>
To: Daniel Jacobowitz <drow@mvista.com>, gdb@sources.redhat.com
Subject: Re: Making "info thread" sane
Date: Tue, 02 Mar 2004 23:15:00 -0000 [thread overview]
Message-ID: <404515AA.8040709@mvista.com> (raw)
In-Reply-To: <20040302221718.GA26931@nevyn.them.org>
Change the topic to make more sense and include the list...
Daniel Jacobowitz wrote:
> On Tue, Mar 02, 2004 at 02:14:33PM -0800, George Anzinger wrote:
>
>>Daniel Jacobowitz wrote:
>>
>>>On Tue, Mar 02, 2004 at 01:38:38PM -0800, George Anzinger wrote:
>>>
>>>
>>>>A new "set thread_level" command that would take the "bt" level to
>>>>use on the thread display. A new "set thread_limits command that
>>>>would take two expressions that would reduce to two memory addresses.
>>>>
>>>>Which ever of these is entered last will be active and used by "info
>>>>thread" as follows:
>>>>
>>>>if thread_level is active gdb will do the indicated number of "up"
>>>>operations and display the result on the info thread line for that thread
>>>>(note there is other info on this line that will not be changed).
>>>>
>>>>if thread_limits is active gdb will do 0 or more "up" commands until the
>>>>resultant PC is NOT between the given limits.
>>>>
>>>>The kernel, at this time, has defined symbols for the thread_limits
>>>>command (it is used in the kernel for its internal display of threads).
>>>>I would expect that the thread_level version would be the answer for
>>>>theaded application programs.
>>>>
>>>>Daniel, how does this sound?
>>>
>>>
>>>I really don't have time to work on this sort of thing, unfortunately.
>>
>>I was thinking of doing the code....
>>
>>
>>>But I think it sounds terribly awkward :) What you want is a generic,
>>>target specific way to specify the default current frame after the
>>>target stops. The right way to do that may be with kgdb-specific
>>>extensions to GDB, or not. Someone on the GDB list might have
>>>comments.
>>
>>I would think that the problem of all threads being in the context switch
>>code would be much more generic than just kgdb.
>>
>>As to how to set this up, I would like to see a way for stubs to query gdb
>>as gdb querys stubs (although the "try this, did it fail" method is a bit
>>limited in what it can do). Possibly a gdb request of the stub such as
>>"tell me about your self" which is replied with by a set of couplets
>>indicating what commands the sub can do and other useful info. This
>>becomes a bit more of a problem when there is no stub, but I suppose gdb is
>>configured to handle this sort of thing.
>
>
> None of this should be specific to the remote protocol at all. This is
> the same thing we do in C++; you say "catch throw", and what you really
> want to see is one frame up from where we hit the utility function. In
> that sense, it needs to be more general. And context-sensitive.
>
> But the question of where to make this decision - I don't think the
> stub should be involved at all.
Well my origional suggestion was to set it up using set commands, i.e. most
likely in the users .gdbinit file. But I really do think the stub has a more
detailed knowledge of what is up. For example, if the stub is kgdb, i.e. the
kernel, or a gdb stub in a target machines user space, doesn't gdb see the same
thing? And these two environments should really be treated differently WRT how
far back to take the thead.
Another thought is to provide entry points in the target that define the area
that needs to be backed out of. Gdb already knows about the alloc entry point
so this is not too far fetched. Something like:
gdb_thread_switch_begin and gdb_thread_switch_end
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
next parent reply other threads:[~2004-03-02 23:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040227212301.GC1052@smtp.west.cox.net>
[not found] ` <20040227235059.GG425@elf.ucw.cz>
[not found] ` <403FEA02.6040506@mvista.com>
[not found] ` <200403011454.35346.amitkale@emsyssoft.com>
[not found] ` <4044FEDE.5000105@mvista.com>
[not found] ` <20040302214535.GA24405@nevyn.them.org>
[not found] ` <40450749.7020304@mvista.com>
[not found] ` <20040302221718.GA26931@nevyn.them.org>
2004-03-02 23:15 ` George Anzinger [this message]
2004-03-02 23:25 ` Andrew Cagney
2004-03-03 0:14 ` George Anzinger
2004-03-03 6:01 ` Eli Zaretskii
2004-03-03 14:28 ` Daniel Jacobowitz
2004-03-03 15:08 ` Andrew Cagney
2004-03-03 18:40 ` George Anzinger
2004-03-03 18:54 ` Andrew Cagney
2004-03-03 22:04 ` George Anzinger
2004-03-09 1:25 ` Andrew Cagney
2004-03-12 0:24 ` George Anzinger
2004-03-12 21:33 ` Andrew Cagney
2004-03-22 9:40 ` George Anzinger
2004-04-21 1:30 ` George Anzinger
2004-03-08 19:21 Jim Houston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=404515AA.8040709@mvista.com \
--to=george@mvista.com \
--cc=drow@mvista.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox