diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-02-03 16:43:03 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-02-03 16:43:03 +0000 |
commit | 75cebea968bbac3e5dccd256de4de0e8305990d0 (patch) | |
tree | f6f23162029513153a111d36fd8c13c1e0d3b99b /gdb/remote.c | |
parent | c1dec97bf174ee0e1f1e96e53d34a78b4a2d9a6a (diff) | |
download | gdb-75cebea968bbac3e5dccd256de4de0e8305990d0.zip gdb-75cebea968bbac3e5dccd256de4de0e8305990d0.tar.gz gdb-75cebea968bbac3e5dccd256de4de0e8305990d0.tar.bz2 |
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 bf7568c..2c3dfdb 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); |