diff options
author | Ian Thompson <ianst@cadence.com> | 2022-07-10 17:14:10 -0700 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2022-08-15 13:23:05 +0000 |
commit | 48db36f436fe212fdda8d3fb7f79db43d9a2aa99 (patch) | |
tree | 1e59b50598f89f22a25bd69ae3c3c05248845ea5 /src/server | |
parent | d9b2607ca094898d8d7180085a913e8a5b46ecac (diff) | |
download | riscv-openocd-48db36f436fe212fdda8d3fb7f79db43d9a2aa99.zip riscv-openocd-48db36f436fe212fdda8d3fb7f79db43d9a2aa99.tar.gz riscv-openocd-48db36f436fe212fdda8d3fb7f79db43d9a2aa99.tar.bz2 |
gdb_server: custom target-specific GDB queries
Provide a customizable hook for handling target-specific GDB queries
Valgrind-clean, no new Clang analyzer warnings
Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I684a259ed29f3651cbce668101cff421e522f79e
Reviewed-on: https://review.openocd.org/c/openocd/+/7082
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 3052d0a..1e50b43 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2965,6 +2965,11 @@ static int gdb_query_packet(struct connection *connection, gdb_connection->noack_mode = 1; gdb_put_packet(connection, "OK", 2); return ERROR_OK; + } else if (target->type->gdb_query_custom) { + char *buffer = NULL; + int ret = target->type->gdb_query_custom(target, packet, &buffer); + gdb_put_packet(connection, buffer, strlen(buffer)); + return ret; } gdb_put_packet(connection, "", 0); |