aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-03-26 13:11:18 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-03-26 13:11:18 +0000
commit2ef80e14d526f50c4b751d1f15b5ca450d7f997f (patch)
tree4b086bca1c530b8336b97e6f2485d390d3789f8e /gdbstub.c
parentd37bfe142382fa8258531c47b4519387c77cd169 (diff)
parentc99ef792dc9ec6d8a5061428faf396ea9ceb8f57 (diff)
downloadqemu-2ef80e14d526f50c4b751d1f15b5ca450d7f997f.zip
qemu-2ef80e14d526f50c4b751d1f15b5ca450d7f997f.tar.gz
qemu-2ef80e14d526f50c4b751d1f15b5ca450d7f997f.tar.bz2
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190326' into staging
target-arm queue: * Set SIMDMISC and FPMISC for 32-bit -cpu max (fixes regression from 3.1) * fix vCont packet handling when no thread is specified # gpg: Signature made Tue 26 Mar 2019 13:09:48 GMT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20190326: gdbstub: fix vCont packet handling when no thread is specified target/arm: Set SIMDMISC and FPMISC for 32-bit -cpu max Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdbstub.c b/gdbstub.c
index bc774ae..d54abd1 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1152,6 +1152,7 @@ static int gdb_handle_vcont(GDBState *s, const char *p)
uint32_t pid, tid;
GDBProcess *process;
CPUState *cpu;
+ GDBThreadIdKind kind;
#ifdef CONFIG_USER_ONLY
int max_cpus = 1; /* global variable max_cpus exists only in system mode */
@@ -1194,12 +1195,21 @@ static int gdb_handle_vcont(GDBState *s, const char *p)
goto out;
}
- if (*p++ != ':') {
+ if (*p == '\0' || *p == ';') {
+ /*
+ * No thread specifier, action is on "all threads". The
+ * specification is unclear regarding the process to act on. We
+ * choose all processes.
+ */
+ kind = GDB_ALL_PROCESSES;
+ } else if (*p++ == ':') {
+ kind = read_thread_id(p, &p, &pid, &tid);
+ } else {
res = -ENOTSUP;
goto out;
}
- switch (read_thread_id(p, &p, &pid, &tid)) {
+ switch (kind) {
case GDB_READ_THREAD_ERR:
res = -EINVAL;
goto out;