aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/rtos.c
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-09-14 13:04:39 -0700
committerTim Newsome <tim@sifive.com>2023-09-27 13:52:11 -0700
commit15f399691eff62da2039fb01abeb64f567d04bbd (patch)
treecf7b5556f9404b829a581bcd5b23dae352b3e08d /src/rtos/rtos.c
parentb5e57e1894727abbef075c0f15e8a15a0a7f3c25 (diff)
downloadriscv-openocd-15f399691eff62da2039fb01abeb64f567d04bbd.zip
riscv-openocd-15f399691eff62da2039fb01abeb64f567d04bbd.tar.gz
riscv-openocd-15f399691eff62da2039fb01abeb64f567d04bbd.tar.bz2
gdb_server,rtos: Differentiate rtos_get_gdb_reg failing and not implemented
If it fails, then pass that failure on. If it's simply not implemented, then we can fall through and try target_get_gdb_reg_list_noread(). This difference matters when the target representing the current hwthread is unavailable, but the target that is linked to the gdb connection is available. In that case we want the operation to return an error to gdb, instead of reading the register from the target that is available. Change-Id: I9c84ca556f818c5580e25ab349a34a226fcf0f43 Signed-off-by: Tim Newsome <tim@sifive.com>
Diffstat (limited to 'src/rtos/rtos.c')
-rw-r--r--src/rtos/rtos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 8bfe3d5..87d23f9 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -591,7 +591,7 @@ int rtos_get_gdb_reg(struct connection *connection, int reg_num)
free(reg_list);
}
- return ERROR_FAIL;
+ return ERROR_NOT_IMPLEMENTED;
}
/** Return a list of general registers. */