diff options
author | Steven Stallion <stallion@squareup.com> | 2016-07-20 14:05:12 -0500 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2016-08-14 01:38:12 +0100 |
commit | f4dfa3b0d0abac55b7c60d333018d53d09b21bef (patch) | |
tree | 90a5990e3f85f7b4ee6076940eb4a8ac1845dd1d /src/rtos/rtos.c | |
parent | 4c670b9d6498b944c70e5a314c3057202fd89ff6 (diff) | |
download | riscv-openocd-f4dfa3b0d0abac55b7c60d333018d53d09b21bef.zip riscv-openocd-f4dfa3b0d0abac55b7c60d333018d53d09b21bef.tar.gz riscv-openocd-f4dfa3b0d0abac55b7c60d333018d53d09b21bef.tar.bz2 |
rtos: remove display_str member
This patch removes the display_str member in the thread_detail struct.
This member was not being used and provides no additional benefit over
the thread_name_str and extra_info_str members. This change is made in
preparation of support for the qXfer:threads:read packet, which will
modernize how thread information is shared with GDB.
Change-Id: I1f8bc6325e6aa790e02ea6caee9d6f44c5fedf36
Signed-off-by: Steven Stallion <stallion@squareup.com>
Reviewed-on: http://openocd.zylin.com/3558
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/rtos/rtos.c')
-rw-r--r-- | src/rtos/rtos.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 8f50b49..4c99ad2 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -296,28 +296,20 @@ int rtos_thread_packet(struct connection *connection, char const *packet, int pa struct thread_detail *detail = &target->rtos->thread_details[found]; int str_size = 0; - if (detail->display_str != NULL) - str_size += strlen(detail->display_str); if (detail->thread_name_str != NULL) str_size += strlen(detail->thread_name_str); if (detail->extra_info_str != NULL) str_size += strlen(detail->extra_info_str); - char *tmp_str = calloc(str_size + 7, sizeof(char)); + char *tmp_str = calloc(str_size + 4, sizeof(char)); char *tmp_str_ptr = tmp_str; - if (detail->display_str != NULL) - tmp_str_ptr += sprintf(tmp_str_ptr, "%s", detail->display_str); - if (detail->thread_name_str != NULL) { - if (tmp_str_ptr != tmp_str) - tmp_str_ptr += sprintf(tmp_str_ptr, " : "); + if (detail->thread_name_str != NULL) tmp_str_ptr += sprintf(tmp_str_ptr, "%s", detail->thread_name_str); - } if (detail->extra_info_str != NULL) { if (tmp_str_ptr != tmp_str) tmp_str_ptr += sprintf(tmp_str_ptr, " : "); - tmp_str_ptr += - sprintf(tmp_str_ptr, " : %s", detail->extra_info_str); + tmp_str_ptr += sprintf(tmp_str_ptr, "%s", detail->extra_info_str); } assert(strlen(tmp_str) == @@ -545,7 +537,6 @@ void rtos_free_threadlist(struct rtos *rtos) for (j = 0; j < rtos->thread_count; j++) { struct thread_detail *current_thread = &rtos->thread_details[j]; - free(current_thread->display_str); free(current_thread->thread_name_str); free(current_thread->extra_info_str); } |