diff options
author | Christian Eggers <ceggers@gmx.de> | 2014-02-14 21:48:52 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2014-03-04 20:17:34 +0000 |
commit | 9b2577742cc49683ab0ea8506d93e3e285b53bbd (patch) | |
tree | 6e9bcaf54e5ea440d87c37eb8b15ce1f3bfe5e95 /src/rtos/rtos.c | |
parent | 537b06a810778995d7f79d9120f4063f33dee635 (diff) | |
download | riscv-openocd-9b2577742cc49683ab0ea8506d93e3e285b53bbd.zip riscv-openocd-9b2577742cc49683ab0ea8506d93e3e285b53bbd.tar.gz riscv-openocd-9b2577742cc49683ab0ea8506d93e3e285b53bbd.tar.bz2 |
Constify received GDB packet
v2:
- Split work into separate patches
The received packet will not be altered in any of the processing functions.
Some it can be made "const".
Change-Id: I7bb410224cf6daa74a6c494624176ccb9ae638ac
Signed-off-by: Christian Eggers <ceggers@gmx.de>
Reviewed-on: http://openocd.zylin.com/1919
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/rtos/rtos.c')
-rw-r--r-- | src/rtos/rtos.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index e9a17ea..1cb6958 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -46,7 +46,7 @@ static struct rtos_type *rtos_types[] = { NULL }; -int rtos_thread_packet(struct connection *connection, char *packet, int packet_size); +int rtos_thread_packet(struct connection *connection, const char *packet, int packet_size); int rtos_smp_init(struct target *target) { @@ -138,7 +138,7 @@ int rtos_create(Jim_GetOptInfo *goi, struct target *target) return JIM_ERR; } -int gdb_thread_packet(struct connection *connection, char *packet, int packet_size) +int gdb_thread_packet(struct connection *connection, char const *packet, int packet_size) { struct target *target = get_target_from_connection(connection); if (target->rtos == NULL) @@ -186,7 +186,7 @@ static char *next_symbol(struct rtos *os, char *cur_symbol, uint64_t cur_addr) * * rtos_qsymbol() returns 1 if an RTOS has been detected, or 0 otherwise. */ -int rtos_qsymbol(struct connection *connection, char *packet, int packet_size) +int rtos_qsymbol(struct connection *connection, char const *packet, int packet_size) { int rtos_detected = 0; uint64_t addr = 0; @@ -254,7 +254,7 @@ done: return rtos_detected; } -int rtos_thread_packet(struct connection *connection, char *packet, int packet_size) +int rtos_thread_packet(struct connection *connection, char const *packet, int packet_size) { struct target *target = get_target_from_connection(connection); |