diff options
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); |