From f3269a6caafb61ff6949760da5a0adf27eb37ef1 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 20 Jul 2023 05:28:37 +0800 Subject: [PATCH] sched: Rename DEBUG_TCBINFO to ARCH_HAVE_TCBINFO and select if the arch support to define g_tcbinfo variable Signed-off-by: Xiang Xiao --- Documentation/quickstart/debugging.rst | 2 +- Kconfig | 8 -------- arch/Kconfig | 12 +++++++++++ arch/arm/src/arm/arm_tcbinfo.c | 5 ----- arch/arm/src/armv6-m/arm_tcbinfo.c | 5 ----- arch/arm/src/armv7-a/arm_tcbinfo.c | 5 ----- arch/arm/src/armv7-m/arm_tcbinfo.c | 5 ----- arch/arm/src/armv7-r/arm_tcbinfo.c | 5 ----- arch/arm/src/armv8-m/arm_tcbinfo.c | 5 ----- arch/arm/src/armv8-r/arm_tcbinfo.c | 5 ----- arch/arm64/src/common/Make.defs | 6 +----- arch/arm64/src/common/arm64_tcbinfo.c | 5 ----- arch/risc-v/src/common/riscv_tcbinfo.c | 5 ----- arch/sim/src/Makefile | 6 +----- arch/sim/src/sim/CMakeLists.txt | 1 + arch/sim/src/sim/sim_tcbinfo.c | 4 ---- arch/xtensa/src/common/Make.defs | 6 +----- arch/xtensa/src/common/xtensa_tcbinfo.c | 1 - binfmt/libelf/Kconfig | 2 +- .../fvp-armv8r-aarch32/configs/nsh/defconfig | 1 - .../esp32c3-devkit/configs/gdbstub/defconfig | 1 - fs/procfs/Kconfig | 2 +- fs/procfs/fs_procfs.c | 6 +++--- fs/procfs/fs_procfstcbinfo.c | 5 ++--- include/nuttx/sched.h | 20 +++++++------------ libs/libc/gdbstub/Kconfig | 2 +- 26 files changed, 32 insertions(+), 98 deletions(-) diff --git a/Documentation/quickstart/debugging.rst b/Documentation/quickstart/debugging.rst index 751f9578b4..22ca6494b2 100644 --- a/Documentation/quickstart/debugging.rst +++ b/Documentation/quickstart/debugging.rst @@ -242,7 +242,7 @@ With gdb You can also do NuttX aware debugging using ``gdb`` scripting support. The benefit is that it works also for the sim build where ``openocd`` is not applicable. For this to work, you will need to enable PROC filesystem support -which will expose required task information (``CONFIG_FS_PROCFS=y CONFIG_DEBUG_TCBINFO=y``). +which will expose required task information (``CONFIG_FS_PROCFS=y``). To use this approach, you can load the ``nuttx/tools/gdb/__init__.py`` file. An easy way to do this is to add an extra command: diff --git a/Kconfig b/Kconfig index a35c897b4b..e4adb6295d 100644 --- a/Kconfig +++ b/Kconfig @@ -2012,14 +2012,6 @@ endif # DEBUG_VIDEO endif # DEBUG_FEATURES -config DEBUG_TCBINFO - bool "Enable TCBinfo struct for debug" - default n - ---help--- - Enables tcbinfo struct for debugger information. - Selecting this option will enable g_tcbinfo in arch and - procfs. - config ARCH_HAVE_STACKCHECK bool default n diff --git a/arch/Kconfig b/arch/Kconfig index c432b40d86..1d90b1e405 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -18,6 +18,7 @@ config ARCH_ARM select ARCH_HAVE_SETJMP if !ARCH_TOOLCHAIN_IAR select ARCH_HAVE_SYSCALL_HOOKS select ARCH_HAVE_RDWR_MEM_CPU_RUN + select ARCH_HAVE_TCBINFO select ARCH_HAVE_THREAD_LOCAL ---help--- The ARM architectures @@ -33,6 +34,7 @@ config ARCH_ARM64 select ARCH_HAVE_STDARG_H select ARCH_HAVE_SYSCALL_HOOKS select ARCH_HAVE_RDWR_MEM_CPU_RUN + select ARCH_HAVE_TCBINFO select ARCH_HAVE_THREAD_LOCAL select ARCH_HAVE_PERF_EVENTS select ONESHOT @@ -88,6 +90,7 @@ config ARCH_RISCV select ARCH_HAVE_STDARG_H select ARCH_HAVE_SYSCALL_HOOKS select ARCH_HAVE_RDWR_MEM_CPU_RUN + select ARCH_HAVE_TCBINFO select ARCH_HAVE_THREAD_LOCAL ---help--- RISC-V 32 and 64-bit RV32 / RV64 architectures. @@ -105,6 +108,7 @@ config ARCH_SIM select ARCH_HAVE_FORK if !HOST_WINDOWS select ARCH_HAVE_SETJMP select ARCH_HAVE_CUSTOMOPT + select ARCH_HAVE_TCBINFO select ARCH_HAVE_TEXT_HEAP select ARCH_SETJMP_H select ALARM_ARCH @@ -117,11 +121,13 @@ config ARCH_SIM config ARCH_X86 bool "x86" + select ARCH_HAVE_TCBINFO ---help--- Intel x86 architectures. config ARCH_X86_64 bool "x86_64" + select ARCH_HAVE_TCBINFO select LIBC_ARCH_ELF_64BIT if LIBC_ARCH_ELF ---help--- x86-64 architectures. @@ -133,6 +139,7 @@ config ARCH_XTENSA select ARCH_HAVE_INTERRUPTSTACK select ARCH_HAVE_STACKCHECK select ARCH_HAVE_CUSTOMOPT + select ARCH_HAVE_TCBINFO select ARCH_HAVE_STDARG_H select ARCH_HAVE_SETJMP if ARCH_TOOLCHAIN_GNU select ARCH_HAVE_SYSCALL_HOOKS @@ -161,6 +168,7 @@ config ARCH_SPARC bool "SPARC" select ARCH_HAVE_INTERRUPTSTACK select ARCH_HAVE_CUSTOMOPT + select ARCH_HAVE_TCBINFO ---help--- SPARC architectures (SPARC V8) @@ -483,6 +491,10 @@ config ARCH_HAVE_CPUINFO bool default n +config ARCH_HAVE_TCBINFO + bool + default n + config ARCH_HAVE_ELF_EXECUTABLE bool default n diff --git a/arch/arm/src/arm/arm_tcbinfo.c b/arch/arm/src/arm/arm_tcbinfo.c index 5501369a21..b715cc45fd 100644 --- a/arch/arm/src/arm/arm_tcbinfo.c +++ b/arch/arm/src/arm/arm_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -74,9 +72,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/arm/src/armv6-m/arm_tcbinfo.c b/arch/arm/src/armv6-m/arm_tcbinfo.c index 666ccd608e..8a66fd5acc 100644 --- a/arch/arm/src/armv6-m/arm_tcbinfo.c +++ b/arch/arm/src/armv6-m/arm_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -81,9 +79,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/arm/src/armv7-a/arm_tcbinfo.c b/arch/arm/src/armv7-a/arm_tcbinfo.c index 84d0b072b2..1d23155e02 100644 --- a/arch/arm/src/armv7-a/arm_tcbinfo.c +++ b/arch/arm/src/armv7-a/arm_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -116,9 +114,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/arm/src/armv7-m/arm_tcbinfo.c b/arch/arm/src/armv7-m/arm_tcbinfo.c index aee99c4e4e..2e9c58f9bd 100644 --- a/arch/arm/src/armv7-m/arm_tcbinfo.c +++ b/arch/arm/src/armv7-m/arm_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -122,9 +120,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/arm/src/armv7-r/arm_tcbinfo.c b/arch/arm/src/armv7-r/arm_tcbinfo.c index 02e34aa33f..17aa740fa2 100644 --- a/arch/arm/src/armv7-r/arm_tcbinfo.c +++ b/arch/arm/src/armv7-r/arm_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -116,9 +114,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/arm/src/armv8-m/arm_tcbinfo.c b/arch/arm/src/armv8-m/arm_tcbinfo.c index 4dbbd84e44..70b9f538a3 100644 --- a/arch/arm/src/armv8-m/arm_tcbinfo.c +++ b/arch/arm/src/armv8-m/arm_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -122,9 +120,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/arm/src/armv8-r/arm_tcbinfo.c b/arch/arm/src/armv8-r/arm_tcbinfo.c index c070864806..f1fa7e6359 100644 --- a/arch/arm/src/armv8-r/arm_tcbinfo.c +++ b/arch/arm/src/armv8-r/arm_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -114,9 +112,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs index 598e5d51c9..9576ed59bb 100644 --- a/arch/arm64/src/common/Make.defs +++ b/arch/arm64/src/common/Make.defs @@ -48,7 +48,7 @@ CMN_CSRCS += arm64_releasestack.c arm64_stackframe.c arm64_usestack.c CMN_CSRCS += arm64_task_sched.c arm64_exit.c arm64_fork.c arm64_switchcontext.c CMN_CSRCS += arm64_schedulesigaction.c arm64_sigdeliver.c CMN_CSRCS += arm64_getintstack.c arm64_registerdump.c -CMN_CSRCS += arm64_perf.c +CMN_CSRCS += arm64_perf.c arm64_tcbinfo.c # Common C source files ( hardware BSP ) CMN_CSRCS += arm64_arch_timer.c arm64_cache.c @@ -123,7 +123,3 @@ endif ifeq ($(CONFIG_ARM64_SEMIHOSTING_HOSTFS),y) CMN_CSRCS += arm64_hostfs.c endif - -ifeq ($(CONFIG_DEBUG_TCBINFO),y) -CMN_CSRCS += arm64_tcbinfo.c -endif diff --git a/arch/arm64/src/common/arm64_tcbinfo.c b/arch/arm64/src/common/arm64_tcbinfo.c index 16a5e13030..79049ca67e 100644 --- a/arch/arm64/src/common/arm64_tcbinfo.c +++ b/arch/arm64/src/common/arm64_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -90,9 +88,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/risc-v/src/common/riscv_tcbinfo.c b/arch/risc-v/src/common/riscv_tcbinfo.c index 8a9ea80279..05d9809ef9 100644 --- a/arch/risc-v/src/common/riscv_tcbinfo.c +++ b/arch/risc-v/src/common/riscv_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -128,9 +126,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index c803ee8982..d4512e47a4 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -63,13 +63,9 @@ AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = sim_initialize.c sim_idle.c sim_doirq.c sim_initialstate.c CSRCS += sim_createstack.c sim_usestack.c sim_releasestack.c sim_stackframe.c CSRCS += sim_exit.c sim_schedulesigaction.c sim_switchcontext.c sim_heap.c -CSRCS += sim_uart.c sim_copyfullstate.c sim_sigdeliver.c +CSRCS += sim_uart.c sim_copyfullstate.c sim_sigdeliver.c sim_tcbinfo.c CSRCS += sim_registerdump.c sim_saveusercontext.c sim_textheap.c -ifeq ($(CONFIG_DEBUG_TCBINFO),y) -CSRCS += sim_tcbinfo.c -endif - ifeq ($(CONFIG_SCHED_BACKTRACE),y) CSRCS += sim_backtrace.c endif diff --git a/arch/sim/src/sim/CMakeLists.txt b/arch/sim/src/sim/CMakeLists.txt index 3e31209c50..55456fbe06 100644 --- a/arch/sim/src/sim/CMakeLists.txt +++ b/arch/sim/src/sim/CMakeLists.txt @@ -55,6 +55,7 @@ list( sim_sigdeliver.c sim_registerdump.c sim_saveusercontext.c + sim_tcbinfo.c sim_textheap.c) if(CONFIG_HOST_X86_64) diff --git a/arch/sim/src/sim/sim_tcbinfo.c b/arch/sim/src/sim/sim_tcbinfo.c index fb3689ad32..00cef7b365 100644 --- a/arch/sim/src/sim/sim_tcbinfo.c +++ b/arch/sim/src/sim/sim_tcbinfo.c @@ -24,8 +24,6 @@ #include -#ifdef CONFIG_DEBUG_TCBINFO - #include #include @@ -101,8 +99,6 @@ const struct tcbinfo_s g_tcbinfo = }, }; -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/xtensa/src/common/Make.defs b/arch/xtensa/src/common/Make.defs index b02be8544a..2ea5b56ff8 100644 --- a/arch/xtensa/src/common/Make.defs +++ b/arch/xtensa/src/common/Make.defs @@ -35,7 +35,7 @@ CMN_CSRCS += xtensa_modifyreg32.c xtensa_mdelay.c xtensa_nputs.c xtensa_perf.c CMN_CSRCS += xtensa_releasestack.c xtensa_registerdump.c xtensa_sigdeliver.c CMN_CSRCS += xtensa_switchcontext.c xtensa_swint.c xtensa_stackframe.c CMN_CSRCS += xtensa_saveusercontext.c xtensa_schedsigaction.c xtensa_udelay.c -CMN_CSRCS += xtensa_usestack.c +CMN_CSRCS += xtensa_usestack.c xtensa_tcbinfo.c # Configuration-dependent common Xtensa files @@ -43,10 +43,6 @@ ifeq ($(CONFIG_ARCH_USE_TEXT_HEAP),y) CMN_ASRCS += xtensa_loadstore.S endif -ifeq ($(CONFIG_DEBUG_TCBINFO),y) - CMN_CSRCS += xtensa_tcbinfo.c -endif - ifeq ($(CONFIG_ARCH_FPU),y) CMN_CSRCS += xtensa_fpucmp.c endif diff --git a/arch/xtensa/src/common/xtensa_tcbinfo.c b/arch/xtensa/src/common/xtensa_tcbinfo.c index 8b133ecc57..ddc80728a4 100644 --- a/arch/xtensa/src/common/xtensa_tcbinfo.c +++ b/arch/xtensa/src/common/xtensa_tcbinfo.c @@ -76,4 +76,3 @@ const struct tcbinfo_s g_tcbinfo = /**************************************************************************** * Public Functions ****************************************************************************/ - diff --git a/binfmt/libelf/Kconfig b/binfmt/libelf/Kconfig index 8ec94504b8..951e56b317 100644 --- a/binfmt/libelf/Kconfig +++ b/binfmt/libelf/Kconfig @@ -65,7 +65,7 @@ config ELF_SYMBOL_CACHECOUNT config ELF_COREDUMP bool "ELF Coredump" - select DEBUG_TCBINFO + depends on ARCH_HAVE_TCBINFO default n ---help--- Generate ELF core dump to provide information about the CPU state and the diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig index acbcd5b505..22332d2647 100644 --- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig +++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig @@ -23,7 +23,6 @@ CONFIG_DEBUG_SCHED_ERROR=y CONFIG_DEBUG_SCHED_INFO=y CONFIG_DEBUG_SCHED_WARN=y CONFIG_DEBUG_SYMBOLS=y -CONFIG_DEBUG_TCBINFO=y CONFIG_DEBUG_WARN=y CONFIG_DEFAULT_TASK_STACKSIZE=8192 CONFIG_DEV_ZERO=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/gdbstub/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/gdbstub/defconfig index fadbbc1ea0..7e52b5600d 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/gdbstub/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/gdbstub/defconfig @@ -23,7 +23,6 @@ CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y -CONFIG_DEBUG_TCBINFO=y CONFIG_DRIVERS_IEEE80211=y CONFIG_DRIVERS_WIRELESS=y CONFIG_ESP32C3_SPIFLASH=y diff --git a/fs/procfs/Kconfig b/fs/procfs/Kconfig index a07bc5ce44..6691898944 100644 --- a/fs/procfs/Kconfig +++ b/fs/procfs/Kconfig @@ -126,7 +126,7 @@ config FS_PROCFS_EXCLUDE_SMARTFS config FS_PROCFS_EXCLUDE_TCBINFO bool "Exclude tcbinfo procfs" - depends on DEBUG_TCBINFO + depends on ARCH_HAVE_TCBINFO default DEFAULT_SMALL config FS_PROCFS_EXCLUDE_UPTIME diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c index 11505e0e04..74cd06924a 100644 --- a/fs/procfs/fs_procfs.c +++ b/fs/procfs/fs_procfs.c @@ -170,15 +170,15 @@ static const struct procfs_entry_s g_procfs_entries[] = { "self/**", &g_proc_operations, PROCFS_UNKOWN_TYPE }, #endif -#if defined(CONFIG_DEBUG_TCBINFO) && !defined(CONFIG_FS_PROCFS_EXCLUDE_TCBINFO) +#if defined(CONFIG_ARCH_HAVE_TCBINFO) && !defined(CONFIG_FS_PROCFS_EXCLUDE_TCBINFO) { "tcbinfo", &g_tcbinfo_operations, PROCFS_FILE_TYPE }, #endif -#if !defined(CONFIG_FS_PROCFS_EXCLUDE_UPTIME) +#ifndef CONFIG_FS_PROCFS_EXCLUDE_UPTIME { "uptime", &g_uptime_operations, PROCFS_FILE_TYPE }, #endif -#if !defined(CONFIG_FS_PROCFS_EXCLUDE_VERSION) +#ifndef CONFIG_FS_PROCFS_EXCLUDE_VERSION { "version", &g_version_operations, PROCFS_FILE_TYPE }, #endif }; diff --git a/fs/procfs/fs_procfstcbinfo.c b/fs/procfs/fs_procfstcbinfo.c index 083fde59f0..bdb6c3b955 100644 --- a/fs/procfs/fs_procfstcbinfo.c +++ b/fs/procfs/fs_procfstcbinfo.c @@ -40,8 +40,8 @@ #include #include -#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_PROCFS) -#ifdef CONFIG_DEBUG_TCBINFO +#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_PROCFS) && \ + defined(CONFIG_ARCH_HAVE_TCBINFO) && !defined(CONFIG_FS_PROCFS_EXCLUDE_TCBINFO) /**************************************************************************** * Pre-processor Definitions @@ -277,5 +277,4 @@ static int tcbinfo_stat(FAR const char *relpath, FAR struct stat *buf) * Public Functions ****************************************************************************/ -#endif /* CONFIG_DEBUG_TCBINFO */ #endif /* !CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_PROCFS */ diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 253fdc2475..3bae61fed4 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -173,20 +173,18 @@ # define _SCHED_ERRVAL(r) (-errno) #endif -#ifdef CONFIG_DEBUG_TCBINFO -# define TCB_PID_OFF offsetof(struct tcb_s, pid) -# define TCB_STATE_OFF offsetof(struct tcb_s, task_state) -# define TCB_PRI_OFF offsetof(struct tcb_s, sched_priority) +#define TCB_PID_OFF offsetof(struct tcb_s, pid) +#define TCB_STATE_OFF offsetof(struct tcb_s, task_state) +#define TCB_PRI_OFF offsetof(struct tcb_s, sched_priority) #if CONFIG_TASK_NAME_SIZE > 0 # define TCB_NAME_OFF offsetof(struct tcb_s, name) #else # define TCB_NAME_OFF 0 #endif -# define TCB_REGS_OFF offsetof(struct tcb_s, xcp.regs) -# define TCB_REG_OFF(reg) (reg * sizeof(uintptr_t)) -# define TCB_STACK_OFF offsetof(struct tcb_s, stack_base_ptr) -# define TCB_STACK_SIZE_OFF offsetof(struct tcb_s, adj_stack_size) -#endif +#define TCB_REGS_OFF offsetof(struct tcb_s, xcp.regs) +#define TCB_REG_OFF(reg) (reg * sizeof(uintptr_t)) +#define TCB_STACK_OFF offsetof(struct tcb_s, stack_base_ptr) +#define TCB_STACK_SIZE_OFF offsetof(struct tcb_s, adj_stack_size) /* Get a pointer to the process' memory map struct from the task_group */ @@ -710,7 +708,6 @@ struct pthread_tcb_s * debuggers to parse the tcb information */ -#ifdef CONFIG_DEBUG_TCBINFO begin_packed_struct struct tcbinfo_s { uint16_t pid_off; /* Offset of tcb.pid */ @@ -739,7 +736,6 @@ begin_packed_struct struct tcbinfo_s } end_packed_struct reg_off; } end_packed_struct; -#endif /* This is the callback type used by nxsched_foreach() */ @@ -768,9 +764,7 @@ EXTERN unsigned long g_premp_max[CONFIG_SMP_NCPUS]; EXTERN unsigned long g_crit_max[CONFIG_SMP_NCPUS]; #endif /* CONFIG_SCHED_CRITMONITOR */ -#ifdef CONFIG_DEBUG_TCBINFO EXTERN const struct tcbinfo_s g_tcbinfo; -#endif /**************************************************************************** * Public Function Prototypes diff --git a/libs/libc/gdbstub/Kconfig b/libs/libc/gdbstub/Kconfig index faa91cdb90..a3a2ee1b2c 100644 --- a/libs/libc/gdbstub/Kconfig +++ b/libs/libc/gdbstub/Kconfig @@ -5,7 +5,7 @@ config LIB_GDBSTUB tristate "GDBSTUB" - depends on DEBUG_TCBINFO + depends on ARCH_HAVE_TCBINFO ---help--- Enable support for gdbstub.