Add xmlRegisters= to qSupported packet.

gdb/

2010-03-30  H.J. Lu  <hongjiu.lu@intel.com>

	* NEWS: Mention xmlRegisters= in qSupported packet.

	* i386-tdep.c: Include "remote.h".
	(_initialize_i386_tdep): Call register_remote_support_xml.

	* remote.c (remote_support_xml): New.
	(register_remote_support_xml): Likewise.
	(remote_query_supported_append): Likewise.
	(remote_query_supported): Support remote_support_xml.

	* remote.h (register_remote_support_xml): New.

gdb/doc/

2010-03-30  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.texinfo (General Query Packets): Add xmlRegisters.
This commit is contained in:
H.J. Lu 2010-03-30 15:45:16 +00:00
parent fe168a1980
commit c8d5aac9db
7 changed files with 143 additions and 61 deletions

View File

@ -1,3 +1,17 @@
2010-03-30 H.J. Lu <hongjiu.lu@intel.com>
* NEWS: Mention xmlRegisters= in qSupported packet.
* i386-tdep.c: Include "remote.h".
(_initialize_i386_tdep): Call register_remote_support_xml.
* remote.c (remote_support_xml): New.
(register_remote_support_xml): Likewise.
(remote_query_supported_append): Likewise.
(remote_query_supported): Support remote_support_xml.
* remote.h (register_remote_support_xml): New.
2010-03-29 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_find_line_command): Remove dead code.
@ -1033,23 +1047,23 @@
(gnu_v3_print_method_ptr): Use the physname for virtual methods
without a demangled name.
Print out type information for non-virtual methods.
* linespec.c (decode_line_1): Force ANY string using "::" (or
* linespec.c (decode_line_1): Force ANY string using "::" (or
"." for java) to use decode_compound, and clean up any stray quoting.
If we found a file symtab, re-evaluate whether the remainder is_quoted.
(decode_compound): Stop consuming at an open parenthesis.
Keep template parameters.
Keep any overload information.
Keep keywords like "const".
Remove paren_pointer.
Move is_quoted check from set_flags to here.
Remove #if 0 code from 2000. Ten years is long enough.
(find_method): Before comparing symbol names, canonicalize the string
from the user.
If a specific overload is requested, find it. Otherwise throw an error.
If we found a file symtab, re-evaluate whether the remainder is_quoted.
(decode_compound): Stop consuming at an open parenthesis.
Keep template parameters.
Keep any overload information.
Keep keywords like "const".
Remove paren_pointer.
Move is_quoted check from set_flags to here.
Remove #if 0 code from 2000. Ten years is long enough.
(find_method): Before comparing symbol names, canonicalize the string
from the user.
If a specific overload is requested, find it. Otherwise throw an error.
(find_method_overload_end): New function.
(set_flags): Remove.
(decode_compound): Assume that parentheses are matched.
It's a lot easier.
(decode_compound): Assume that parentheses are matched.
It's a lot easier.
* symtab.c (symbol_find_demangled_name): Add DMGL_VERBOSE flag
to cplus_demangle.
* linespec.c (decode_line_1): Keep important keywords like
@ -1214,7 +1228,7 @@
2010-03-07 Joel Brobecker <brobecker@adacore.com>
* remote.c (remote_get_ada_task_ptid): New function.
(init_remote_ops): Set remote_ops.to_get_ada_task_ptid.
(init_remote_ops): Set remote_ops.to_get_ada_task_ptid.
2010-03-06 Christopher Faylor <me+cygwin@cgf.cx>
@ -1307,7 +1321,7 @@
address as UnsignedLongLong, not LongLong.
2010-03-05 Kevin Buettner <kevinb@redhat.com>
Pedro Alves <pedro@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
* remote-mips.c (gdbthread.h): Include.
(remote_mips_ptid): Declare.
@ -1697,7 +1711,7 @@
GDB's gdbarch_addr_bit as size of values on the DWARF stack.
2010-02-26 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
Tom Tromey <tromey@redhat.com>
* python/py-type.c (typy_lookup_typename): Add in block argument.
If provided restrict lookup to specified blocks.
@ -2672,8 +2686,8 @@ Mon Feb 8 13:17:10 2010 Chris Moller <moller@mollerware.com>
2010-01-25 gingold <gingold@adacore.com>
* windows-nat.c (windows_continue): Use %x to print thread id.
(get_windows_debug_event): Ditto.
* windows-nat.c (windows_continue): Use %x to print thread id.
(get_windows_debug_event): Ditto.
2010-01-22 Tom Tromey <tromey@redhat.com>
@ -3704,7 +3718,7 @@ Mon Feb 8 13:17:10 2010 Chris Moller <moller@mollerware.com>
2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
and s390x-linux64.
(s390-linux32-expedite): Define.
(s390-linux64-expedite): Define.

View File

@ -3,6 +3,9 @@
*** Changes since GDB 7.1
* GDB now sends xmlRegisters= in qSupported packet to indicate that
it understands register description.
* The --batch flag now disables pagination and queries.
* X86 general purpose registers

View File

@ -1,3 +1,7 @@
2010-03-30 H.J. Lu <hongjiu.lu@intel.com>
* gdb.texinfo (General Query Packets): Add xmlRegisters.
2010-03-29 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
@ -16,8 +20,8 @@
2010-03-27 Matt Rice <ratmice@gmail.com>
* gdb.texinfo (ARM): Document arguments to "target sim".
(Set Catchpoints): Use @dots{} instead of @r{...}.
* gdb.texinfo (ARM): Document arguments to "target sim".
(Set Catchpoints): Use @dots{} instead of @r{...}.
2010-03-26 Pedro Alves <pedro@codesourcery.com>
@ -88,7 +92,7 @@
description to read_var text.
2010-02-26 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Types In Python): Describe block argument in
template_argument and gdb.lookup_type.
@ -362,7 +366,7 @@
2009-10-27 Tom Tromey <tromey@redhat.com>
Eli Zaretskii <eliz@gnu.org>
PR python/10781
PR python/10781
* gdb.texinfo (Values From Inferior): Document cast method.
@ -521,8 +525,8 @@
2009-08-05 Jeremy Bennett <jeremy.bennett@embecosm.com>
* gdb.texinfo (Separate Debug Files, Remote Protocol): Clarified
CRC definitions.
* gdb.texinfo (Separate Debug Files, Remote Protocol): Clarified
CRC definitions.
2009-08-03 Vladimir Prus <vladimir@codesourcery.com>
@ -714,7 +718,7 @@
Add index entries.
2009-04-30 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com>
Michael Snyder <msnyder@vmware.com>
* gdb.texinfo: (Process Record and Replay): Add documentation for
process record and replay.
@ -778,7 +782,7 @@
* gdb.texinfo (Source Path): Document --with-relocated-sources.
2009-04-18 Carlos O'Donell <carlos@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* Makefile.in (MAKEHTML): Set to makeinfo --html.
(MAKEHTMLFLAGS): Set to empty.
@ -1041,7 +1045,7 @@
* gdb.texinfo (Define, Hooks): Document prefix command support.
2009-01-14 Joseph Myers <joseph@codesourcery.com>
Carlos O'Donell <carlos@codesourcery.com>
Carlos O'Donell <carlos@codesourcery.com>
Fixes for makeinfo --html.
@ -1106,24 +1110,24 @@
MI non-stop and multiprocess docs.
* gdb.texinfo (GDB/MI): New section 'GDB/MI General Design'
(GDB/MI Output Records): New section 'GDB/MI Frame Information'
Adjust documentation for *stopped, document =thread-created,
=thread-exited, =thread-group-created and =thread-group-exited.
(GDB/MI Thread Commands): Document the 'state' field in
-thread-info output.
(GDB/MI Program Execution): Mention --all and --thread-group
options.
(GDB/MI Variable Objects): Describe floating and fixed variable
objects.
(GDB/MI Miscellaneous Commands): Document -list-thread-groups.
* gdb.texinfo (GDB/MI): New section 'GDB/MI General Design'
(GDB/MI Output Records): New section 'GDB/MI Frame Information'
Adjust documentation for *stopped, document =thread-created,
=thread-exited, =thread-group-created and =thread-group-exited.
(GDB/MI Thread Commands): Document the 'state' field in
-thread-info output.
(GDB/MI Program Execution): Mention --all and --thread-group
options.
(GDB/MI Variable Objects): Describe floating and fixed variable
objects.
(GDB/MI Miscellaneous Commands): Document -list-thread-groups.
2008-12-02 Vladimir Prus <vladimir@codesourcery.com>
* gdb.texinfo (Operating System Information): New appendix.
(Operating System Auxiliary Information): Document 'info os processes'
(Remote Configuration): Document 'osdata'
(General Query Packets): Document qXfer:osdata:read.
* gdb.texinfo (Operating System Information): New appendix.
(Operating System Auxiliary Information): Document 'info os processes'
(Remote Configuration): Document 'osdata'
(General Query Packets): Document qXfer:osdata:read.
2008-11-27 Tristan Gingold <gingold@adacore.com>
@ -1152,11 +1156,11 @@
2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
* gdb.texinfo (GDB/MI Async Records): Document
=thread-selected.
=thread-selected.
2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
* observer.texi (new_inferior, inferior_exit): New observers.
* observer.texi (new_inferior, inferior_exit): New observers.
2008-10-27 Pedro Alves <pedro@codesourcery.com>
@ -1278,12 +1282,12 @@
2008-08-20 Vladimir Prus <vladimir@codesourcery.com>
* gdb.textinfo (GDB/MI Miscellaneous Commands): Use @table
for possible features of -list-features.
* gdb.textinfo (GDB/MI Miscellaneous Commands): Use @table
for possible features of -list-features.
2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
* gdb.texinfo (Background execution): Adjust example
* gdb.texinfo (Background execution): Adjust example
(GDB/MI Miscellaneous Commands): Document -list-target-features.
2008-08-19 Vladimir Prus <vladimir@codesourcery.com>

