mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
gdbstub: Change GDBSTUB_ to GDB_
Make the naming convention more consistent Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
3b4626acc8
commit
e9558a88cd
2 changed files with 21 additions and 21 deletions
|
@ -31,13 +31,13 @@
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define GDBSTUB_STOPREASON_NONE 0x00
|
#define GDB_STOPREASON_NONE 0x00
|
||||||
#define GDBSTUB_STOPREASON_WATCHPOINT_RO 0x01
|
#define GDB_STOPREASON_WATCHPOINT_RO 0x01
|
||||||
#define GDBSTUB_STOPREASON_WATCHPOINT_WO 0x02
|
#define GDB_STOPREASON_WATCHPOINT_WO 0x02
|
||||||
#define GDBSTUB_STOPREASON_WATCHPOINT_RW 0x03
|
#define GDB_STOPREASON_WATCHPOINT_RW 0x03
|
||||||
#define GDBSTUB_STOPREASON_BREAKPOINT 0x04
|
#define GDB_STOPREASON_BREAKPOINT 0x04
|
||||||
#define GDBSTUB_STOPREASON_STEPPOINT 0x05
|
#define GDB_STOPREASON_STEPPOINT 0x05
|
||||||
#define GDBSTUB_STOPREASON_CTRLC 0x06
|
#define GDB_STOPREASON_CTRLC 0x06
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Type Definitions
|
* Type Definitions
|
||||||
|
|
|
@ -1422,32 +1422,32 @@ static int gdb_send_stop(FAR struct gdb_state_s *state, int stopreason,
|
||||||
retry:
|
retry:
|
||||||
switch (stopreason)
|
switch (stopreason)
|
||||||
{
|
{
|
||||||
case GDBSTUB_STOPREASON_WATCHPOINT_RO:
|
case GDB_STOPREASON_WATCHPOINT_RO:
|
||||||
ret = sprintf(state->pkt_buf, "T05thread:%x;rwatch:%" PRIxPTR ";",
|
ret = sprintf(state->pkt_buf, "T05thread:%x;rwatch:%" PRIxPTR ";",
|
||||||
state->pid + 1, (uintptr_t)stopaddr);
|
state->pid + 1, (uintptr_t)stopaddr);
|
||||||
break;
|
break;
|
||||||
case GDBSTUB_STOPREASON_WATCHPOINT_WO:
|
case GDB_STOPREASON_WATCHPOINT_WO:
|
||||||
ret = sprintf(state->pkt_buf, "T05thread:%x;awatch:%" PRIxPTR ";",
|
ret = sprintf(state->pkt_buf, "T05thread:%x;awatch:%" PRIxPTR ";",
|
||||||
state->pid + 1, (uintptr_t)stopaddr);
|
state->pid + 1, (uintptr_t)stopaddr);
|
||||||
break;
|
break;
|
||||||
case GDBSTUB_STOPREASON_WATCHPOINT_RW:
|
case GDB_STOPREASON_WATCHPOINT_RW:
|
||||||
ret = sprintf(state->pkt_buf, "T05thread:%x;watch:%" PRIxPTR ";",
|
ret = sprintf(state->pkt_buf, "T05thread:%x;watch:%" PRIxPTR ";",
|
||||||
state->pid + 1, (uintptr_t)stopaddr);
|
state->pid + 1, (uintptr_t)stopaddr);
|
||||||
break;
|
break;
|
||||||
case GDBSTUB_STOPREASON_BREAKPOINT:
|
case GDB_STOPREASON_BREAKPOINT:
|
||||||
ret = sprintf(state->pkt_buf, "T05thread:%x;hwbreak:;",
|
ret = sprintf(state->pkt_buf, "T05thread:%x;hwbreak:;",
|
||||||
state->pid + 1);
|
state->pid + 1);
|
||||||
break;
|
break;
|
||||||
case GDBSTUB_STOPREASON_STEPPOINT:
|
case GDB_STOPREASON_STEPPOINT:
|
||||||
if (state->last_stopreason == GDBSTUB_STOPREASON_WATCHPOINT_RW ||
|
if (state->last_stopreason == GDB_STOPREASON_WATCHPOINT_RW ||
|
||||||
state->last_stopreason == GDBSTUB_STOPREASON_WATCHPOINT_WO)
|
state->last_stopreason == GDB_STOPREASON_WATCHPOINT_WO)
|
||||||
{
|
{
|
||||||
stopreason = state->last_stopreason;
|
stopreason = state->last_stopreason;
|
||||||
stopaddr = state->last_stopaddr;
|
stopaddr = state->last_stopaddr;
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
case GDBSTUB_STOPREASON_CTRLC:
|
case GDB_STOPREASON_CTRLC:
|
||||||
default:
|
default:
|
||||||
ret = sprintf(state->pkt_buf, "T05thread:%d;", state->pid + 1);
|
ret = sprintf(state->pkt_buf, "T05thread:%d;", state->pid + 1);
|
||||||
}
|
}
|
||||||
|
@ -1479,19 +1479,19 @@ static void gdbstub_debugpoint_callback(int type, FAR void *addr,
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case DEBUGPOINT_BREAKPOINT:
|
case DEBUGPOINT_BREAKPOINT:
|
||||||
stopreason = GDBSTUB_STOPREASON_BREAKPOINT;
|
stopreason = GDB_STOPREASON_BREAKPOINT;
|
||||||
break;
|
break;
|
||||||
case DEBUGPOINT_WATCHPOINT_RO:
|
case DEBUGPOINT_WATCHPOINT_RO:
|
||||||
stopreason = GDBSTUB_STOPREASON_WATCHPOINT_RO;
|
stopreason = GDB_STOPREASON_WATCHPOINT_RO;
|
||||||
break;
|
break;
|
||||||
case DEBUGPOINT_WATCHPOINT_WO:
|
case DEBUGPOINT_WATCHPOINT_WO:
|
||||||
stopreason = GDBSTUB_STOPREASON_WATCHPOINT_WO;
|
stopreason = GDB_STOPREASON_WATCHPOINT_WO;
|
||||||
break;
|
break;
|
||||||
case DEBUGPOINT_WATCHPOINT_RW:
|
case DEBUGPOINT_WATCHPOINT_RW:
|
||||||
stopreason = GDBSTUB_STOPREASON_WATCHPOINT_RW;
|
stopreason = GDB_STOPREASON_WATCHPOINT_RW;
|
||||||
break;
|
break;
|
||||||
case DEBUGPOINT_STEPPOINT:
|
case DEBUGPOINT_STEPPOINT:
|
||||||
stopreason = GDBSTUB_STOPREASON_STEPPOINT;
|
stopreason = GDB_STOPREASON_STEPPOINT;
|
||||||
up_debugpoint_remove(DEBUGPOINT_STEPPOINT, NULL, 0);
|
up_debugpoint_remove(DEBUGPOINT_STEPPOINT, NULL, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1785,7 +1785,7 @@ int gdb_process(FAR struct gdb_state_s *state, int stopreason,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (stopreason != GDBSTUB_STOPREASON_NONE)
|
if (stopreason != GDB_STOPREASON_NONE)
|
||||||
{
|
{
|
||||||
gdb_send_stop(state, stopreason, stopaddr);
|
gdb_send_stop(state, stopreason, stopaddr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue