* defs.h (is_cplus_marker, set_demangling_style): Moved to ...
* gdb-demangle.h: ... here. New file. * demangle.c: #include "gdb-demangle.h". (_initialize_demangler): Use initialize_file_ftype for prototype. Move "set demangle" and "set asm-demangle" parameters here from utils.c (demangle, show_demangle, asm_demangle, show_asm_demangle): Move here from utils.c * utils.c: Update. #include "gdb-demangle.h". * symtab.h (asm_demangle): Delete. (demangle): Move declaration next to use. * breakpoint.c: #include "gdb-demangle.h" instead of "demangle.h". * dwarf2read.c: #include "gdb-demangle.h". * gnu-v2-abi.c: Ditto. * jv-typeprint.c: Ditto. * mdebugread.c: Ditto. * p-typeprint.c: Ditto. * stabsread.c: Ditto. * printcmd.c: Ditto. (asm_demangle): Delete declaration. * tui/tui-stack.c: #include "gdb-demangle.h".
This commit is contained in:
parent
6953d2240a
commit
50f182aa66
15 changed files with 118 additions and 67 deletions
45
gdb/utils.c
45
gdb/utils.c
|
@ -50,7 +50,7 @@
|
|||
#include "serial.h"
|
||||
#include "bfd.h"
|
||||
#include "target.h"
|
||||
#include "demangle.h"
|
||||
#include "gdb-demangle.h"
|
||||
#include "expression.h"
|
||||
#include "language.h"
|
||||
#include "charset.h"
|
||||
|
@ -138,35 +138,6 @@ int quit_flag;
|
|||
|
||||
int immediate_quit;
|
||||
|
||||
/* Nonzero means that encoded C++/ObjC names should be printed out in their
|
||||
C++/ObjC form rather than raw. */
|
||||
|
||||
int demangle = 1;
|
||||
static void
|
||||
show_demangle (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file,
|
||||
_("Demangling of encoded C++/ObjC names "
|
||||
"when displaying symbols is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
/* Nonzero means that encoded C++/ObjC names should be printed out in their
|
||||
C++/ObjC form even in assembler language displays. If this is set, but
|
||||
DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */
|
||||
|
||||
int asm_demangle = 0;
|
||||
static void
|
||||
show_asm_demangle (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file,
|
||||
_("Demangling of C++/ObjC names in "
|
||||
"disassembly listings is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
/* Nonzero means that strings with character values >0x7F should be printed
|
||||
as octal escapes. Zero means just print the value (e.g. it's an
|
||||
international character, and the terminal or window can cope.) */
|
||||
|
@ -2864,13 +2835,6 @@ Show number of lines gdb thinks are in a page."), NULL,
|
|||
|
||||
init_page_info ();
|
||||
|
||||
add_setshow_boolean_cmd ("demangle", class_support, &demangle, _("\
|
||||
Set demangling of encoded C++/ObjC names when displaying symbols."), _("\
|
||||
Show demangling of encoded C++/ObjC names when displaying symbols."), NULL,
|
||||
NULL,
|
||||
show_demangle,
|
||||
&setprintlist, &showprintlist);
|
||||
|
||||
add_setshow_boolean_cmd ("pagination", class_support,
|
||||
&pagination_enabled, _("\
|
||||
Set state of pagination."), _("\
|
||||
|
@ -2895,13 +2859,6 @@ Show printing of 8-bit characters in strings as \\nnn."), NULL,
|
|||
show_sevenbit_strings,
|
||||
&setprintlist, &showprintlist);
|
||||
|
||||
add_setshow_boolean_cmd ("asm-demangle", class_support, &asm_demangle, _("\
|
||||
Set demangling of C++/ObjC names in disassembly listings."), _("\
|
||||
Show demangling of C++/ObjC names in disassembly listings."), NULL,
|
||||
NULL,
|
||||
show_asm_demangle,
|
||||
&setprintlist, &showprintlist);
|
||||
|
||||
add_setshow_boolean_cmd ("timestamp", class_maintenance,
|
||||
&debug_timestamp, _("\
|
||||
Set timestamping of debugging messages."), _("\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue