-int gdb_thread_packet(struct connection *connection, struct target *target, char *packet, int packet_size)
+int gdb_thread_packet(struct connection *connection, char *packet, int packet_size)
{
+ struct target *target = get_target_from_connection(connection);
+
if (strstr(packet, "qP"))
{
#define TAG_THREADID 1 /* Echo the thread identifier */
int symbol_num;
char* found = strstr( packet, "qSymbol::" );
- int numconv;
if (0 == found )
{
- numconv =sscanf(packet, "qSymbol:%" SCNx64 ":%s", &value, hex_name_str);
+ sscanf(packet, "qSymbol:%" SCNx64 ":%s", &value, hex_name_str);
}
else
{
// No value returned by GDB - symbol was not found
- numconv =sscanf(packet, "qSymbol::%s", hex_name_str);
+ sscanf(packet, "qSymbol::%s", hex_name_str);
}
name_str = (char*) malloc( 1+ strlen(hex_name_str) / 2 );
} else {
gdb_put_packet(connection, "E01", 3); // thread not found
}
+ return ERROR_OK;
}
else if ( packet[0] == 'H') // Set current thread ( 'c' for step and continue, 'g' for all other operations )
{
sscanf(packet, "Hg%16" SCNx64, ¤t_threadid);
}
gdb_put_packet(connection, "OK", 2);
+ return ERROR_OK;
}
return GDB_THREAD_PACKET_NOT_CONSUMED;
}
-int rtos_get_gdb_reg_list(struct connection *connection, struct target *target, struct reg **reg_list[], int *reg_list_size)
+int rtos_get_gdb_reg_list(struct connection *connection, struct reg **reg_list[], int *reg_list_size)
{
+ struct target *target = get_target_from_connection(connection);
+
if ( ( target->rtos != NULL ) &&
( current_threadid != -1 ) &&
( current_threadid != 0 ) &&