gdb_main: Implemented support for qC queries

This commit is contained in:
dragonmux 2022-07-20 01:45:00 +01:00
parent 7322bb3ffa
commit 1f22c72634
No known key found for this signature in database
GPG Key ID: 64861EA89B35507A

View File

@ -462,6 +462,17 @@ static void exec_q_crc(const char *packet, const size_t length)
} }
} }
/*
* qC queries are for the current thread. We don't support threads but GDB 11 and 12 require this,
* so we always answer that the current thread is thread 1.
*/
static void exec_q_c(const char *packet, const size_t length)
{
(void)packet;
(void)length;
gdb_putpacketz("QC1");
}
static const cmd_executer q_commands[]= static const cmd_executer q_commands[]=
{ {
{"qRcmd,", exec_q_rcmd}, {"qRcmd,", exec_q_rcmd},
@ -469,6 +480,7 @@ static const cmd_executer q_commands[]=
{"qXfer:memory-map:read::", exec_q_memory_map}, {"qXfer:memory-map:read::", exec_q_memory_map},
{"qXfer:features:read:target.xml:",exec_q_feature_read}, {"qXfer:features:read:target.xml:",exec_q_feature_read},
{"qCRC:", exec_q_crc}, {"qCRC:", exec_q_crc},
{"qC", exec_q_c},
{NULL, NULL}, {NULL, NULL},
}; };