projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM v4/v5 target files: mrc and mcr help information is incorrect.
[fw/openocd]
/
src
/
rtos
/
rtos.c
diff --git
a/src/rtos/rtos.c
b/src/rtos/rtos.c
index 00025abeef83c0222856b2666cd260aef538d774..28bbe5ee169072668bc4e1b62c6e8ea243c04ca3 100644
(file)
--- a/
src/rtos/rtos.c
+++ b/
src/rtos/rtos.c
@@
-244,7
+244,7
@@
int rtos_thread_packet(struct connection *connection, char *packet, int packet_s
{
struct target *target = get_target_from_connection(connection);
{
struct target *target = get_target_from_connection(connection);
- if (str
str(packet, "qThreadExtraInfo,")
) {
+ if (str
ncmp(packet, "qThreadExtraInfo,", 17) == 0
) {
if ((target->rtos != NULL) && (target->rtos->thread_details != NULL) &&
(target->rtos->thread_count != 0)) {
threadid_t threadid = 0;
if ((target->rtos != NULL) && (target->rtos->thread_details != NULL) &&
(target->rtos->thread_count != 0)) {
threadid_t threadid = 0;
@@
-306,14
+306,14
@@
int rtos_thread_packet(struct connection *connection, char *packet, int packet_s
}
gdb_put_packet(connection, "", 0);
return ERROR_OK;
}
gdb_put_packet(connection, "", 0);
return ERROR_OK;
- } else if (str
str(packet, "qSymbol")
) {
+ } else if (str
ncmp(packet, "qSymbol", 7) == 0
) {
if (rtos_qsymbol(connection, packet, packet_size) == 1) {
target->rtos_auto_detect = false;
target->rtos->type->create(target);
target->rtos->type->update_threads(target->rtos);
}
return ERROR_OK;
if (rtos_qsymbol(connection, packet, packet_size) == 1) {
target->rtos_auto_detect = false;
target->rtos->type->create(target);
target->rtos->type->update_threads(target->rtos);
}
return ERROR_OK;
- } else if (str
str(packet, "qfThreadInfo")
) {
+ } else if (str
ncmp(packet, "qfThreadInfo", 12) == 0
) {
int i;
if ((target->rtos != NULL) && (target->rtos->thread_count != 0)) {
int i;
if ((target->rtos != NULL) && (target->rtos->thread_count != 0)) {
@@
-332,17
+332,21
@@
int rtos_thread_packet(struct connection *connection, char *packet, int packet_s
gdb_put_packet(connection, "", 0);
return ERROR_OK;
gdb_put_packet(connection, "", 0);
return ERROR_OK;
- } else if (str
str(packet, "qsThreadInfo")
) {
+ } else if (str
ncmp(packet, "qsThreadInfo", 12) == 0
) {
gdb_put_packet(connection, "l", 1);
return ERROR_OK;
gdb_put_packet(connection, "l", 1);
return ERROR_OK;
- } else if (str
str(packet, "qAttached")
) {
+ } else if (str
ncmp(packet, "qAttached", 9) == 0
) {
gdb_put_packet(connection, "1", 1);
return ERROR_OK;
gdb_put_packet(connection, "1", 1);
return ERROR_OK;
- } else if (str
str(packet, "qOffsets")
) {
+ } else if (str
ncmp(packet, "qOffsets", 8) == 0
) {
char offsets[] = "Text=0;Data=0;Bss=0";
gdb_put_packet(connection, offsets, sizeof(offsets)-1);
return ERROR_OK;
char offsets[] = "Text=0;Data=0;Bss=0";
gdb_put_packet(connection, offsets, sizeof(offsets)-1);
return ERROR_OK;
- } else if (strstr(packet, "qC")) {
+ } else if (strncmp(packet, "qCRC:", 5) == 0) {
+ /* make sure we check this before "qC" packet below
+ * otherwise it gets incorrectly handled */
+ return GDB_THREAD_PACKET_NOT_CONSUMED;
+ } else if (strncmp(packet, "qC", 2) == 0) {
if (target->rtos != NULL) {
char buffer[19];
int size;
if (target->rtos != NULL) {
char buffer[19];
int size;