Skip to content

Commit 2e79bd3

Browse files
committed
libc/gdbstub: rename config symbols to LIBC_GDBSTUB
Rename the gdbstub configuration symbols from LIB_GDBSTUB to LIBC_GDBSTUB so they follow the location and naming of the libc implementation. Update all in-tree users. Keep LIB_GDBSTUB as a deprecated alias during the transition, so the companion apps tree keeps building until its rename lands. Signed-off-by: anjiahao <anjiahao@xiaomi.com>
1 parent 44b3914 commit 2e79bd3

10 files changed

Lines changed: 28 additions & 21 deletions

File tree

‎boards/arm/mps/mps3-an547/configs/gdbstub/defconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
5151
CONFIG_INIT_ENTRYPOINT="nsh_main"
5252
CONFIG_INTELHEX_BINARY=y
5353
CONFIG_LIBC_MEMFD_ERROR=y
54-
CONFIG_LIB_GDBSTUB=y
55-
CONFIG_LIB_GDBSTUB_DEBUG=y
54+
CONFIG_LIBC_GDBSTUB=y
55+
CONFIG_LIBC_GDBSTUB_DEBUG=y
5656
CONFIG_MM_REGIONS=2
5757
CONFIG_NSH_BUILTIN_APPS=y
5858
CONFIG_NSH_FILEIOSIZE=512

‎boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
4040
CONFIG_INIT_ENTRYPOINT="init_main"
4141
CONFIG_INTELHEX_BINARY=y
4242
CONFIG_LIBC_EXECFUNCS=y
43-
CONFIG_LIB_GDBSTUB=y
43+
CONFIG_LIBC_GDBSTUB=y
4444
CONFIG_NSH_BUILTIN_APPS=y
4545
CONFIG_NSH_FILEIOSIZE=512
4646
CONFIG_NSH_READLINE=y

‎boards/arm/stm32f4/stm32f429i-disco/configs/gdbstub/defconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ CONFIG_HEAP2_BASE=0xD0000000
2929
CONFIG_HEAP2_SIZE=8388608
3030
CONFIG_INIT_ENTRYPOINT="nsh_main"
3131
CONFIG_INTELHEX_BINARY=y
32-
CONFIG_LIB_GDBSTUB=y
33-
CONFIG_LIB_GDBSTUB_DEBUG=y
32+
CONFIG_LIBC_GDBSTUB=y
33+
CONFIG_LIBC_GDBSTUB_DEBUG=y
3434
CONFIG_LINE_MAX=64
3535
CONFIG_MM_REGIONS=3
3636
CONFIG_NSH_BUILTIN_APPS=y

‎boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ CONFIG_IDLETHREAD_STACKSIZE=8192
4343
CONFIG_INIT_ENTRYPOINT="init_main"
4444
CONFIG_INTELHEX_BINARY=y
4545
CONFIG_LIBC_EXECFUNCS=y
46+
CONFIG_LIBC_GDBSTUB=y
4647
CONFIG_LIBC_MEMFD_ERROR=y
47-
CONFIG_LIB_GDBSTUB=y
4848
CONFIG_NSH_BUILTIN_APPS=y
4949
CONFIG_NSH_FILEIOSIZE=512
5050
CONFIG_NSH_READLINE=y

‎boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ CONFIG_INIT_ENTRYPOINT="nsh_main"
3636
CONFIG_INTELHEX_BINARY=y
3737
CONFIG_IOB_NBUFFERS=124
3838
CONFIG_IOB_THROTTLE=24
39+
CONFIG_LIBC_GDBSTUB=y
3940
CONFIG_LIBC_MAX_EXITFUNS=1
40-
CONFIG_LIB_GDBSTUB=y
4141
CONFIG_LINE_MAX=64
4242
CONFIG_NAME_MAX=48
4343
CONFIG_NETDB_DNSCLIENT=y

‎drivers/serial/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ config SERIAL_CONSOLE
7474

7575
config SERIAL_GDBSTUB
7676
bool "GDBSTUB Serial support"
77-
depends on LIB_GDBSTUB
77+
depends on LIBC_GDBSTUB
7878
default n
7979

8080
if SERIAL_GDBSTUB

