Skip to content

!libc/gdbstub: rename config symbols to LIBC_GDBSTUB - #22272

Open
anjiahao1 wants to merge 1 commit into
apache:masterfrom
anjiahao1:20261124_gdbstub-rename
Open

anjiahao1 wants to merge 1 commit into
apache:masterfrom
anjiahao1:20261124_gdbstub-rename

Conversation

@anjiahao1

@anjiahao1 anjiahao1 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

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.

Apps companion: apache/nuttx-apps#4128 (must be merged together).

Depends-on: apache/nuttx-apps#4128

LIB_GDBSTUB is kept as a deprecated alias so this change passes CI
against the current apps master. The apps companion accepts both
LIBC_GDBSTUB and LIB_GDBSTUB, so it also passes against the current
NuttX master. Both PRs can be merged in either order once their CI is
green; a follow-up removes the alias.

Impact

  • Is new feature added? NO
  • Impact on user: YES - configuration symbol names change.
  • Impact on build: YES - defconfigs and Kconfig are updated.
  • Impact on hardware: NO
  • Impact on documentation: NO
  • Impact on security: NO
  • Impact on compatibility: YES - CONFIG_LIB_GDBSTUB is renamed to
    CONFIG_LIBC_GDBSTUB. A deprecated LIB_GDBSTUB alias defaults to the
    new symbol so existing defconfigs and the current apps tree keep
    building during the transition; the alias will be removed in a
    follow-up.

Breaking change

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.

Testing

Build host: Linux x86_64 (Ubuntu 24.04), arm-none-eabi-gcc 12.2
Target: qemu-armv7a:gdbstub

tools/configure.sh -a <apps> qemu-armv7a:gdbstub
make -j10

The renamed symbols are used consistently across the libc, the serial
gdbstub driver, and the board defconfigs. The qemu-armv8a:gdbstub and
esp32c3-legacy-devkit:gdbstub defconfigs were refreshed to canonical
form after the rename.

Pair build with the apps companion (qemu-armv7a:gdbstub-pair with
CONFIG_SYSTEM_GDBSTUB=y, apps pointed at the apps PR worktree)
confirms that the gdbstub app is enabled and the image builds.

PR verification

  • This PR introduces only one functional change.
  • I have updated all required description fields above.
  • My PR adheres to Contributing Guidelines and Documentation.
  • My PR is still work in progress (not ready for review).
  • My PR is ready for review and can be safely merged into a codebase.

@anjiahao1

Copy link
Copy Markdown
Contributor Author

Paired with apache/nuttx-apps#4128

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

mps2-an500-citest

  • flash: .text +40 B (+0.0%, 247,672 B / 4,194,304 B, total: 6% used)

qemu-armv7a-citest

  • ROM: .data +16 B, .init_section -48 B, .text +48 B (+0.0%, 554,088 B / 1,048,576 B, total: 53% used)

qemu-intel64

  • Code: .text -1 B (-0.0%, 8,707,381 B)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@cederom cederom left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @anjiahao1, looks like this is the last one LIB in the libc, but this is a breaking change, please mark it accordingly so gdbstub users are not surprised when things change (! prefix in the PR and git commit, plus "BREAKING CHANGE:` quick-fix instructions) :-)

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 <anjiahao@xiaomi.com>
@anjiahao1
anjiahao1 force-pushed the 20261124_gdbstub-rename branch from 2e79bd3 to 52ced52 Compare November 25, 2026 03:21
@anjiahao1 anjiahao1 changed the title libc/gdbstub: rename config symbols to LIBC_GDBSTUB !libc/gdbstub: rename config symbols to LIBC_GDBSTUB Nov 25, 2026
@anjiahao1

anjiahao1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the review, and you're right - this is a breaking
configuration rename. I've marked it accordingly: the commit and PR
titles start with '!', both bodies include 'BREAKING CHANGE:' with the
quick-fix instructions. I don't have permission to add labels to this
repository; could a maintainer add the 'breaking change' label so CI
enforces the breaking format?

The rename is CONFIG_LIB_GDBSTUB -> CONFIG_LIBC_GDBSTUB (and the
DEBUG/PKTSIZE variants). A deprecated LIB_GDBSTUB alias defaults to
LIBC_GDBSTUB, and the companion apps PR accepts both symbols, so
existing defconfigs and the current apps tree keep building during the
transition; the alias will be removed in a follow-up. Quick fix for
users: replace the old symbols in their defconfig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Drivers Drivers issues Board: arm Board: arm64 Board: risc-v Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants