From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 0/3] Use gnulib c-ctype module, not <ctype.h>
Date: Wed, 06 Aug 2025 07:13:31 -0600 [thread overview]
Message-ID: <20250806-gnulib-c-ctype-v1-0-10f33e9f22a4@adacore.com> (raw)
This series changes gdb to use the gnulib c-ctype module rather than
<ctype.h> or "safe-ctype.h".
The rationale is mostly in patch #3. I do wonder if it would be
better to just add the casts everywhere.
Regression tested on x86-64 Fedora 41. This doesn't cover
solib-rocm.c though.
Signed-off-by: Tom Tromey <tromey@adacore.com>
---
Tom Tromey (3):
Import the c-ctype module from gnulib
Use c-ctype.h (not safe-ctype.h) in gdb
Use gnulib c-ctype module in gdb
gdb/aarch64-linux-tdep.c | 9 +-
gdb/ada-exp.y | 5 +-
gdb/ada-lang.c | 87 ++++----
gdb/ada-lex.l | 23 +--
gdb/ada-typeprint.c | 3 +-
gdb/ada-valprint.c | 5 +-
gdb/arm-linux-tdep.c | 9 +-
gdb/arm-tdep.c | 1 -
gdb/auto-load.c | 3 +-
gdb/break-catch-exec.c | 4 +-
gdb/break-catch-fork.c | 2 +-
gdb/break-catch-syscall.c | 3 +-
gdb/break-catch-throw.c | 3 +-
gdb/break-cond-parse.c | 4 +-
gdb/breakpoint.c | 7 +-
gdb/btrace.c | 5 +-
gdb/c-exp.y | 19 +-
gdb/c-lang.c | 11 +-
gdb/c-support.h | 10 +-
gdb/charset.c | 1 -
gdb/cli/cli-cmds.c | 16 +-
gdb/cli/cli-decode.c | 9 +-
gdb/cli/cli-dump.c | 1 -
gdb/cli/cli-option.c | 4 +-
gdb/cli/cli-script.c | 7 +-
gdb/cli/cli-setshow.c | 3 +-
gdb/cli/cli-utils.c | 27 ++-
gdb/coff-pe-read.c | 3 +-
gdb/coffread.c | 7 +-
gdb/completer.c | 2 +-
gdb/cp-name-parser.y | 11 +-
gdb/cp-support.c | 9 +-
gdb/d-exp.y | 22 +-
gdb/darwin-nat.c | 1 -
gdb/dictionary.c | 4 +-
gdb/disasm.c | 1 -
gdb/dwarf2/cooked-index-entry.c | 3 +-
gdb/dwarf2/index-common.c | 10 +-
gdb/dwarf2/read.c | 4 +-
gdb/eval.c | 1 -
gdb/exec.c | 3 +-
gdb/expprint.c | 1 -
gdb/f-exp.y | 5 +-
gdb/fbsd-nat.c | 2 +-
gdb/findcmd.c | 7 +-
gdb/gdb_wchar.h | 4 +-
gdb/gnu-nat.c | 3 +-
gdb/gnu-v2-abi.c | 3 +-
gdb/go-exp.y | 9 +-
gdb/go-lang.c | 3 +-
gdb/go32-nat.c | 1 -
gdb/guile/scm-cmd.c | 1 -
gdb/i386-tdep.c | 25 ++-
gdb/ia64-linux-tdep.c | 5 +-
gdb/infcmd.c | 7 +-
gdb/infrun.c | 3 +-
gdb/language.c | 1 -
gdb/linespec.c | 19 +-
gdb/linux-fork.c | 3 +-
gdb/linux-nat.c | 1 -
gdb/linux-tdep.c | 17 +-
gdb/linux-thread-db.c | 1 -
gdb/location.c | 17 +-
gdb/main.c | 3 +-
gdb/maint.c | 5 +-
gdb/mi/mi-cmd-break.c | 3 +-
gdb/mi/mi-cmd-stack.c | 2 -
gdb/mi/mi-cmd-var.c | 3 +-
gdb/mi/mi-main.c | 1 -
gdb/mi/mi-parse.c | 11 +-
gdb/minsyms.c | 2 -
gdb/minsyms.h | 2 +-
gdb/nat/linux-osdata.c | 15 +-
gdb/netbsd-nat.c | 2 +-
gdb/objc-lang.c | 13 +-
gdb/or1k-tdep.c | 1 -
gdb/p-exp.y | 17 +-
gdb/p-lang.c | 1 -
gdb/p-typeprint.c | 5 +-
gdb/parse.c | 1 -
gdb/ppc-linux-tdep.c | 13 +-
gdb/printcmd.c | 1 -
gdb/probe.c | 3 +-
gdb/procfs.c | 5 +-
gdb/producer.c | 4 +-
gdb/python/py-mi.c | 6 +-
gdb/python/py-micmd.c | 4 +-
gdb/python/py-objfile.c | 2 +-
gdb/python/python.c | 1 -
gdb/record.c | 9 +-
gdb/remote-sim.c | 1 -
gdb/remote.c | 7 +-
gdb/riscv-tdep.c | 5 +-
gdb/rust-lang.c | 3 +-
gdb/s12z-tdep.c | 2 +-
gdb/s390-tdep.c | 4 +-
gdb/serial.c | 3 +-
gdb/solib-rocm.c | 6 +-
gdb/stabsread.c | 7 +-
gdb/stack.c | 4 +-
gdb/stap-probe.c | 23 +--
gdb/symfile.c | 3 +-
gdb/symtab.c | 17 +-
gdb/thread.c | 5 +-
gdb/tid-parse.c | 7 +-
gdb/top.c | 1 -
gdb/tracectf.c | 1 -
gdb/tracepoint.c | 6 +-
gdb/tui/tui-layout.c | 7 +-
gdb/tui/tui-win.c | 3 +-
gdb/tui/tui-winsource.c | 3 +-
gdb/typeprint.c | 5 +-
gdb/unittests/command-def-selftests.c | 4 +-
gdb/utils.c | 47 ++---
gdb/valprint.c | 1 -
gdb/value.c | 5 +-
gdb/windows-nat.c | 6 +-
gdb/xcoffread.c | 1 -
gdb/xml-support.c | 5 +-
gdbserver/gdbreplay.cc | 1 -
gdbserver/linux-low.cc | 3 +-
gdbserver/remote-utils.cc | 7 +-
gdbserver/server.cc | 9 +-
gdbserver/thread-db.cc | 3 +-
gdbserver/tracepoint.cc | 3 +-
gdbsupport/common-defs.h | 6 +
gdbsupport/common-utils.cc | 21 +-
gdbsupport/gdb-safe-ctype.h | 49 -----
gdbsupport/pathstuff.cc | 2 +-
gnulib/configure | 25 +--
gnulib/import/Makefile.am | 7 +
gnulib/import/Makefile.in | 33 ++-
gnulib/import/c-ctype.c | 21 ++
gnulib/import/c-ctype.h | 366 ++++++++++++++++++++++++++++++++++
gnulib/import/m4/gnulib-cache.m4 | 2 +
gnulib/import/m4/gnulib-comp.m4 | 3 +
gnulib/update-gnulib.sh | 1 +
137 files changed, 828 insertions(+), 561 deletions(-)
---
base-commit: c2729c37f10af09126b2916215cae425ae724f55
change-id: 20250805-gnulib-c-ctype-1b8fb88a6c5e
Best regards,
--
Tom Tromey <tromey@adacore.com>
next reply other threads:[~2025-08-06 13:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 13:13 Tom Tromey [this message]
2025-08-06 13:13 ` [PATCH 1/3] Import the c-ctype module from gnulib Tom Tromey
2025-08-06 13:13 ` [PATCH 2/3] Use c-ctype.h (not safe-ctype.h) in gdb Tom Tromey
2025-08-06 13:13 ` [PATCH 3/3] Use gnulib c-ctype module " Tom Tromey
2025-08-06 19:46 ` [PATCH 0/3] Use gnulib c-ctype module, not <ctype.h> Simon Marchi
2025-08-07 20:39 ` Tom Tromey
2025-08-20 17:14 ` Simon Marchi
2025-09-09 17:53 ` Tom Tromey
2025-09-09 18:01 ` Simon Marchi
2025-09-09 18:55 ` Tom Tromey
2025-10-14 13:00 ` Guinevere Larsen
2025-10-14 19:19 ` Tom Tromey
2025-10-16 15:30 ` Tom Tromey
2025-10-16 21:50 ` Luis
2025-10-21 12:59 ` Tom Tromey
2025-10-21 17:37 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250806-gnulib-c-ctype-v1-0-10f33e9f22a4@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox