+std::map<char, BaseRemoteGDB::GdbCommand> BaseRemoteGDB::command_map = {
+ // last signal
+ { '?', { "KGDB_SIGNAL", &BaseRemoteGDB::cmd_signal } },
+ // set baud (deprecated)
+ { 'b', { "KGDB_SET_BAUD", &BaseRemoteGDB::cmd_unsupported } },
+ // set breakpoint (deprecated)
+ { 'B', { "KGDB_SET_BREAK", &BaseRemoteGDB::cmd_unsupported } },
+ // resume
+ { 'c', { "KGDB_CONT", &BaseRemoteGDB::cmd_cont } },
+ // continue with signal
+ { 'C', { "KGDB_ASYNC_CONT", &BaseRemoteGDB::cmd_async_cont } },
+ // toggle debug flags (deprecated)
+ { 'd', { "KGDB_DEBUG", &BaseRemoteGDB::cmd_unsupported } },
+ // detach remote gdb
+ { 'D', { "KGDB_DETACH", &BaseRemoteGDB::cmd_detach } },
+ // read general registers
+ { 'g', { "KGDB_REG_R", &BaseRemoteGDB::cmd_reg_r } },
+ // write general registers
+ { 'G', { "KGDB_REG_W", &BaseRemoteGDB::cmd_reg_w } },
+ // set thread
+ { 'H', { "KGDB_SET_THREAD", &BaseRemoteGDB::cmd_set_thread } },
+ // step a single cycle
+ { 'i', { "KGDB_CYCLE_STEP", &BaseRemoteGDB::cmd_unsupported } },
+ // signal then cycle step
+ { 'I', { "KGDB_SIG_CYCLE_STEP", &BaseRemoteGDB::cmd_unsupported } },
+ // kill program
+ { 'k', { "KGDB_KILL", &BaseRemoteGDB::cmd_detach } },
+ // read memory
+ { 'm', { "KGDB_MEM_R", &BaseRemoteGDB::cmd_mem_r } },
+ // write memory
+ { 'M', { "KGDB_MEM_W", &BaseRemoteGDB::cmd_mem_w } },
+ // read register
+ { 'p', { "KGDB_READ_REG", &BaseRemoteGDB::cmd_unsupported } },
+ // write register
+ { 'P', { "KGDB_SET_REG", &BaseRemoteGDB::cmd_unsupported } },
+ // query variable
+ { 'q', { "KGDB_QUERY_VAR", &BaseRemoteGDB::cmd_query_var } },
+ // set variable
+ { 'Q', { "KGDB_SET_VAR", &BaseRemoteGDB::cmd_unsupported } },
+ // reset system (deprecated)
+ { 'r', { "KGDB_RESET", &BaseRemoteGDB::cmd_unsupported } },
+ // step
+ { 's', { "KGDB_STEP", &BaseRemoteGDB::cmd_step } },
+ // signal and step
+ { 'S', { "KGDB_ASYNC_STEP", &BaseRemoteGDB::cmd_async_step } },
+ // find out if the thread is alive
+ { 'T', { "KGDB_THREAD_ALIVE", &BaseRemoteGDB::cmd_unsupported } },
+ // target exited
+ { 'W', { "KGDB_TARGET_EXIT", &BaseRemoteGDB::cmd_unsupported } },
+ // write memory
+ { 'X', { "KGDB_BINARY_DLOAD", &BaseRemoteGDB::cmd_unsupported } },
+ // remove breakpoint or watchpoint
+ { 'z', { "KGDB_CLR_HW_BKPT", &BaseRemoteGDB::cmd_clr_hw_bkpt } },
+ // insert breakpoint or watchpoint
+ { 'Z', { "KGDB_SET_HW_BKPT", &BaseRemoteGDB::cmd_set_hw_bkpt } },
+};