Use c-ctype.h (not safe-ctype.h) in gdb

This changes gdb and related programs to use the gnulib c-ctype code
rather than safe-ctype.h.  The gdb-safe-ctype.h header is removed.

This changes common-defs.h to include the c-ctype header, making it
available everywhere in gdb.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33217
Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2025-08-04 09:58:43 -06:00
parent 50673a4629
commit 15e11aac9c
23 changed files with 78 additions and 140 deletions

View File

@@ -46,7 +46,6 @@
#include <langinfo.h>
#include <iconv.h>
#include "gdbsupport/filestuff.h"
#include "gdbsupport/gdb-safe-ctype.h"
#include "tracepoint.h"
#include <inttypes.h>
#include "gdbsupport/common-inferior.h"
@@ -7012,7 +7011,7 @@ replace_non_ascii (char *dest, const char *name)
const char *result = dest;
while (*name != '\0')
{
if (!ISPRINT (*name))
if (!c_isprint (*name))
*dest++ = '?';
else
*dest++ = *name;