* 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.
* 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).
* partial-stab.h: Ignore N_ENDM.
* elfread.c (elf_symtab_read): Ignore symbols that don't have a
CODE or DATA section attachment. This eliminates a lot of random
values from shared libraries, which screw up the ordinary symbols
in the address ranges they happen to overlap.
* buildsym.c (define_symbol): Eliminate special tests
for function types; move into "function" cases in switch statement.
(define_symbol: 'f', 'F', 'P'): Process all parameter types
in case they define new type numbers. But ignore them (FIXME).
('k', 'B'): Ignore const and volatile if we see them (FIXME).
(read_sun_builtin_type): Add commentary.
* tm-mips.h (GDB_TARGET_IS_MIPS): Define for mips-xdep.c.
(READ_MIPS_FORMAT, COFF_FORMAT): Remove, unused now.
* mips-xdep.c: Remove most include files (unused, caused errs).
(fetch_core_registers): Use right parameters in dummy fn.
Fix from Jim Williams.
* stack.c (return_command): Evaluate expression *before* popping
off the stack frames! Fix inspired by Jim Williams.
(up_silently_command, down_silently_command): No sel frame is error.
* defs.h (memcpy, memset): Conditionalize decls on
#ifndef MEM_FNS_DECLARED, since DECstation differs.
(alloca): Break out the STDC and non-STDC alloca cases, to make
it work on old preprocessors as well as "picky ANSI" ones.
* xm-mips.h (memcpy, memset): Declare, and set MEM_FNS_DECLARED.
* mips-tdep.c (heuristic_proc_start): Zero arg produces zero.
* utils.c (fputs_demangled): Rename SLOP since DECstation system
header files define it!
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.
* defs.h (alloca): More diddling with alloca. Have to ensure
that it has a prototype, so that if alloca is defined as a macro
that takes an arg, the definition is seen as a use of a macro
that takes an arg, to satisfy picky ANSI preprocessors.
consistency with all other gdb files.
* cadillac.c: Use <string.h> rather than <strings.h>.
* cadillac.c (kernel_dispatch): Convert rindex usage to strrchr.
* Makefile.in (MAKE): Remove definition for consistency with
other Makefile.in files and to fix problem with recursive makes.
conditional.
* hppabsd-core.c: Don't include "param.h", include <sys/param.h>
instead.
* remote.c (remote_wait): Cast signal to void * to avoid warning
from busted HP compiler.
* gdbtypes.c (init_type): Use copy of typename on type_obstack.
* dwarfread.c (enum_type): Save enum names on type_obstack.
* dwarfread.c (struct_type): Save member name on type_obstack.
* symtab.c (_initialize_symtab): Fix misspelling.
* regex.c (store_jump, insert_jump): Return void.
detecting start of new symbol info after reading symtab for a
module with a zero length TEXT segment.
(Note that this fixes the BNR problem with printing vxWorksVersion. That ought
to make Ken happy).
* coffread.c (coff_end_symtab): Cast 2nd arg of complain() to
correct type.
* defs.h (NORETURN): Define away for Lucid compiler.
* remote.c (remote_timer, remote_interrupt): Signal handlers
take one int arg.
* ser-termios.c (serial_write, serial_close): Return whatever
value the write/close call returns, rather than falling off end.
* inferior.h (PTRACE_ARG3_TYPE): Third arg to ptrace is int on
more systems than it is "char *". Define PTRACE_ARG3_TYPE to
default to int.
* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
inferior.h (call_ptrace): Use PTRACE_ARG3_TYPE to declare type
of third arg.
* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
symm-xdep.c, ultra3-xdep.c: Use PTRACE_ARG3_TYPE to cast ptrace
argument 3.
* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
store_inferior_registers): Supply missing fourth argument to
ptrace().
* 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.
(which is not a Posix signal) if it isn't defined.
* tm-linux.h, xm-linux.h, config/linux.m[ht], configure.in:
New port to Linux (a free Unix clone for 386 machines).
* coffread.c (record_minimal_symbol): Pass the minsym type to it.
Callers changed.
(coff_end_symtab): Sort blocks if needed. Complain if misordered.
(read_coff_symtab): Move patch_opaque_types call from
coff_symfile_read. Restrict it to symtabs from this objfile.
(process_coff_symbol: C_TPDEF): Don't put ordinary foward
references on opaque type chain; just let coff_lookup_type handle 'em.
(decode_type): Complain about tagndx values on
non-struct/union/enum types, which the EPI compiler tends to produce.
* symtab.c (list_symbols): Make minimal symbol variable-finding work.
* tm-68k.h (FIX_CALL_DUMMY): Avoid alignment and byte order
dependency.
* elfread.c (elf_symfile_read): Update bfd_elf_find_section
usage to match new prototype. Include libbfd.h to get prototype.
declarations of malloc/realloc/free that are inserted by some
versions of yacc.
* m2-exp.y: Prevent conflicts with TRUE and FALSE tokens by
#undeffing them.
* xm-rs6000.h: Declare malloc/realloc/free appropriately. Yet
another decl of strdup (this really ought to come from libiberty.h!).
(_initialize_remote): `set remotedebug' enables packet trace.
* dbxread.c (process_one_symbol:N_FUN): GCC now produces relative
N_SLINE's, etc, just like Sun cc on Solaris2.
* am29k-tdep.c (read_register_stack, write_register_stack):
Change RSTACK_HIGH_ADDR to rstack_high_address, a user-settable
variable. Add `set' and `show' commands for it.
* doc/gdb.texinfo: Document it.
* eval.c: Avoid residue-by-zero when evaluating without side effects.
(Bug and fix found by Pierre Willard.)
* sparc-tdep.c: Clean up slightly for Solaris2.
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.
* xm-sun3os4.h: Define MALLOC_INCOMPATIBLE to avoid conflicts
with decls of malloc in c-exp.tab.c (as produced by yacc).
There's got to be a better way to do this...
* mipsread.c, dbxread.c: Remove troublesome inclusion of non-
standard <strings.h> file, now that the only single use of
rindex in the gdb source files is gone.