‎libs/libc/gdbstub/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
# ##############################################################################
2222

23-
if(CONFIG_LIB_GDBSTUB)
23+
if(CONFIG_LIBC_GDBSTUB)
2424
target_sources(c PRIVATE lib_gdbstub.c)
2525

2626
if(CONFIG_MM_KASAN)

‎libs/libc/gdbstub/Kconfig‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,31 @@
2424
# see the file kconfig-language.txt in the NuttX tools repository.
2525
#
2626

27-
config LIB_GDBSTUB
27+
config LIBC_GDBSTUB
2828
tristate "GDBSTUB"
2929
depends on ARCH_HAVE_TCBINFO
3030
---help---
3131
Enable support for gdbstub.
3232

33-
if LIB_GDBSTUB
33+
if LIBC_GDBSTUB
3434

35-
config LIB_GDBSTUB_DEBUG
35+
config LIBC_GDBSTUB_DEBUG
3636
bool "Gdbstub Debug Info"
3737
default n
3838
---help---
3939
Add debug info to gdbstub
4040

41-
config LIB_GDBSTUB_PKTSIZE
41+
config LIBC_GDBSTUB_PKTSIZE
4242
int "Gdbstub packet size"
4343
default 32768
4444
---help---
4545
The size of the gdbstub packet buffer.
4646

47-
endif # LIB_GDBSTUB
47+
endif # LIBC_GDBSTUB
48+
49+
config LIB_GDBSTUB
50+
tristate "Deprecated alias for LIBC_GDBSTUB"
51+
default LIBC_GDBSTUB
52+
depends on LIBC_GDBSTUB
53+
---help---
54+
Deprecated compatibility alias. Use LIBC_GDBSTUB instead.

‎libs/libc/gdbstub/Make.defs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
############################################################################
2222

23-
ifeq ($(CONFIG_LIB_GDBSTUB),y)
23+
ifeq ($(CONFIG_LIBC_GDBSTUB),y)
2424

2525
# Add the internal C files to the build
2626

‎libs/libc/gdbstub/lib_gdbstub.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* Pre-processor Definitions
4545
****************************************************************************/
4646

47-
#ifdef CONFIG_LIB_GDBSTUB_DEBUG
47+
#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
4848
# define GDB_DEBUG(stat, ...) \
4949
lib_sprintf((FAR struct lib_outstream_s *)&state->stream, \
5050
##__VA_ARGS__)
@@ -54,7 +54,7 @@
5454
# define GDB_ASSERT() do {} while (0)
5555
#endif
5656

57-
#define BUFSIZE CONFIG_LIB_GDBSTUB_PKTSIZE
57+
#define BUFSIZE CONFIG_LIBC_GDBSTUB_PKTSIZE
5858

5959
#define REPBIAS 29
6060
#define REPSIZE (255 - REPBIAS)
@@ -77,7 +77,7 @@
7777
struct gdb_state_s
7878
{
7979
uint8_t running_regs[XCPTCONTEXT_SIZE]; /* Registers of running thread */
80-
#ifdef CONFIG_LIB_GDBSTUB_DEBUG
80+
#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
8181
struct lib_syslograwstream_s stream;
8282
#endif
8383
gdb_send_func_t send; /* Send buffer to gdb */
@@ -399,7 +399,7 @@ static int gdb_send_packet(FAR struct gdb_state_s *state)
399399
return ret;
400400
}
401401

402-
#ifdef CONFIG_LIB_GDBSTUB_DEBUG
402+
#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
403403
{
404404
size_t p;
405405

@@ -590,7 +590,7 @@ static int gdb_recv_packet(FAR struct gdb_state_s *state)
590590
return ret;
591591
}
592592

593-
#ifdef CONFIG_LIB_GDBSTUB_DEBUG
593+
#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
594594
{
595595
size_t p;
596596

@@ -2112,7 +2112,7 @@ FAR struct gdb_state_s *gdb_state_init(gdb_send_func_t send,
21122112
state->priv = priv;
21132113
state->monitor = monitor;
21142114

2115-
#ifdef CONFIG_LIB_GDBSTUB_DEBUG
2115+
#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
21162116
lib_syslograwstream_open(&state->stream);
21172117
#endif
21182118

0 commit comments

Comments
 (0)