serial/gdbstub: Change GDBSTUB_ to GDB_

Fix nameing convention inconsistent

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2024-06-24 11:39:58 +08:00 committed by Xiang Xiao
parent 3c7162338d
commit add8b71fee
2 changed files with 8 additions and 8 deletions

View File

@ -77,7 +77,7 @@ static int uart_gdbstub_panic_callback(FAR struct notifier_block *nb,
"target-charset ASCII\" -ex \"target remote /dev/ttyUSB0\"\n"); "target-charset ASCII\" -ex \"target remote /dev/ttyUSB0\"\n");
gdb_console_message(uart_gdbstub->state, "Enter panic gdbstub mode!\n"); gdb_console_message(uart_gdbstub->state, "Enter panic gdbstub mode!\n");
gdb_process(uart_gdbstub->state, GDBSTUB_STOPREASON_CTRLC, NULL); gdb_process(uart_gdbstub->state, GDB_STOPREASON_CTRLC, NULL);
return 0; return 0;
} }
@ -94,7 +94,7 @@ static int uart_gdbstub_ctrlc(FAR struct uart_dev_s *dev,
FAR unsigned int *status) FAR unsigned int *status)
{ {
uart_disablerxint(dev); uart_disablerxint(dev);
gdb_process(g_uart_gdbstub->state, GDBSTUB_STOPREASON_CTRLC, NULL); gdb_process(g_uart_gdbstub->state, GDB_STOPREASON_CTRLC, NULL);
uart_enablerxint(dev); uart_enablerxint(dev);
return 0; return 0;
} }

View File

@ -1532,7 +1532,7 @@ static void gdb_debugpoint_callback(int type, FAR void *addr,
break; break;
case DEBUGPOINT_STEPPOINT: case DEBUGPOINT_STEPPOINT:
stopreason = GDB_STOPREASON_STEPPOINT; stopreason = GDB_STOPREASON_STEPPOINT;
up_debugpoint_remove(DEBUGPOINT_STEPPOINT, NULL, 0); gdb_debugpoint_remove(GDB_STOPREASON_STEPPOINT, NULL, 0);
break; break;
default: default:
return; return;
@ -1628,12 +1628,12 @@ static int gdb_debugpoint(FAR struct gdb_state_s *state, bool enable)
if (enable) if (enable)
{ {
ret = gdbstub_debugpoint_add(type, (FAR void *)addr, size, ret = gdb_debugpoint_add(type, (FAR void *)addr, size,
gdbstub_debugpoint_callback, state); gdb_debugpoint_callback, state);
} }
else else
{ {
ret = gdbstub_debugpoint_remove(type, (FAR void *)addr, size); ret = gdb_debugpoint_remove(type, (FAR void *)addr, size);
} }
if (ret < 0) if (ret < 0)
@ -1664,8 +1664,8 @@ static int gdb_debugpoint(FAR struct gdb_state_s *state, bool enable)
static int gdb_step(FAR struct gdb_state_s *state) static int gdb_step(FAR struct gdb_state_s *state)
{ {
int ret = up_debugpoint_add(DEBUGPOINT_STEPPOINT, NULL, 0, int ret = gdb_debugpoint_add(GDB_STOPREASON_STEPPOINT, NULL, 0,
gdbstub_debugpoint_callback, state); gdb_debugpoint_callback, state);
if (ret < 0) if (ret < 0)
{ {