* 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.
the argv arguments (e.g. reading symbol files or core
files). This allows global parameters to be set, which will apply
during the symbol reading. The ./.gdbinit is still read after
argv processing.
* symtab.c (list_symbols): `i variables' shouldn't show enum values.
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.
breakpoint.h, tm-sun4os4.h, tm-sparc.h, sparc-tdep.c, tm-mips.h,
mips-tdep.h, tm-sun3.h, tm-68k.h, m68k-tdep.h: Add support for
stepping (and nexting) through longjmp(). Also, cleanup
breakpoint handling quite a bit by creating explicit breakpoint
types instead of using magic breakpoint numbers.
Makefile.in: Update version to 4.4.3
* tm-68k.h (FPI_REGNUM): Add.
* infrun.c (child_create_inferior): flush stdout and stderr
before forking.
* configure.in: Handle amigados, amix hosts and targets.
* inflow.c: Handle TIOCGLTC_BROKEN for Amiga.
From Andreas Schwab:
* values.c (show_convenience): Use printf_filtered.
* main.c (define_command): Check result of lookup_command for
exact match.
(echo_command): Use printf_filtered, and force output out.
* dbxread.c (read_enum_type): Avoid Modula-2 kludge that breaks C
programs.
* i387-tdep.c (double_to_i387): Fix typo for double_to_ieee_extended.
* utils.c (_initialize_utils): If !ISATTY, don't paginate.
first.
* main.c (main, print_gnu_advertisement, print_gdb_version):
Reformat legalese so it always prints, but acts as an "I'm here"
message while symbols are being read. If any errors occur,
print a few newlines to set off the message and start it at the
left margin. Remove mention of "help" command, and don't yak about
symbol reading.
(catch_errors): Error string is now printed first in case of
error, not last.
* command.c (undef_cmd_error, lookup_cmd): On undefined command,
suggest the "help" command.
* Makefile.in (VERSION): Set to 4.0.2.
* core.c (core_open): Open file ourselves, read or r/w, depending on
write_files. Use bfd_fdopenr.
* gdbcore.h (write_files): New variable.
* exec.c (write_files): Define variable, add set&show for it.
(exec_file_command): Use write_files to open for read or r/write.
Make shared library reading happen automatically. These changes
are mostly from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
* inferior.h (stop_soon_quietly): Add to exported variables.
* infrun.c (child_create_inferior): call solib hook, if defined.
(child_attach): call solib hook, if defined.
* solib.c: Include inferior.h. Add from_tty to so_list as kludge.
(find_solib): Use lookup_misc_func rather than hand-rolled.
(symbol_add_stub): New stub for catch_errors.
(solib_add): Avoid output if !from_tty. Catch errors rather
than just calling symbol_file_add and bombing.
(solib_create_inferior_hook): Interface with the target process
to let it read and alloc shared libs, then figure out what it did.
* core.c (validate_files): Fix typo, soften warning.
(Fix from Hiroto Kagotani <kagotani@cs.titech.ac.jp>.)
* utils.c (fputs_demangled): Avoid duplicate printing if
demangling is off. (Fix from J.T. Conklin <jtc@cayenne.com>.)
* infrun.c (proceed): Cast -1 to (CORE_ADDR) before comparing.
(Fix from pierre@la.tce.com (Pierre Willard).)
* main.c (catch_errors): Change argument to a char * from an int,
since a char * can point to a struct full of glop, but an int
is not guaranteed to be able to hold a pointer.
* breakpoint.c (breakpoint_cond_eval, bpstat_stop_status,
breakpoint_re_set_one, breakpoint_re_set): Adapt.
* core.c (core_open, solib_add_stub): Adapt.
* remote-vx.c (symbol_stub, add_symbol_stub, callers): Adapt.
* dbxread.c (read_struct_type): If const/volatile character is
missing, don't complain, just continue.
* dbxread.c (read_struct_type): Only try to read the fcontext if
it is there. Also change "error_type " to "return error_type ".
values.c (value_virtual_fn_field): If there is no fcontext,
then do things the way GDB 3.x did.
valops.c (search_struct_method): Add type to value_virtual_fn_field
arguments.
* dbxread.c (read_struct_type): Fix typo: *pp != '\0' -> **pp != '\0'.