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.
* 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.
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint.
* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
utils.c, valarith.c, valops.c, valprint.c, values.c:
Replace bcopy() use with memcpy(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
target.c, values.c:
Replace bzero() use with memset(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* i386-tdep.c, main.c, valprint.c:
Replace bcmp() use with memcmp(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* dwarfread.c (enum_type): Fix misspelling in comment.
* valprint.c (val_print_fields, cplus_val_print): Minor
adjustment to printing of C++ class structures to more closely
match format for printing C structures, with and without setting
pretty print.
C++ syms as demangled, not just functions.
* buildsym.c (read_range_type): When we find a signed char
type, do a lookup of signed char, not plain char. Plain char's
still get looked up as plain char's elsewhere.
* Makefile.in (DEMANGLE_OPTS): Remove obsolete -Dnounderscore
* Makefile.in (demangle): New target to create standalone
demangler with same code and options as internal demangler.
* cplus-dem.c: Massive restructuring, rewriting, cleanups, etc
to support ARM style and Lucid style demangling, improve
maintainability, fix several demangling bugs. More changes
to follow.
* defs.h (strstr): Add ANSI compatible prototype.
* valprint.c (type_print_1): Demangle using ansi option.
* config/ncr3000.mt (DEMANGLE_OPTS): Remove -Dnounderscore.
Allows selection of C++ demangler to be a configuration option
until multiple demanglers are supported.
* demangle.h: New include file for extended demangler support.
* breakpoint.c, gdbtypes.c, printcmd.c, stack.c, symtab.c,
utils.c, valprint.c: Include "demangle.h" and change all calls
to cplus_demangle() or fputs_demangled() to use individual
demangling options.
* valprint.c (type_print_1): Change options to cplus_demangle
to print demangled function args. Still broken, but now less so.
* cplus-dem.c: Include demangle.h, reorganize and update some
comments to reflect reality.
* cplus-dem.c (cplus_demangle, cplus_mangle_opname): Change
second arg from fixed integer to bit based multiple options.
* cplus-dem.c (optable): Reformat and replace ansi members with
bit based options.
* cplus-dem.c (do_type): Fix bug with parsing missing return type.
libiberty/strsignal.c. Widespread changes to use libiberty/strerror.c
functions for errno manipulations and libiberty/strsignal.c for signo
(signals) manipulations.
and use it to decide when to print the actual type name rather than
trying to invent the name of a fundamental type. This clears up the
confusion between int/long when they are the same sizes, removes one
obstacle to multi-language support (previously valprint.c thought
everything was a C type), and allows gdb to support distinctions between
explicitly and implicitly signed types when the compiler supports such
distinction in the debug output (as does every ANSI compiler I tested
except for gcc).
* symtab.c (list_symbols): demangle before pattern matching.
* symtab.c: Other fixes to improve handing of operators.
* valprint.c (type_print_base): Fix test for constructor.
* values.c (value_static_field): Allow evaluation of
CLASS::METHOD, returning a function pointer.
* utils.c: All the v*fprintf emulation is now in libiberty,
so we can get rid of some junk.
* xm-sun3os4.h, xm-sun4os4.h, xconfig/decstation, xconfig/i386sco,
xconfig/sun3os4, xconfig/sun4os4: Don`t need HAVE_STRSTR any more.
* m68k-pinsn.c (print_insn_arg): Support BB/BW/BL
type operands, as used by branch instructions.
* gmalloc.c: Fix prototype of memcpy.
* elfread.c: Comment out register_addr, since it conflicts
with the one in coredep.c.
* buildsym.h: Remove extern declarations of two functions
that are really static in buildsym.c.
* tm-mips.h: Add symbolic names for more registers.
* mips-xdep.c (store_inferior_registers): Use new register names.
* xm-mips.h: Simplify REGISTER_U_ADDR, since it is now
only used for core files, not ptrace. Therefore,
the KERNEL_U_ADDR hack is no longer needed.
The mapping to ptrace number is now in in mips-xdep.c.
* mips-xdep.c: Define REGISTER_PTRACE_ADDR (using the
mapping from the old REGISTER_U_ADDR), and use it
in {fetch,store}_inferior_registers.
* mipsread.c: Rename #include ecoff.h to new name coff-mips.h.
* mips-tdep.c (mips_push_dummy_frame, mips_pop_frame):
Save/restore FP regs correctly (?).
* dbxread.c: Remove duplicate define_symbol and type_synonym_name
(these had been previously moved to buildsym.c).
Hence, define_symbol becomes extern instead of static.
* buildsym.c (read_struct_type): Comment out bogus handling
of C++ operator methods. Minor hacking of reading of class
contexts. Make define_symbol non-static, so dbxread.c can call it.
* TODO: Document work needed on &fn and &array.
* printcmd.c (print_address_symbolic): New arg is the prefix
to print if a name is printed.
(print_address_demangle): Honor "set print address" now.
Use new arg above to improve spacing of output.
* valprint.c (val_print): When printing function pointers,
print symbolic form too.
* breakpoint.c (breakpoint_1): Use new print_address_symbolic.
* cplus-dem.c: Move CPLUS_MARKER define to after defs.h.
* infptrace.c (PT_WRITE_D, PT_READ_D): Use correct values.
(This still doesn't seem to make MIPS bkpts work.)
* mipsread.c: Remove dup "Reading symbol data..." msg.
(symbol_file_command, add_file_command): Remove, obsol.
* printcmd.c (ptype_command): Say "an enum" rather than "a enum".
Wrap output appropriately.
* stack.c (locals_info, catch_info, args_info): Check
selected_frame rather than target_has_stack or coredumping.
* valprint.c (type_print_varspec_suffix): Wrap "ptype" output of
enums appropriately.
* valprint.c (type_print_base): If the type being printed is a
struct containing undefined types, print "<undefine type>"
as the type instead of crashing.
* values.c (value_headof): Get the vtable pointer taking
TYPE_VPTR_BASETYPE into account.
* symtab.c, symtab.h, dbxread.c: Fix various whitespace splotches.
specially.
* valprint.c: Move print controls to top and add objectprint.
Add command "set print object on/off".
* valprint.c (value_print, is_vtbl_member): Put things in local
variables rather than continually doing VALUE_TYPE (val), etc.