diff options
author | Manoj Gupta <manojgupta@google.com> | 2023-04-17 13:33:15 -0700 |
---|---|---|
committer | Roland McGrath <mcgrathr@google.com> | 2023-04-29 00:35:11 -0700 |
commit | e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b (patch) | |
tree | 4bc6cccc146f7213100c5f1fc9642a3eb63fbdb4 /gdb | |
parent | bc752bfbd98b6c2b02d59ed0a6c7ca88fbf4e3e0 (diff) | |
download | gdb-e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b.zip gdb-e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b.tar.gz gdb-e0f4b3ec5f36ff90dbea21aab2190fb4565ca67b.tar.bz2 |
gdb: Fix building with latest libc++
Latest libc++[1] causes transitive include to <locale> when
<mutex> or <thread> header is included. This causes
gdb to not build[2] since <locale> defines isupper/islower etc.
functions that are explicitly macroed-out in safe-ctype.h to
prevent their use.
Use the suggestion from libc++ to include <locale> internally when
building in C++ mode to avoid build errors.
Use safe-gdb-ctype.h as the include instead of "safe-ctype.h"
to keep this isolated to gdb since rest of binutils
does not seem to use much C++.
[1]: https://reviews.llvm.org/D144331
[2]: https://issuetracker.google.com/issues/277967395
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/cp-name-parser.y | 2 | ||||
-rw-r--r-- | gdb/cp-support.c | 2 | ||||
-rw-r--r-- | gdb/dictionary.c | 2 | ||||
-rw-r--r-- | gdb/disasm.c | 2 | ||||
-rw-r--r-- | gdb/dwarf2/cooked-index.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-stack.c | 2 | ||||
-rw-r--r-- | gdb/minsyms.c | 2 | ||||
-rw-r--r-- | gdb/or1k-tdep.c | 2 | ||||
-rw-r--r-- | gdb/printcmd.c | 2 | ||||
-rw-r--r-- | gdb/riscv-tdep.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-layout.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 2 | ||||
-rw-r--r-- | gdb/xml-support.c | 2 |
13 files changed, 13 insertions, 13 deletions
diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index 175e763..8018807 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -40,7 +40,7 @@ #include "defs.h" #include <unistd.h> -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "demangle.h" #include "cp-support.h" #include "c-support.h" diff --git a/gdb/cp-support.c b/gdb/cp-support.c index f39c5d0..e804024 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -36,7 +36,7 @@ #include "namespace.h" #include <signal.h> #include "gdbsupport/gdb_setjmp.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "gdbsupport/selftest.h" #include "gdbsupport/gdb-sigmask.h" #include <atomic> diff --git a/gdb/dictionary.c b/gdb/dictionary.c index 403508a..4f8df24 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -26,7 +26,7 @@ #include "symtab.h" #include "buildsym.h" #include "dictionary.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include <unordered_map> #include "language.h" diff --git a/gdb/disasm.c b/gdb/disasm.c index 03cd4b7..e6b31bf 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -27,7 +27,7 @@ #include "gdbcmd.h" #include "dis-asm.h" #include "source.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include <algorithm> #include "gdbsupport/gdb_optional.h" #include "valprint.h" diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index 1b1a16b..25635d9 100644 --- a/gdb/dwarf2/cooked-index.c +++ b/gdb/dwarf2/cooked-index.c @@ -29,7 +29,7 @@ #include "observable.h" #include "run-on-main-thread.h" #include <algorithm> -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "gdbsupport/selftest.h" #include <chrono> #include <unordered_set> diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 4c4662a..b8169a6 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -35,7 +35,7 @@ #include <ctype.h> #include "mi-parse.h" #include "gdbsupport/gdb_optional.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "inferior.h" #include "observable.h" diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 5fcc724..07e83e8 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -52,7 +52,7 @@ #include "cli/cli-utils.h" #include "gdbsupport/symbol.h" #include <algorithm> -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "gdbsupport/parallel-for.h" #include "inferior.h" diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 0d52066..5cef1fa 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -29,7 +29,7 @@ #include "gdbtypes.h" #include "target.h" #include "regcache.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "reggroups.h" #include "arch-utils.h" #include "frame-unwind.h" diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 6435311..f6d5bad 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -53,7 +53,7 @@ #include "source.h" #include "gdbsupport/byte-vector.h" #include "gdbsupport/gdb_optional.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "gdbsupport/rsp-low.h" /* Chain containing all defined memory-tag subcommands. */ diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 144eb7e..500279e 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -56,7 +56,7 @@ #include "prologue-value.h" #include "arch/riscv.h" #include "riscv-ravenscar-thread.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" /* The stack must be 16-byte aligned. */ #define SP_ALIGNMENT 16 diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 01d243b..50c568f 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -43,7 +43,7 @@ #include "tui/tui-layout.h" #include "tui/tui-source.h" #include "gdb_curses.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" static void extract_display_start_addr (struct gdbarch **, CORE_ADDR *); diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 84f9d97..3c4ce50 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -28,7 +28,7 @@ #include "source.h" #include "objfiles.h" #include "filenames.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include "tui/tui.h" #include "tui/tui-data.h" diff --git a/gdb/xml-support.c b/gdb/xml-support.c index 255c108..0c98dc7 100644 --- a/gdb/xml-support.c +++ b/gdb/xml-support.c @@ -22,7 +22,7 @@ #include "xml-builtin.h" #include "xml-support.h" #include "gdbsupport/filestuff.h" -#include "safe-ctype.h" +#include "gdbsupport/gdb-safe-ctype.h" #include <vector> #include <string> |