demangling style for C++. Defaults to "auto".
* Makefile.in (DEMANGLE_OPTS): Use DEMANGLING_STYLE.
* Makefile.in (SFILES_MAINDIR): Add demangle.c
* Makefile.in (OBS): Add demangle.o
* cplus-dem.c (GNU_DEMANGLING, ARM_DEMANGLING, LUCID_DEMANGLING):
Remove compile time decisions about demangling style and replace
with runtime decisions using current_demangling_style.
* cplus-dem.c (main): Expand code included during building of
standalone demangler to recognize demangling style options.
* dbxread.c (demangle.h): Include.
* dbxread.c (read_ofile_symtab, process_one_symbol): Set GNU C++
demangling style if processing g++ code and current demangling style
is auto (Note: this feature currently disabled.)
* demangle.c: New file, generic demangling control.
* demangle.h (demangling_styles): New enumeration to select one
of several demangling styles. Also define string names for each
style.
* demangle.h (set_demangling_style): Add prototype.
* dwarfread.c (demangle.h): Include.
* dwarfread.c (GPLUS_PRODUCER, LCC_PRODUCER, CFRONT_PRODUCER):
New producer string prefixes to recognize.
* dwarfread.c (handle_producer): Consolidate actions for specific
producers. Set demangling style based on producer string if
current style is auto. (Note: this feature currently disabled.)
* config/ncr3000.mt (DEMANGLE_OPTS): Remove.
NOT full config doc) and xref to configure.info
(2) add brief mention of --help and --prefix=DIR configure options
(3) re-enable, with new command names, old doc for commands now
reorganized into maint. (NO new doc yet for new maint commands or for
old undoc'd dump-me; nor for "maint" itself in general.)
(2) [temporarily, until "maint" details avail] hide explanations of commands
moved to "maint" so we don't risk releasing doc with obsolete names:
printsyms, printmsyms, printpsyms, info all-breakpoints.
* c-exp.y: Call lookup_signed_typename() after seeing
"signed". This handles "signed char" correctly.
* c-exp.y: Recognize (but ignore) 'const' and 'volatile'
keywords before a type specifier.
* gdbcmd.h (maintenanceprintlist): Add declaration.
* main.c (maintenanceprintlist): Add definition.
* main.c (gdb_completer_command_word_break_characters): Add.
* main.c (symbol_completion_function): Switch completer word
break character sets dynamically, based on whether completion is
being done on commands or on something else.
* main.c (initialize_cmd_lists): Init maintenanceprintlist.
* maint.c: Include demangle.h.
* maint.c (maintenance_demangle): New function.
* maint.c (maintenance_print_command): New function.
* maint.c (_initialize_maint_cmds): Reorganize some commands
under new maintenance print subcommand.
to create new blank types, instead of handcrafting them.
* defs.h (printfi_filtered): Add prototype.
* utils.c (printfi_filtered): New function.
* gdbtypes.c (recursive_dump_type): Use printfi_filtered to
to simplify the code. Other cleanups.
* gdbtypes.c (check_stub_method): Demangle using DMGL_ANSI.
* gdbtypes.h (struct cplus_struct_type): Add comments describing
use of various fields.
* gdbtypes.c (print_bit_vector, print_cplus_stuff): New functions.
* c-exp.y (%token): Add CLASS as a token for C++, add grammar
production that currently treats it exactly the same as STRUCT.
* c-exp.y (yylex): Recognize "class" as token CLASS.
* symtab.c (gdb_mangle_name): Rewrite to match current g++ stabs.
* symtab.c (decode_line_1): Fix to pass quoted args on down to
general symbol handling code. Call cplus_mangle_opname with
DMGL_ANSI.
* symtab.c (decode_line_2): Print demangled function names in
breakpoint menus, instead of just file and line number.
* symtab.c (name_match): Call cplus_demangle with DMGL_ANSI.
* valprint.c (type_print_base): Print "class" for C++ classes,
rather than "struct". Print section labels for public, protected
and private members of C++ classes.
* values.c: Include demangle.h.
* values.c (value_headof): Call cplus_demangle with DMGL_ANSI.
prevent crashes when examining cross-targets.
* dbxread.c (process_one_symbol): Include directory name when
calling start_subfile for SOL & BINCL symbols. This allows gdb to
find include files, and yacc/lex sources when the cwd doesn't match
that in which the object was compiled.
* objfiles.h (ALL_MSYMBOLS): Don't seg fault when there are no
msymbols.
* symtab.c (lookup_symtab_1): Rewrite. It now handles include
files.
* Makefile.in (SFILES_MAINDIR): Add new file maint.c.
* Makefile.in (OBS): Add new file maint.o.
* defs.h (command_class): Add class_maintenance.
* defs.h (MAINTENANCE_CMDS): Default to including maintenance
commands. Allow for them (and other nonessential parts of gdb)
to be selectively left out under special circumstances.
* gdbtypes.c (recursive_dump_type): New function; supports
maintenance print-type command.
* gdbtypes.h (recursive_dump_type, maintenance_print_type):
Add prototypes.
* main.c (maintenancelist, maintenanceinfolist): Add maintenance
command lists.
* main.c (initialize_cmd_lists): Eliminate unnecessary casts on
initializers. Add initializations for setprintlist, showprintlist,
setchecklist, showchecklist, maintenancelist, and maintenanceinfolist.
* printcmd.c (maintenance_print_type): New maintenance cmd.
* valprint.c (setprintlist, showprintlist): Move to main.c, as
implied by comment that all cmd lists are owned by main.c.
* infcmd.c (unsetlist): Move to main.c, as implied by comment
that all cmd lists are owned by main.c.
* language.c (setchecklist, showchecklist): Move to main.c, as
implied by comment that all cmd lists are owned by main.c
* breakpoint.c (enablelist, enablebreaklist, disablelist, cmdlist,
deletelist): Remove redundant declarations (also in gdbcmd.h).
* symmisc.c (printsyms_command): Now maintenance_print_symbols.
* symmisc.c (printmsyms_command): Now maintenance_print_msymbols.
* symmisc.c (printpsyms_command): Now maintenance_print_psymbols.
* symmisc.c (printobjfiles_command): Now maintenance_print_objfiles.
* symtab.h (maintenance_print_symbols, maintenance_print_psymbols,
maintenance_print_msymbols, maintenance_print_objfiles):
Add prototypes.
* symmisc.c (printsyms_command, printpsyms_command,
printmsyms_command, printobjfiles_command): Removed from
_initialize_symmisc.
* main.c (dump_me_command): Moved to maint.c and renamed to
maintenance_dump_me.
* breakpoint.c (all_breakpoints_info): Rename to
maintenance_info_breakpoints.
* breakpoint.c (_initialize_breakpoint): Convert add_info of
all_breakpoints_info to add maintenance_info_breakpoints to the
maintenanceinfolist instead.
main.c (initialize_main): Set up maintenance class commands.
* cplus-dem.c (demangle_args): Validate index for previously
seen type to guard against bogus values from malformed manglings.
* valops.c (value_struct_elt_for_reference): Guard against
blindly using NULL return value from lookup_symbol.
energize-patches. Change all routines and variables named
'cadillac*' to 'energize*'. Create new file called energize.h to
hold all interface declarations.
* deblib/connection/*: Move all of this stuff into energize/, but
delete unneeded files.
energize-patches. Change all routines and variables named
'cadillac*' to 'energize*'. Create new file called energize.h to
hold all interface declarations.
* dbxread.c (process_one_symbol): Parse N_OPT "gcc2_compiled.".
* procfs.c (proc_set_exec_trap): Set run-on-last-close flag on
child processes, to avoid dead ones "hanging around" after GDB exits.
(attach): Always stop the process if it needs it. Set RLC flag
when attaching running processes, so it will continue if we detach
it, quit, or are killed.
(detach): Clear faults and set RLC flag to make process run
when we close it.
(open_proc_file): New `mode' argument for O_RDONLY or O_RDWR.
Callers changed.
(info_proc): Open process O_RDONLY, so we can see any process,
even those controlled by debuggers.
* tm-sun4sol2.h (SUN_FIXED_LBRAC_BUG): They did (in Sol 2).
single `addr' or `offset'. This makes Solaris-2 support work, and
permits better VxWorks (and maybe xcoff) support later.
* dbxread.c: Conforming changes.
(struct dbx_symfile_info): Move to gdb-stabs.h.
(start_psymtab): Call elfstab_offset_sections to calculate good
offsets for this source file, based on the ELF symbol table info.
(read_ofile_symtab): Yank N_CATCH, which is dead.
(process_one_symbol, N_CATCH): Yank.
(", N_FUN, N_FNAME, N_FN, N_FN_SEQ, N_SO, N_SOL, N_ENTRY):
Relocate with SECT_OFF_TEXT.
(", N_STSYM, N_LCSYM, N_ROSYM): Grope around in the stab string
to distinguish relocatable from absolute symbols. Then, if not
absolute, do:
(", N_STSYM, N_DSLINE): SECT_OFF_DATA.
(", N_LCSYM, N_BSLINE): SECT_OFF_BSS.
(", N_ROSYM): SECT_OFF_RODATA.
(elfstab_build_psymtabs): Caller has allocated dbx_symfile_info.
(dbx_symfile_offsets): Add to translate addr to offset.