Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions boards/arm/mps/mps3-an547/configs/gdbstub/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions boards/arm/stm32f4/stm32f429i-disco/configs/gdbstub/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libs/libc/gdbstub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
# ##############################################################################

if(CONFIG_LIB_GDBSTUB)
if(CONFIG_LIBC_GDBSTUB)
target_sources(c PRIVATE lib_gdbstub.c)

if(CONFIG_MM_KASAN)
Expand Down
17 changes: 12 additions & 5 deletions libs/libc/gdbstub/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion libs/libc/gdbstub/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
############################################################################

ifeq ($(CONFIG_LIB_GDBSTUB),y)
ifeq ($(CONFIG_LIBC_GDBSTUB),y)

# Add the internal C files to the build

Expand Down
12 changes: 6 additions & 6 deletions libs/libc/gdbstub/lib_gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand All @@ -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)
Expand All @@ -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 */
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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

Expand Down
Loading