View File

@ -30633,6 +30633,12 @@ extensions to the remote protocol. @value{GDBN} does not use such
extensions unless the stub also reports that it supports them by
including @samp{multiprocess+} in its @samp{qSupported} reply.
@xref{multiprocess extensions}, for details.
@item xmlRegisters
This feature indicates that @value{GDBN} supports the XML target
description. If the stub sees @samp{xmlRegisters=} with target
specific strings separated by a comma, it will report register
description.
@end table
Stubs should ignore any unknown values for

View File

@ -44,6 +44,7 @@
#include "value.h"
#include "dis-asm.h"
#include "disasm.h"
#include "remote.h"
#include "gdb_assert.h"
#include "gdb_string.h"
@ -6000,4 +6001,7 @@ is \"default\"."),
/* Initialize the standard target descriptions. */
initialize_tdesc_i386 ();
/* Tell remote stub that we support XML target description. */
register_remote_support_xml ("i386");
}

View File

@ -3467,6 +3467,53 @@ static struct protocol_feature remote_protocol_features[] = {
PACKET_TracepointSource },
};
static char *remote_support_xml;
/* Register string appended to "xmlRegisters=" in qSupported query. */
void
register_remote_support_xml (const char *xml ATTRIBUTE_UNUSED)
{
#if defined(HAVE_LIBEXPAT)
if (remote_support_xml == NULL)
remote_support_xml = concat ("xmlRegisters=", xml, NULL);
else
{
char *copy = xstrdup (remote_support_xml + 13);
char *p = strtok (copy, ",");
do
{
if (strcmp (p, xml) == 0)
{
/* already there */
xfree (copy);
return;
}
}
while ((p = strtok (NULL, ",")) != NULL);
xfree (copy);
p = concat (remote_support_xml, ",", xml, NULL);
xfree (remote_support_xml);
remote_support_xml = p;
}
#endif
}
static char *
remote_query_supported_append (char *msg, const char *append)
{
if (msg)
{
char *p = concat (msg, ";", append, NULL);
xfree (msg);
return p;
}
else
return xstrdup (append);
}
static void
remote_query_supported (void)
{
@ -3485,24 +3532,27 @@ remote_query_supported (void)
rs->buf[0] = 0;
if (remote_protocol_packets[PACKET_qSupported].support != PACKET_DISABLE)
{
char *q = NULL;
const char *qsupported = gdbarch_qsupported (target_gdbarch);
if (rs->extended)
q = remote_query_supported_append (q, "multiprocess+");
if (qsupported)
q = remote_query_supported_append (q, qsupported);
if (remote_support_xml)
q = remote_query_supported_append (q, remote_support_xml);
if (q)
{
char *q;
if (rs->extended)
q = concat ("qSupported:multiprocess+;", qsupported, NULL);
else
q = concat ("qSupported:", qsupported, NULL);
putpkt (q);
char *p = concat ("qSupported:", q, NULL);
xfree (q);
putpkt (p);
xfree (p);
}
else
{
if (rs->extended)
putpkt ("qSupported:multiprocess+");
else
putpkt ("qSupported");
}
putpkt ("qSupported");
getpkt (&rs->buf, &rs->buf_size, 0);

View File

@ -66,6 +66,7 @@ extern void (*deprecated_target_wait_loop_hook) (void);
void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
const struct target_desc *tdesc);
void register_remote_support_xml (const char *);
void remote_file_put (const char *local_file, const char *remote_file,
int from_tty);