diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-02-03 16:43:02 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-02-03 16:43:02 +0000 |
commit | 1738d37d5b227a44fef316fbf306fb0d4bde0cf6 (patch) | |
tree | 617e76a7f83b0ed158bc7c645f5a36a4abcca616 /gdb/remote.c | |
parent | f70ba5ba8973067f955ed16ce832920b59b980db (diff) | |
download | gdb-1738d37d5b227a44fef316fbf306fb0d4bde0cf6.tar.gz |
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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index bf7568cb4d5..2c3dfdb600d 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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); |