This is an automated email from Gerrit. Zied Guermazi ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1432
-- gerrit commit 7f1de157f235d3a4396b6055b1233a20668f3301 Author: Zied Guermazi <[email protected]> Date: Sun Jun 2 22:21:20 2013 +0200 in case an RTOS is specified, give back an empty list of threads by doing this GDB holds its awarness of multithreading Change-Id: I7870a5db1090c786f306db16a25871e69b8a9760 Signed-off-by: Zied Guermazi <[email protected]> diff --git a/src/jtag/drivers/libusb1_common.c b/src/jtag/drivers/libusb1_common.c index 888420a..bec9cb4 100644 --- a/src/jtag/drivers/libusb1_common.c +++ b/src/jtag/drivers/libusb1_common.c @@ -26,7 +26,7 @@ #include "libusb1_common.h" static struct libusb_context *jtag_libusb_context; /**< Libusb context **/ -static libusb_device **devs; /**< The usb device list **/ +static jtag_libusb_device **devs; /**< The usb device list **/ static bool jtag_libusb_match(struct jtag_libusb_device *dev, const uint16_t vids[], const uint16_t pids[]) diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 73ab840..b476f8b 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -327,19 +327,22 @@ int rtos_thread_packet(struct connection *connection, char *packet, int packet_s return ERROR_OK; } else if (strncmp(packet, "qfThreadInfo", 12) == 0) { int i; - if ((target->rtos != NULL) && (target->rtos->thread_count != 0)) { - - char *out_str = (char *) malloc(17 * target->rtos->thread_count + 5); - char *tmp_str = out_str; - tmp_str += sprintf(tmp_str, "m"); - for (i = 0; i < target->rtos->thread_count; i++) { - if (i != 0) - tmp_str += sprintf(tmp_str, ","); - tmp_str += sprintf(tmp_str, "%016" PRIx64, - target->rtos->thread_details[i].threadid); + if (target->rtos != NULL) { + if (target->rtos->thread_count == 0) { + gdb_put_packet(connection, "l", 1); + } else{ + char *out_str = (char *) malloc(17 * target->rtos->thread_count + 5); + char *tmp_str = out_str; + tmp_str += sprintf(tmp_str, "m"); + for (i = 0; i < target->rtos->thread_count; i++) { + if (i != 0) + tmp_str += sprintf(tmp_str, ","); + tmp_str += sprintf(tmp_str, "%016" PRIx64, + target->rtos->thread_details[i].threadid); + } + tmp_str[0] = 0; + gdb_put_packet(connection, out_str, strlen(out_str)); } - tmp_str[0] = 0; - gdb_put_packet(connection, out_str, strlen(out_str)); } else gdb_put_packet(connection, "", 0); -- ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
