Lines Matching refs:cmd

35 static int handle_task_commands(unsigned char *cmd, int len);
77 unsigned char *cmd; in esp_gdbstub_panic_handler() local
79 int res = esp_gdbstub_read_command(&cmd, &size); in esp_gdbstub_panic_handler()
88 res = esp_gdbstub_handle_command(cmd, size); in esp_gdbstub_panic_handler()
203 unsigned char *cmd; in gdbstub_handle_uart_int() local
206 int res = esp_gdbstub_read_command(&cmd, &size); in gdbstub_handle_uart_int()
219 res = esp_gdbstub_handle_command(cmd, size); in gdbstub_handle_uart_int()
258 static void handle_g_command(const unsigned char *cmd, int len) in handle_g_command() argument
269 static void handle_G_command(const unsigned char *cmd, int len) in handle_G_command() argument
273 *p++ = gdbstub_hton(esp_gdbstub_gethex(&cmd, 32)); in handle_G_command()
279 static void handle_m_command(const unsigned char *cmd, int len) in handle_m_command() argument
281 intptr_t addr = (intptr_t) esp_gdbstub_gethex(&cmd, -1); in handle_m_command()
282 cmd++; in handle_m_command()
283 uint32_t size = esp_gdbstub_gethex(&cmd, -1); in handle_m_command()
299 static void handle_M_command(const unsigned char *cmd, int len) in handle_M_command() argument
301 intptr_t addr = (intptr_t) esp_gdbstub_gethex(&cmd, -1); in handle_M_command()
302 cmd++; // skip '.' in handle_M_command()
303 uint32_t size = esp_gdbstub_gethex(&cmd, -1); in handle_M_command()
304 cmd++; // skip ':' in handle_M_command()
311 esp_gdbstub_writemem(addr, esp_gdbstub_gethex(&cmd, 8)); in handle_M_command()
320 int esp_gdbstub_handle_command(unsigned char *cmd, int len) in esp_gdbstub_handle_command() argument
322 unsigned char *data = cmd + 1; in esp_gdbstub_handle_command()
323 if (cmd[0] == 'g') { in esp_gdbstub_handle_command()
325 } else if (cmd[0] == 'G') { in esp_gdbstub_handle_command()
328 } else if (cmd[0] == 'm') { in esp_gdbstub_handle_command()
331 } else if (cmd[0] == 'M') { in esp_gdbstub_handle_command()
334 } else if (cmd[0] == '?') { in esp_gdbstub_handle_command()
339 return handle_task_commands(cmd, len); in esp_gdbstub_handle_command()
341 } else if (strncmp((char *)cmd, "vCont;c", 7) == 0 || cmd[0] == 'c') { //continue execution in esp_gdbstub_handle_command()
432 static void handle_H_command(const unsigned char *cmd, int len) in handle_H_command() argument
435 if (cmd[1] == 'g') { in handle_H_command()
436 cmd += 2; in handle_H_command()
437 int requested_tid = esp_gdbstub_gethex(&cmd, -1); in handle_H_command()
448 } else if (cmd[1] == 'c') { in handle_H_command()
458 static void handle_qC_command(const unsigned char *cmd, int len) in handle_qC_command() argument
470 static void handle_T_command(const unsigned char *cmd, int len) in handle_T_command() argument
487 static void handle_qfThreadInfo_command(const unsigned char *cmd, int len) in handle_qfThreadInfo_command() argument
494 static void handle_qsThreadInfo_command(const unsigned char *cmd, int len) in handle_qsThreadInfo_command() argument
507 static void handle_qThreadExtraInfo_command(const unsigned char *cmd, int len) in handle_qThreadExtraInfo_command() argument
509 cmd += sizeof("qThreadExtraInfo,") - 1; in handle_qThreadExtraInfo_command()
510 int task_index = gdb_tid_to_task_index(esp_gdbstub_gethex(&cmd, -1)); in handle_qThreadExtraInfo_command()
529 const char *cmd = (const char *) ucmd; in command_name_matches() local
530 const char *end = cmd + len; in command_name_matches()
531 for (; *pattern && cmd < end; ++cmd, ++pattern) { in command_name_matches()
535 if (*pattern != *cmd) { in command_name_matches()
539 return *pattern == 0 && (cmd == end || *cmd == ','); in command_name_matches()
543 static int handle_task_commands(unsigned char *cmd, int len) in handle_task_commands() argument
545 if (cmd[0] == 'H') { in handle_task_commands()
547 handle_H_command(cmd, len); in handle_task_commands()
548 } else if (cmd[0] == 'T') { in handle_task_commands()
550 handle_T_command(cmd, len); in handle_task_commands()
551 } else if (cmd[0] == 'q') { in handle_task_commands()
552 if (command_name_matches("qfThreadInfo", cmd, len)) { in handle_task_commands()
553 handle_qfThreadInfo_command(cmd, len); in handle_task_commands()
554 } else if (command_name_matches("qsThreadInfo", cmd, len)) { in handle_task_commands()
555 handle_qsThreadInfo_command(cmd, len); in handle_task_commands()
556 } else if (command_name_matches("qC", cmd, len)) { in handle_task_commands()
557 handle_qC_command(cmd, len); in handle_task_commands()
558 } else if (command_name_matches("qThreadExtraInfo", cmd, len)) { in handle_task_commands()
559 handle_qThreadExtraInfo_command(cmd, len); in handle_task_commands()
564 } else if (strncmp((char *)cmd, "vCont;c", 7) == 0 || cmd[0] == 'c') { //continue execution in handle_task_commands()