Add qsupported to gdbarch.

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

	* gdbarch.sh: Add qsupported.

	* gdbarch.c: Regenerated.
	* gdbarch.h: Likewise.

	* remote.c (remote_state): Add gdbarch.
	(init_remote_state): Set gdbarch.
	(remote_query_supported): Support gdbarch_qsupported.
This commit is contained in:
H.J. Lu
2010-02-03 16:43:03 +00:00
parent c1dec97bf1
commit 75cebea968
5 changed files with 65 additions and 3 deletions

View File

@@ -327,6 +327,9 @@ struct remote_state
/* Nonzero if the user has pressed Ctrl-C, but the target hasn't
responded to that. */
int ctrlc_pending_p;
/* GDBARCH associated with this target. */
struct gdbarch *gdbarch;
};
/* Private data that we'll store in (struct thread_info)->private. */
@@ -566,6 +569,9 @@ init_remote_state (struct gdbarch *gdbarch)
rs->buf = xrealloc (rs->buf, rs->buf_size);
}
/* Record our GDBARCH. */
rs->gdbarch = gdbarch;
return rsa;
}
@@ -3475,10 +3481,24 @@ remote_query_supported (void)
rs->buf[0] = 0;
if (remote_protocol_packets[PACKET_qSupported].support != PACKET_DISABLE)
{
if (rs->extended)
putpkt ("qSupported:multiprocess+");
const char *qsupported = gdbarch_qsupported (rs->gdbarch);
if (qsupported)
{
char *q;
if (rs->extended)
q = concat ("qSupported:multiprocess+;", qsupported, NULL);
else
q = concat ("qSupported:", qsupported, NULL);
putpkt (q);
xfree (q);
}
else
putpkt ("qSupported");
{
if (rs->extended)
putpkt ("qSupported:multiprocess+");
else
putpkt ("qSupported");
}
getpkt (&rs->buf, &rs->buf_size, 0);