This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 6163fef1153 !libc/gdbstub: rename config symbols to LIBC_GDBSTUB
6163fef1153 is described below

commit 6163fef115379d4c65a2a6fdb6d6c71a016dad09
Author: anjiahao <[email protected]>
AuthorDate: Tue Nov 24 20:24:16 2026 +0800

    !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.
    
    BREAKING CHANGE: CONFIG_LIB_GDBSTUB is renamed to CONFIG_LIBC_GDBSTUB.
    Replace CONFIG_LIB_GDBSTUB, CONFIG_LIB_GDBSTUB_DEBUG, and
    CONFIG_LIB_GDBSTUB_PKTSIZE with the corresponding LIBC_GDBSTUB
    symbols in your defconfig.  A deprecated LIB_GDBSTUB alias is kept
    for the transition.
    
    Signed-off-by: anjiahao <[email protected]>
---
 boards/arm/mps/mps3-an547/configs/gdbstub/defconfig     |  4 ++--
 boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig   |  2 +-
 .../stm32f4/stm32f429i-disco/configs/gdbstub/defconfig  |  4 ++--
 boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig |  2 +-
 .../esp32c3-legacy-devkit/configs/gdbstub/defconfig     |  2 +-
 drivers/serial/Kconfig                                  |  2 +-
 libs/libc/gdbstub/CMakeLists.txt                        |  2 +-
 libs/libc/gdbstub/Kconfig                               | 17 ++++++++++++-----
 libs/libc/gdbstub/Make.defs                             |  2 +-
 libs/libc/gdbstub/lib_gdbstub.c                         | 12 ++++++------
 10 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig 
b/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig
index 5084af7dba9..3d18af44a95 100644
--- a/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig
+++ b/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig
@@ -51,8 +51,8 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_INTELHEX_BINARY=y
 CONFIG_LIBC_MEMFD_ERROR=y
-CONFIG_LIB_GDBSTUB=y
-CONFIG_LIB_GDBSTUB_DEBUG=y
+CONFIG_LIBC_GDBSTUB=y
+CONFIG_LIBC_GDBSTUB_DEBUG=y
 CONFIG_MM_REGIONS=2
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
diff --git a/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig 
b/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig
index 182f7756e6e..112e833d673 100644
--- a/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig
+++ b/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig
@@ -40,7 +40,7 @@ CONFIG_IDLETHREAD_STACKSIZE=4096
 CONFIG_INIT_ENTRYPOINT="init_main"
 CONFIG_INTELHEX_BINARY=y
 CONFIG_LIBC_EXECFUNCS=y
-CONFIG_LIB_GDBSTUB=y
+CONFIG_LIBC_GDBSTUB=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
diff --git a/boards/arm/stm32f4/stm32f429i-disco/configs/gdbstub/defconfig 
b/boards/arm/stm32f4/stm32f429i-disco/configs/gdbstub/defconfig
index f44bd74c69d..13691ef9e5f 100644
--- a/boards/arm/stm32f4/stm32f429i-disco/configs/gdbstub/defconfig
+++ b/boards/arm/stm32f4/stm32f429i-disco/configs/gdbstub/defconfig
@@ -29,8 +29,8 @@ CONFIG_HEAP2_BASE=0xD0000000
 CONFIG_HEAP2_SIZE=8388608
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_INTELHEX_BINARY=y
-CONFIG_LIB_GDBSTUB=y
-CONFIG_LIB_GDBSTUB_DEBUG=y
+CONFIG_LIBC_GDBSTUB=y
+CONFIG_LIBC_GDBSTUB_DEBUG=y
 CONFIG_LINE_MAX=64
 CONFIG_MM_REGIONS=3
 CONFIG_NSH_BUILTIN_APPS=y
diff --git a/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig 
b/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig
index 023b772d512..f8e5235dbf8 100644
--- a/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig
+++ b/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig
@@ -43,8 +43,8 @@ CONFIG_IDLETHREAD_STACKSIZE=8192
 CONFIG_INIT_ENTRYPOINT="init_main"
 CONFIG_INTELHEX_BINARY=y
 CONFIG_LIBC_EXECFUNCS=y
+CONFIG_LIBC_GDBSTUB=y
 CONFIG_LIBC_MEMFD_ERROR=y
-CONFIG_LIB_GDBSTUB=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
diff --git 
a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig 
b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig
index c32c5a927e9..7b369c363ec 100644
--- 
a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig
+++ 
b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig
@@ -36,8 +36,8 @@ CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_INTELHEX_BINARY=y
 CONFIG_IOB_NBUFFERS=124
 CONFIG_IOB_THROTTLE=24
+CONFIG_LIBC_GDBSTUB=y
 CONFIG_LIBC_MAX_EXITFUNS=1
-CONFIG_LIB_GDBSTUB=y
 CONFIG_LINE_MAX=64
 CONFIG_NAME_MAX=48
 CONFIG_NETDB_DNSCLIENT=y
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index bb817dc99c4..d4b11274d75 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -74,7 +74,7 @@ config SERIAL_CONSOLE
 
 config SERIAL_GDBSTUB
        bool "GDBSTUB Serial support"
