@@ -1009,7 +1009,6 @@ COMMON_SFILES = \
dbxread.c \
dcache.c \
debug.c \
- demangle.c \
dictionary.c \
disasm.c \
disasm-selftests.c \
@@ -1040,6 +1039,7 @@ COMMON_SFILES = \
frame-base.c \
frame-unwind.c \
gcore.c \
+ gdb-demangle.c \
gdb_bfd.c \
gdb_obstack.c \
gdb_regex.c \
similarity index 99%
rename from gdb/demangle.c
rename to gdb/gdb-demangle.c
@@ -149,7 +149,7 @@ static char cplus_markers[] = {'$', '.', '\0'};
/* See documentation in gdb-demangle.h. */
-int
+bool
is_cplus_marker (int c)
{
return c && strchr (cplus_markers, c) != NULL;
@@ -213,7 +213,7 @@ demangle_command (const char *args, int from_tty)
}
void
-_initialize_demangler (void)
+_initialize_gdb_demangle (void)
{
int i, ndems;
@@ -29,6 +29,6 @@ extern bool demangle;
extern bool asm_demangle;
/* Check if a character is one of the commonly used C++ marker characters. */
-extern int is_cplus_marker (int);
+extern bool is_cplus_marker (int);
#endif /* GDB_DEMANGLE_H */
@@ -33,6 +33,7 @@
#include "gdbsupport/gdb_string_view.h"
#include "gdbsupport/next-iterator.h"
#include "completer.h"
+#include "gdb-demangle.h"
/* Opaque declarations. */
struct ui_file;
@@ -553,7 +554,6 @@ extern const char *symbol_demangled_name
#define SYMBOL_PRINT_NAME(symbol) \
(demangle ? SYMBOL_NATURAL_NAME (symbol) : SYMBOL_LINKAGE_NAME (symbol))
-extern bool demangle;
/* Macro that returns the name to be used when sorting and searching symbols.
In C++, we search for the demangled form of a name,