This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] "info threads" queries for remote.c
- To: Michael Snyder <msnyder at cygnus dot com>
- Subject: Re: [PATCH] "info threads" queries for remote.c
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 21 Mar 2000 15:26:42 +1100
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200003202314.PAA07877@cleaver.cygnus.com>
Michael Snyder wrote:
> I've checked in the attached patch to remote.c; it cleans up some
> previous remote protocol code for asking the target for a list of
> active threads, and adds a new (optional) query to ask the target
> for a descriptive string for each thread.
> The idea for this descriptive string is that the target OS can give
> any info that the target implementer thinks is important (thread
> attributes, name, state, etc.) and GDB will print the string in the
> "info threads" display.
> For the thread id query, since we can't know in advance whether the
> thread list will fit into a single packet, the query is designed to
> be iterative. GDB will keep asking until the target says "no more".
> + /* Should we try the 'ThreadInfo' query packet?
> + This variable (NOT available to the user: auto-detect only!)
> + determines whether GDB will use the new, simpler "ThreadInfo"
> + query or the older, more complex syntax for thread queries.
> + This is an auto-detect variable (set to true at each connect,
> + and set to false when the target fails to recognize it). */
> + static int use_threadinfo_query;
> + static int use_threadextra_query;
I'll need to rewrite this so that the remote ``set remote ...-packet''
commands can be used to override the auto-configure defaults.
We're guarenteed to encounter targets that either have broken
implementations or implementations that mis-respond to such a request.