-       depends on LIB_GDBSTUB
+       depends on LIBC_GDBSTUB
        default n
 
 if SERIAL_GDBSTUB
diff --git a/libs/libc/gdbstub/CMakeLists.txt b/libs/libc/gdbstub/CMakeLists.txt
index 9dee19d8f8b..48d54ee2a36 100644
--- a/libs/libc/gdbstub/CMakeLists.txt
+++ b/libs/libc/gdbstub/CMakeLists.txt
@@ -20,7 +20,7 @@
 #
 # 
##############################################################################
 
-if(CONFIG_LIB_GDBSTUB)
+if(CONFIG_LIBC_GDBSTUB)
   target_sources(c PRIVATE lib_gdbstub.c)
 
   if(CONFIG_MM_KASAN)
diff --git a/libs/libc/gdbstub/Kconfig b/libs/libc/gdbstub/Kconfig
index 910a49af818..9797e0e3806 100644
--- a/libs/libc/gdbstub/Kconfig
+++ b/libs/libc/gdbstub/Kconfig
@@ -24,24 +24,31 @@
 # see the file kconfig-language.txt in the NuttX tools repository.
 #
 
-config LIB_GDBSTUB
+config LIBC_GDBSTUB
        tristate "GDBSTUB"
        depends on ARCH_HAVE_TCBINFO
        ---help---
                Enable support for gdbstub.
 
-if LIB_GDBSTUB
+if LIBC_GDBSTUB
 
-config LIB_GDBSTUB_DEBUG
+config LIBC_GDBSTUB_DEBUG
        bool "Gdbstub Debug Info"
        default n
        ---help---
                Add debug info to gdbstub
 
-config LIB_GDBSTUB_PKTSIZE
+config LIBC_GDBSTUB_PKTSIZE
        int "Gdbstub packet size"
        default 32768
        ---help---
                The size of the gdbstub packet buffer.
 
-endif # LIB_GDBSTUB
+endif # LIBC_GDBSTUB
+
+config LIB_GDBSTUB
+       tristate "Deprecated alias for LIBC_GDBSTUB"
+       default LIBC_GDBSTUB
+       depends on LIBC_GDBSTUB
+       ---help---
+               Deprecated compatibility alias.  Use LIBC_GDBSTUB instead.
diff --git a/libs/libc/gdbstub/Make.defs b/libs/libc/gdbstub/Make.defs
index f7f82deb575..7ee23ef8c45 100644
--- a/libs/libc/gdbstub/Make.defs
+++ b/libs/libc/gdbstub/Make.defs
@@ -20,7 +20,7 @@
 #
 ############################################################################
 
-ifeq ($(CONFIG_LIB_GDBSTUB),y)
+ifeq ($(CONFIG_LIBC_GDBSTUB),y)
 
 # Add the internal C files to the build
 
diff --git a/libs/libc/gdbstub/lib_gdbstub.c b/libs/libc/gdbstub/lib_gdbstub.c
index 8774ca84fc0..596df2caa42 100644
--- a/libs/libc/gdbstub/lib_gdbstub.c
+++ b/libs/libc/gdbstub/lib_gdbstub.c
@@ -44,7 +44,7 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-#ifdef CONFIG_LIB_GDBSTUB_DEBUG
+#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
 #  define GDB_DEBUG(stat, ...) \
           lib_sprintf((FAR struct lib_outstream_s *)&state->stream, \
                       ##__VA_ARGS__)
@@ -54,7 +54,7 @@
 #  define GDB_ASSERT() do {} while (0)
 #endif
 
-#define BUFSIZE CONFIG_LIB_GDBSTUB_PKTSIZE
+#define BUFSIZE CONFIG_LIBC_GDBSTUB_PKTSIZE
 
 #define REPBIAS 29
 #define REPSIZE (255 - REPBIAS)
@@ -77,7 +77,7 @@
 struct gdb_state_s
 {
   uint8_t running_regs[XCPTCONTEXT_SIZE]; /* Registers of running thread */
-#ifdef CONFIG_LIB_GDBSTUB_DEBUG
+#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
   struct lib_syslograwstream_s stream;
 #endif
   gdb_send_func_t send;                   /* Send buffer to gdb */
@@ -399,7 +399,7 @@ static int gdb_send_packet(FAR struct gdb_state_s *state)
       return ret;
     }
 
-#ifdef CONFIG_LIB_GDBSTUB_DEBUG
+#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
   {
     size_t p;
 
@@ -590,7 +590,7 @@ static int gdb_recv_packet(FAR struct gdb_state_s *state)
       return ret;
     }
 
-#ifdef CONFIG_LIB_GDBSTUB_DEBUG
+#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
   {
     size_t p;
 
@@ -2112,7 +2112,7 @@ FAR struct gdb_state_s *gdb_state_init(gdb_send_func_t 
send,
   state->priv = priv;
   state->monitor = monitor;
 
-#ifdef CONFIG_LIB_GDBSTUB_DEBUG
+#ifdef CONFIG_LIBC_GDBSTUB_DEBUG
   lib_syslograwstream_open(&state->stream);
 #endif
 

Reply via email to