void*.
From Philippe De Muyter <phdm@macqel.be>:
* printcmd.c (print_address_symbolic): Call `make_cleanup' with
`(free_current_contents, &x)', not `(free, x)'.
* utils.c (free_current_contents): Do not `free (NULL)'.
* printcmd.c (print_address_symbolic): Cleanup after a failed
call to build_address_symbolic.
functions which architectures can redefine, defaulting to
generic_pointer_to_address and generic_address_to_pointer.
* findvar.c (extract_typed_address, store_typed_address,
generic_pointer_to_address, generic_address_to_pointer): New
functions.
(POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Provide default
definitions.
(extract_address, store_address): Doc fixes.
* values.c (value_as_pointer): Doc fix.
(value_from_pointer): New function.
* defs.h (extract_typed_address, store_typed_address): New
declarations.
* inferior.h (generic_address_to_pointer,
generic_pointer_to_address): New declarations.
* value.h (value_from_pointer): New declaration.
* ax-gdb.c (const_var_ref): Use value_from_pointer, not
value_from_longest.
* blockframe.c (generic_push_dummy_frame): Use read_pc and
read_sp, not read_register.
* c-valprint.c (c_val_print): Use extract_typed_address instead of
extract_address to extract vtable entries and references.
* cp-valprint.c (cp_print_value_fields): Use value_from_pointer
instead of value_from_longest to extract the vtable's address.
* eval.c (evaluate_subexp_standard): Use value_from_pointer
instead of value_from_longest to compute `this', and for doing
pointer-to-member dereferencing.
* findvar.c (read_register): Use extract_unsigned_integer, not
extract_address.
(read_var_value): Use store_typed_address instead of store_address
for building label values.
(locate_var_value): Use value_from_pointer instead of
value_from_longest.
* hppa-tdep.c (find_stub_with_shl_get): Use value_from_pointer,
instead of value_from_longest, to build arguments to __d_shl_get.
* printcmd.c (set_next_address): Use value_from_pointer, not
value_from_longest.
(x_command): Use value_from_pointer, not value_from_longest.
* tracepoint.c (set_traceframe_context): Use value_from_pointer,
not value_from_longest.
* valarith.c (value_add, value_sub): Use value_from_pointer, not
value_from_longest.
* valops.c (find_function_in_inferior, value_coerce_array,
value_coerce_function, value_addr, hand_function_call): Same.
* value.h (COERCE_REF): Use unpack_pointer, not unpack_long.
* values.c (unpack_long): Use extract_typed_address to produce
addresses from pointers and references, not extract_address.
(value_from_longest): Use store_typed_address instead of
store_address to produce pointer and reference values.
* defs.h (struct continuation_arg): make 'data' a union, to avoid
casting problems when int and pointer are not the same size.
* event-top.c (command_handler): use data as a union.
(command_line_handler_continuation): ditto.
* infcmd.c (step_1_continuation): use data as a union. Re-indent.
(step_once): ditto. (finish_command_continuation): ditto.
(finish_command): ditto.
* breakpoint.c (until_break_command): use data as a union.
(until_break_command_continuation): ditto.
* utils.c (add_intermediate_continuation): fix typo in comment.
* defs.h (struct continuation_arg): Change type of field 'data'
from PTR to void *.
* event-loop.h: Eliminate uses of PTR, use 'void *' instead.
* event-top.c: Ditto.
(error_return, quit_return): Merge into catch_return pointer.
(return_to_top_level): Update comment. Longjmp to *catch_errors,
and communicate reason to catch_errors via setjmp return value.
(catch_errors): Always catch both quit and error, and if a catch
wasn't requested by caller, throw it to the next catch_error.
Replace dual longjmp buffer memcpy with single pointer change.
Add FIXME for possibly adding new interface to tell caller what
event was caught. Add extensive comments.
* defs.h (enum return_reason): Reserve 0 for use as initial
setjmp() return value.
(RETURN_MASK): New public macro to generate RETURN_MASK_* from
enum return_reason.
(RETURN_MASK_QUIT, RETURN_MASK_ERROR): Define using RETURN_MASK.
Re-do TARGET_PRINT_INSN_INFO, TARGET_PRINT_INSN, TARGET_ARCHITECTURE,
TARGET_ARCHITECTURE_AUTO, TARGET_BYTE_ORDER_SELECTABLE_P,
TARGET_BYTE_ORDER so that they can all be overriden.
Document.
Convert mn10300 and PPC targets.
* config/xm-aix4.h (SIGWINCH_HANDLER): Function `aix_resize_window'
must accept a signal number as parameter.
* config/rs6000/xm-rs6000.h (SIGWINCH_HANDLER): Ditto.
* utils.c (initialize_utils): Give a parameter to `SIGWINCH_HANDLER'.
* inferior.h (register_valid): Variable's type is `SIGNED char', not
`char'.
* findvar.c (register_valid): Ditto.
* defs.h (make_cleanup_func): Protect parameter list by `PARAMS'.
* gdbthread.h (unbind_target_thread_vector): Likewise.
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
possible nested-if confusion.
* breakpoint.c (breakpoint_here_p): Ditto.
(breakpoint_inserted_here_p): Ditto.
(breakpoint_thread_match): Ditto.
* gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
* gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
prototypes.
* symtab.h: Add prototype for _initialize_source.
* value.h: Add prototype for _initialize_value.
* defs.h: Include sys/types.h or stddef.h to get size_t.
(make_cleanup): Add make_cleanup_func typedef and switch to using
a prototype for this function.
(mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
using mmalloc.
* ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
Cast parameters passed to make_cleanup to use the new
make_cleanup_func typedef.
More warning cleanups. There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system. Bwahahaha. You can see them
like this:
grep make_cleanup\ * | grep -v make_cleanup_func
I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
* monitor.c (monitor_debug): Move to utils.c, rename to puts_debug.
(monitor_write_memory, monitor_read_memory, monitor_insert_breakpoint,
monitor_remove_breakpoint): Remove useless address bits if current
monitor has MO_ADDR_BITS_REMOVE flag.
* monitor.h (MO_ADDR_BITS_REMOVE): Define.
* utils.c (puts_debug): Formerly monitor_debug from monitor.c;
move here and make public. Add better support for carriage returns.
* defs.h (puts_debug): Declare.
* dsrec.c (load_srec): Use puts_debug to print remotedebug information.
Output header record correctly.
(make_srec): Output a header record instead of a termination record
if sect is non-NULL (value is ignored), but abfd is NULL.
* config/mips/tm-tx39.h (DEFAULT_MIPS_TYPE): Remove definition.
(REGISTER_NAMES): Define to add R3900-specific registers.
* config/mips/tm-tx39l.h: Ditto.
* config/mips/tx39.mt (TDEPFILES): Add dve3900-rom.o and support files.
* config/mips/tx39l.mt: Ditto.
Add prototypes for make_final_cleanup (and the other cleanup
routines.
* remote-e7000.c: Fix sync code to timeout if unable to sync.
Change sync code to report status while trying to sync-up
with hardware. Add debugging output and document.
* ser-e7kpc.c: Swap order of len & offset to match implementation.
Add debugging output and document.
* serial.c: Add debugging output.
* top.c: Add call to do_final_cleanups.
Remove conditionals preventing Win32 from getting SIGQUIT.
* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
chain as a parameter. Extract this generic code from the cleanup
routines into separate funtions (*_my_cleanup). Keep old
functionality by passing "cleanup_chain" to the new funtions.
Define the cleanup chain "final_cleanup_chain" to be a cleanup
chain which will be executed only when gdb exits. Add functions
(*_final_cleanup) to match the original (*_cleanup) functions.
(pollquit, quit, notice_quit): Fix to read cntl-C from the
Windows message queue.
* defs.h: modify Nov 11 12:59:00 change so _MSC_VER is checked
instead of _WIN32
* win32-nat.c: fix Nov 11 12:59:00 change (windows.h should
be included instead of windefs.h for compilers other than
VC++).
* mswin/windefs.h: remove ^Ms and change C++ style comments
to C style comments
config/mips/tm-mips.h: Add/fix bugs for 64-bit mips support.
* defs.h: Cleanup; add prototypess
* corefile.c: Change FIXME #ifdef
* win32-nat.c: Include windefs instead of windows.h.
* utils.c: Add routines for printing addresses and registers
based on type size.
mdebugread.c os9kread.c source.c top.c utils.c: Don't
include param.h or sys/file.h (or unistd.h in some cases).
* defs.h exec.c inflow.c remote-array.c remote-e7000.c
sparcl-tdep.c terminal.h utils.c: Replace all occurances of
__WIN32__, WINGDB, WIN32, etc... with _WIN32.
* main.c: Remove #ifndef WINGDB around option processing. Fix
bug with passing argc==0 and argv==NULL to getopt.
* (main) Remove calls to access() before source_command. Let
soure_command handle access errors.
* maint.c (maintenance_dump_me): #ifdef out for _WIN32.
* symtab.c (operator_chars): Make this global for wingdb.
* top.c (disconnect): #ifdef out for _WIN32.
* (source_command): If got an error and from_tty, then call print
error, else just return quietly.
* utils.c (fatal_dump_core): Can't kill ourselves under windows.
Just exit.
* (pollquit notice_quit): #ifdef out stuff that doesn't exist
under windows.
tm_print_insn_info.
* gdbtk.c (gdb_disassemble): Setup di.mach from
tm_print_insn_info.mach, and set endian from TARGET_BYTE_ORDER.
* i386-tdep.c (set_assembly_language_command): set
tm_print_insn_info.mach to the appropriate value for 386 or 8086
disassembly.
* printcmd.c (print_insn): Move init of disassembler_info to
_initialize_printcmd. Set endian for disassembler here.
* sparc-tdep.c: Set tm_print_insn_info.mach as appropriate to
select sparc/sparclite.
* config/sparc/{tm-sparc.h tm-sparclite.h}: Get rid of
TM_PRINT_INSN. Set TM_PRINT_INSN_MACH to
bfd_mach_sparc/bfd_mach_sparc_sparclite.
defaults for bi-endian targets. Replace function pointers for
floatformat routines with macros. No need for these to be runtime
selectable.
* findvar.c: Get rid of floatformat function pointers. Use
macros in extract_floating and store_floating.
* remote-nindy.c (nindy_fetch_registers nindy_store_registers):
Use floatformat macros.
* configure.in (AC_CHECK_HEADERS): check for endian.h.
Use AC_CHECK_TOOL to find AR & RANLIB. Add AC_PROG_AWK.
Add host & target cases for i[345]86-*-gnu*.
* config.in: Regenerate with autoheader.
* configure: Regenerate with autoconf.
* Makefile.in (AR, AWK): Set from corresponding autoconf substs.
(init.c): Don't scan mig-generated files.
* defs.h (endian.h): Include if HAVE_ENDIAN_H defined.
* config/nm-m3.h (ATTACH_NO_WAIT): Define.
* infcmd.c (attach_command): Use "#ifndef ATTACH_NO_WAIT"
rather than "#ifndef MACH".
* (dcache_peek dcache_fetch dcache_poke): Make dcache_fetch and
dcache_poke call dcache_xfer_memory directly in order to fix
problems with turning off dcache. dcache_peek is now unnecessary,
so it goes away.
* defs.h: Define new macros HOST_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT
and TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT to specify a pointer
to a struct floatformat. This allows for better handling of
targets whose floating point formats differ from the host by more
than just byte order.
* (floatformat_to_long_double floatformat_from_long_double):
Prototypes for new functions in utils.c.
* (floatformat_to_doublest floatformat_from_doublest): Prototypes
for pointers to floating point conversion functions. The actual
function uses either double or long double if the host supports it.
* findvar.c (floatformat_to_doublest floatformat_from_doublest):
Initialize to point at correct function depending on HAVE_LONG_DOUBLE.
* (extract_floating store_floating): Rewrite. Now, if host fp
format is the same as the target, we just do a copy. Otherwise,
we call floatformat_{to from}_doublest.
* remote-nindy.c (nindy_xfer_inferior_memory): Change param
`write' to `should_write'.
* utils.c (floatformat_to_long_double
floatformat_from_long_double): New routines that implement long
double versions of functions in libiberty/floatformat.c.
* config/i960/tm-i960.h (TARGET_LONG_DOUBLE_FORMAT): Define this for
i960 extended real (80 bit) numbers.
* nindy-share/nindy.c (ninMemGet ninMemPut): Return number of bytes
actually read or written.
character is one of the commonly used C++ marker characters.
* defs.h (is_cplus_marker): Add prototype.
* c-typeprint.c (c_type_print_base), ch-lang.c (chill_demangle),
cp-valprint.c (cp_print_class_method), mdebugread.c (parse_symbol),
stabsread.c (define_symbol, read_member_functions, read_struct_fields),
symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P),
values.c (vb_match): Use is_cplus_marker instead of comparison
with CPLUS_MARKER.
* monitor.c: Turn on caching.
(monitor_printf): If a ^C was sent, don't expect to see its
echo.
(monitor_open): Enable caching.
(monitor_resume, monitor_load): Flush cache.
(monitor_xfer_memory): Call cache routine.
(monitor_dump_regs): New.
(monitor_fetch_registers): If monitor_dump_regs available
then use it.
(monitor_load): Don't ref exec_bfd if it's NULL.
(monitor_load_srec): Use new monitor_make_srec calling convention.
(monitor_make_srec): Rewrite to cope with two, three and four byte
addresses.
* remote-hms.c (hms_cmds): Initialze end-of-command delim.
* dcache.h, dcache.h: Rewritten.
* remote.c: Reenable caching.
(getpkt): Reduce MAX_TRIES to 3.
(remote_xfer_memory): Use dcache_xfer_memory.
* defs.h (error_hook): New.
* top.c (error_hook): New definition.
* utils.c (error): Use error_hook if initialized.
* sparcl-tdep.c (HAVE_SOCKETS): Don't define if GO32 or WIN32. Use
HAVE_SOCKETS in place of #ifndef GO32.
error message to work with pre-ansi compilers.
(monitor_load_srec): reduced length of s-records from 128 to 32
bytes so download is more reliable with the rom68k monitor.
* rom68k-rom.c: Added trailing space to prompt string.
* config/i386/xm-i386sco.h (HAVE_STRSTR): Removed.
* config/i386/xm-go32.h, mswin/xm.h (SYS_SIGLIST_MISSING):
Removed.
* defs.h, config/{xm-lynx.h, xm-nbsd.h},
config/i386/{xm-i386bsd.h, xm-linux.h},
config/m68k/xm-hp300bsd.h, config/mips/xm-irix4.h,
config/ns32k/xm-ns32km3.h, doc/gdbint.texinfo
(PSIGNAL_IN_SIGNAL_H): Removed.
consistency with error_begin. Also print warning_pre_print.
Document it better.
* utils.c (warning): Use it.
* utils.c (error_begin): Doc fix.
* rs6000-nat.c (vmap_ldinfo): If symfile_objfile is not part of
any vmap, nuke it.
* breakpoint.h (disable_breakpoint, enable_breakpoint):
New declarations.
(enum bpdisp): Change name of 'delete' member to 'del'.
(struct bpstat): Changed name to 'bpstats'.
* breakpoint.c (disable_breakpoint, enable_breakpoint,
breakpoint_chain): Made globally visible.
(bpstat_stop_status): Use new name for bpstat.
(break_command_1, watch_command_1, catch_command_1,
breakpoint_auto_delete, denable_delete_breakpoint): Use 'del'
instead of 'delete'.
(set_breakpoint_sal): New function.
* defs.h (registers_changed_hook): New declaration.
* infcmd.c (run_stack_dummy): 'delete' is now 'del'.
* inflow.c (new_tty): Treat WIN32 in same way as __GO32__
* main.c (main): Don't scan options when in WIN32 and exit
without entering main loop.
* m2-exp.y (m2_elx): Member 'class' is now 'aclass'.
* symtab.h (struct symbol, struct partial_symbol): Changed name of
member 'class' to 'aclass'.
(SYMBOL_CLASS, PSYMBOL_CLASS): Reflect change.
* top.c (registers_changed_hook): New definition.
* utils.c (quit, notice_quit, initialize_utils): Treate WIN32
in same way as __GO32__.
* value.h (c_typedef_print): Rename 'new' argument.
* core.c (dis_asm_read_memory): Add call to
dis_asm_read_memory_hook to provide alternate way for disassembler
to read memory.
* defs.h: Protect from multiple inclusion. Add decl for
dis_asm_read_memory_hook.
* gdbtk.c (finish_saving_output): Don't do anything if not saving
output.
* (breakpoint_notify): Don't send null filename to tcl.
* (gdb_eval): New tcl command to eval an expression.
* (gdb_disassemble): New tcl command to do disassembly. This
allows tcl code to choose between exec file and target memeory,
and can also do mixed source and assembly.
* (gdbtk_init): Move reading of gdbtk.tcl to the end to make sure
that more of the environment is set up. Also, create link between
gdb and tcl vars disassemble{-_}from{-_}exec.
* gdbtk.tcl: New expression window support.
* Make assembly window be 80 columns wide.
* Use new disassembly method. Add menu items to select
disassembly from exec file or target.
* Change View menubar item to Options.
* Get rid of Stack, Breakpoints, Signals, and Variables Windows,
since they don't exist yet.
* Pop up a copyright window on startup.
* top.c: Make window startup be the default.
* Add dis_asm_read_memory_hook.
to fputs_unfiltered_hook. Differentiate stdout from stderr when
passing text into tcl land.
* defs.h, top.c, utils.c (error): Add error_hook.
* gdbtk.c: Improve mechanism for capturing output values.
* (full_filename): Remove.
* (gdb_cmd call_wrapper gdbtk_init): Protect all calls from tcl
land with call_wrapper. This prevents longjmps (usually via
error()) from jumping out of tcl/tk and leaving things in an
indeterminate state.
* gdbtk.tcl: New view option to disable line numbers. Put catch
around most uses of gdb_cmd. Add update button to reg config
window. Stop doing immediate updates when selecting registers.
Change register view values into checkbuttons.
target_wait_hook to allow GUI to handle blocking for inferior. Call
call_command_hook in execute_command to provide means for wrapping
commands with GUI state change updates.
* gdbtk.c (gdb_cmd): Force GUI into idle mode when errors occur.
* (gdb_stop): New tcl command to stop the target process.
* (x_event, gdbtk_wait): Allow GUI to interrupt gdb out of target
waits.
* (gdbtk_call_command): Wrapper around command processing to
alert GUI of target state changes.
* (gdbtk_init): Get the fd of X server for doing async
notification of X events (via x_event). Setup new hooks.
* gdbtk.tcl: Add scrollbars to assembly and command windows.
* Change window foreground & background colors.
* Create margin tag for breakpoints in source and assembly windows.
* Add new routines to be invoked when target state changes to/from
idle.
* Add start of expression window.
* Change bindings of mouse button 1 in assembly and source window
to just set or clear breakpoints when in the margin tag.
* Change shape of register window to be more vertical to better
reflect it's contents.
* Add stop button.
* Cleanup some code around command window bindings.
* infrun.c (wait_for_inferior): Make sure
through_sigtramp_breakpoint is non-null before deleting.
Also, add decl for symtab_to_filename.
* gdbtk.c: Replace calls to full_filename with symtab_to_filename.
* gdbtk.tcl: New routine pc_to_line replaces in line code. New
routine decr replaces in line code.
* (create_file_win): Use catch to handle open failures more
elegantly. Also, create special window to display file open
failure message. Move opening of file prior to creation of text
widget.
* (create_asm_win): Add PC as argument. We now base disassembly
on PC instead of function name, since function names can be
ambiguous (usually seen with shared libs). Also, use catch to
simplify code where we don't care about failures.
* source.c (symtab_to_filename): New. Returns the file
associated with a symtab.
* top.c: Define interactive_hook. Called during QUIT to animate
the GUI.
for describing the command and control types.
(struct command_line): Add new fields to keep track of the command
type and body associated with the command.
* top.c: Include value.h. Delete whitespace at the end of lines.
(build_command_line, get_command_line): New functions.
(execute_control_command, while_command, if_command): Likewise.
(realloc_body_list, read_next_line): Likewise.
(recurse_read_control_structure): Likewise.
(execute_user_command): Call execute_control_command.
(read_command_lines): Simplify by calling read_next_line, call
read_control_structure for "if" and "while" commands.
(free_command_lines): Free new fields in the command structure.
(define_command): Reset control_level to zero.
(init_main): Install command handlers for "if" and "while" commands.
(NORETURN): Define as "volatile" only for older GCCs.
(ATTR_NORETURN): Define for newer GCCs.
* procfs.c (proc_init_filed): Add ATTR_NORETURN to declaration.
--enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
where appropriate.
* General hackery to support alternate user-interface.
* breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
disable_breakpoint): Call hooks for alternate user-interface.
* defs.h: Add declarations for alternate user-interface hooks.
* main.c (main): Add --nw (and --nowindows) options to disable
the GUI.
* (near call to command_loop): Call command_loop_hook if set.
* (fputs_unfiltered): Call fputs_unfiltered_hook if set.
* stack.c: Call print_frame_info_listing_hook if set.
* top.c (gdb_init): Initialize targets.c and utils.c prior to
other files to make sure that calls to error and warning will
work. Call init_ui_hook after everything else.
* utils.c (query): Call query_hook if set.
* (gdb_flush): Call flush_hook if set.
* Change _initialize_utils to initialize_utils cuz we don't use
automatic initialization of utils.c anymore.
* Support for TK GUI.
* Makefile.in: Add rule for gdbtk.o.
* configure.in: Add support for --enable-gdbtk.
* gdbtk.c: New file. Contains support routines for TK interface.
* gdbtk.tcl: New file. Implements GUI policy.
* remote.c: Get rid of #ifdef DONT_USE_REMOTE. It's no longer
necessary.
(quit): Print annotation before printing the error message.
* main.c (return_to_top_level): Print annotation before doing the
longjmp.
* symtab.c (decode_line_1): Call error not warning and then
return_to_top_level. Call error_begin and printf_unfiltered
rather calling warning (before calls to return_to_top_level).
* core.c (memory_error): Use error_begin, printf_unfiltered,
print_address_numeric and return_to_top_level instead of error.
Cleans up a FIXME-32x64.
* language.c (type_error, range_error): Call error_begin
not just target_terminal_ours.
target null pointer.
* blockframe.c (find_frame_addr_in_frame_chain): Likewise.
* printcmd.c (output_command): Annotate things we print here too.
* Move declaration of print_value_flags from defs.h to value.h.
* main.c (command_line_input): Call wrap_here as well as gdb_flush.
that we print.
(print_frame_args): Annotate each argument.
* printcmd.c, defs.h (print_value_flags): New function.
* cp-valprint.c (cp_print_value_fields): Annotate each field.
* valprint.c (val_print_array_elements): Annotate each array element.
the same as --annotate=1.
(command_line_input): Print annotatation before and after prompt.
* blockframe.c (flush_cached_frames): Print annotation.
* Rename frame_file_full_name to annotation_level and move it from
symtab.h to defs.h.
* source.c (identify_source_line): If annotation_level > 1,
change output format.
* breakpoint.c: Print annotation whenever a breakpoint changes.
* main.c: New variable server_command.
(command_line_input): Parse "server " and set server_command.
(dont_repeat): Check server_command.
various miscellaneous things discovered in the process:
* printcmd.c, defs.h (print_address_numeric): New function.
* c-valprint.c (c_val_print), ch-valprint.c (chill_val_print)
breakpoint.c (describe_other_breakpoints, breakpoint_1, mention),
cp-valprint.c (cplus_print_value), infcmd.c (jump_command),
printcmd.c, stack.c, symfile.c, symmisc.c, valprint.c:
Use it.
* utils.c, defs.h (gdb_print_address): New function.
* expprint (dump_expression), gdbtypes.h: Use it.
* breakpoint.c (describe_other_breakpoints),
symmisc.c (dump_symtab, print_symbol):
Use filtered not unfiltered I/O.
(remove_breakpoints): Remove BREAKPOINT_DEBUG code. Might as well
just run gdb under a debugger for this (and it had problems with
printing addresses, how to print b->shadow, etc.).
* buildsym.c (make_blockvector), core.c (memory_error),
exec.c (print_section_info), maint.c (print_section_table),
mdebugread.c (parse_procedure), solib.c, source.c, symfile.c,
symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
Add comments saying code is broken. Marked with "FIXME-32x64".
* dbxread.c (process_one_symbol), partial-stab.h (default),
remote-vx.c (vx_run_files_info):
Don't cast int being passed to local_hex_string.
* symmisc.c (print_symbol): Don't cast long being passed to %lx.
* symtab.h (general_symbol_info): Add comment about SYMBOL_VALUE
only being a long.
* symmisc.c (print_symbol): Print "offset" in message for LOC_ARG
and LOC_LOCAL.
* printcmd.c (print_address): Remove #if 0 code with ADDR_BITS_REMOVE.
* source.c: Include <sys/types.h> regardless of USG.
The old way (using #undef in tm.h) was ugly and asking for
trouble, because it makes it possible for some file to use the
wrong definition. Move definition of HOST_CHAR_BIT after definition
of TARGET_CHAR_BIT.
* config/alpha/tm-alpha.h, config/h8300/tm-h8300.h,
config/h8500/tm-h8500.h, config/z8k/tm-z8k.h: Don't undef TARGET_*_BIT
before defining them.
Some of the following is in #ifdef CALL_DUMMY_BREAKPOINT_OFFSET.
* breakpoint.h (enum bptype): Add bp_call_dummy.
(struct bpstat_what): Add call_dummy field.
* infrun.c (wait_for_inferior): Deal with it.
* breakpoint.c (bpstat_what): Deal with call dummy breakpoint.
* infcmd.c (run_stack_dummy): Set the call dummy breakpoint.
* config/sparc/tm-sparc.h: Define CALL_DUMMY_BREAKPOINT_OFFSET.
* defs.h (memcmp): Add decl for memcmp to #ifndef MEM_FNS_DECLARED.
* findvar.c (write_register): See if we are writing back the same
value that's already in the register. If so, don't bother.
* remote.c (putpkt, getpkt): Improve handling of communication
problems.
* ser-go32.c: Prototype it to death. Update serial_ops and add
dummy routines where appropriate.
* ser-tcp.c: New module to implement serial I/O via TCP
connections.
* ser-unix.c: Clean up getting/setting of tty state. Get rid of
SERIAL_RESTORE, add SERIAL_{GET|SET}_TTY_STATE interfaces.
* serial.c: Add start of support for connect command.
(serial_open): Distinguish between tcp and local devices.
* serial.h (struct serial_ops): Get rid of restore, add
get_tty_state and set_tty_state. Define protoypes and macros for
this mess.
* gdbserver/remote-utils.c: Add tcp support. (readchar): Do
some real buffering. Handle error conditions gracefully.
* gdbserver/remote-inflow-sparc.c: Update to remote-inflow.c
(Lynx), remove lots of cruft.
when compiling with gcc, but disable it for now. See comment.
* defs.h (LONGEST): Define as either "long" or "long long"
based on CC_HAS_LONG_LONG.
* defs.h (longest_to_int): Use CC_HAS_LONG_LONG to control
how longest_to_int is defined.
* c-valprint.c (c_val_print): Call print_longest.
* expprint.c (dump_expression): Use PRINTF_HAS_LONG_LONG
instead of LONG_LONG.
* {printcmd.c, gdbtypes.h} (LONG_LONG): Replace usages with
CC_HAS_LONG_LONG.
* printcmd.c (print_scalar_formatted): Call print_longest
and let it figure out what to do for PRINTF_HAS_LONG_LONG.
* typeprint.c (print_type_scalar): Call print_longest and let
it figure out what to do for PRINTF_HAS_LONG_LONG.
* valprint.c (val_print_type_code_int): Call print_longest
and let it figure out what to do for PRINTF_HAS_LONG_LONG.
* stabsread.c (LONG_LONG): Replace usages with CC_HAS_LONG_LONG.
* value.h (struct value): Replace usage of LONG_LONG with
CC_HAS_LONG_LONG.
* value.h (print_longest): Add prototype.
* values.c (LONG_LONG): Replace usages with CC_HAS_LONG_LONG.
* values.c (unpack_double): Collapse code that was unnecessarily
dependent on CC_HAS_LONG_LONG. Use LONGEST instead of direct types.
* values.c (value_from_longest): Remove dependency on
CC_HAS_LONG_LONG and just use LONGEST.
* solib.c (solib_map_sections): Use bfd_get_filename
to access filename field.
* solib.c (clear_solib): Save filename and free it later, after
bfd_close, since bfd_close may reference it. Use bfd_get_filename
to access the field.
* config/convex/xm-convex.h (LONG_LONG): Replace with
CC_HAS_LONG_LONG. Add define for PRINTF_HAS_LONG_LONG.
* doc/gdbint.texinfo (LONG_LONG): Replace with CC_HAS_LONG_LONG.
Add PRINTF_HAS_LONG_LONG references.
add a language parameter that is used to select the demangling
algorithm.
* defs.h (enum language): Move further up in file so enum can
be used in prototypes.
* defs.h (fputs_demangled): Update prototype to add lang arg.
* c-typeprint.c (cp_type_print_method_args): Add language arg
to fputs_demangled calls, remove DMGL_PARAMS flag.
* stack.c (print_frame_info): Remove obsolete code so we don't
have to update fputs_demangled usage in it.
* stack.c (print_frame_info, frame_info): Add language variable
to pass to fputs_demangled and initialize it from the symbol's
language. Call fputs_demangled with language arg.
* symtab.c (find_methods): Add language arg to fputs_demangled
call.
* tm-sysv4.h (CPLUS_MARKER): By default, g++ uses '.' as the
CPLUS_MARKER for all SVR4 systems, so follow suit.
* defs.h (strdup_demangled): Remove prototype.
* dwarfread.c (enum_type, synthesize_typedef): Use new macro
SYMBOL_INIT_LANGUAGE_SPECIFIC.
* dwarfread.c (new_symbol): Use SYMBOL_INIT_DEMANGLED_NAME.
* minsyms.c (install_minimal_symbols, prim_record_minimal_symbol,
prim_record_minimal_symbol_and_info): Use new macro
SYMBOL_INIT_LANGUAGE_SPECIFIC.
* minsyms.c (install_minimal_symbols): Use new macro
SYMBOL_INIT_DEMANGLED_NAME.
* stabsread.c (define_symbol): Use new macro
SYMBOL_INIT_DEMANGLED_NAME.
* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
Use new macro SYMBOL_INIT_DEMANGLED_NAME.
* symfile.h (ADD_PSYMBOL_VT_TO_LIST): Use new macro
SYMBOL_INIT_DEMANGLED_NAME.
* symmisc.c (dump_msymbols, dump_symtab, print_partial_symbol):
SYMBOL_DEMANGLED_NAME now tests language itself.
* symtab.c (COMPLETION_LIST_ADD_SYMBOL): SYMBOL_DEMANGLED_NAME
now tests language itself.
* symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): New macro that does
what SYMBOL_DEMANGLED_NAME used to do, directly access the C++
mangled name member in the language dependent portion of a symbol.
* symtab.h (SYMBOL_DEMANGLED_NAME): New macro that returns the
mangled name member appropriate for a symbol's language.
* symtab.h (SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME,
SYMBOL_MATCHES_NAME, SYMBOL_MATCHES_REGEXP):
SYMBOL_DEMANGLED_NAME now tests language itself.
* symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): New macro that
initializes language dependent portion of symbol.
* symtab.h (SYMBOL_INIT_DEMANGLED_NAME): New macro that
demangles and caches the demangled form of symbol names.
* utils.c (fputs_demangled, fprint_symbol): Use current language
to select an appropriate demangling algorithm.
* utils.c (strdup_demangled): Remove, no longer used.
**** start-sanitize-chill ****
* symtab.h (SYMBOL_CHILL_DEMANGLED_NAME): New macro that directly
access the Chill mangled name member in the language dependent
portion of a symbol.
* ch-lang.c (chill_demangle): New function, simple demangler.
* defs.h (chill_demangle): Add prototype.
* symtab.h (language_dependent_info): Add struct for Chill.
**** end-sanitize-chill ****
* defs.h (demangle_and_match): Remove prototype.
* dwarfread.c (STREQ, STREQN): Remove macros, replaced with STREQ
and STREQN defined in defs.h.
* dwarfread.c (set_cu_language): For completely unknown languages,
try to deduce the language from the filename. Retain behavior
that for known languages we don't know how to handle, we use
language_unknown.
* dwarfread.c (enum_type, symthesize_typedef): Initialize language
and demangled name fields in symbol.
* dwarfread.c, mipsread.c, partial-stab.h: For all usages of
ADD_PSYMBOL_TO_LIST, add language and objfile parameters.
* dwarfread.c (new_symbol): Attempt to demangle C++ symbol names
and cache the results in SYMBOL_DEMANGLED_NAME for the symbol.
* elfread.c (STREQ): Remove macro, use STREQ defined in defs.h.
Replace usages throughout.
* elfread.c (demangle.h): Include.
* elfread.c (record_minimal_symbol): Remove prototype and function.
* gdbtypes.h, symtab.h (B_SET, B_CLR, B_TST, B_TYPE, B_BYTES,
B_CLRALL): Moved from symtab.h to gdbtypes.h.
* infcmd.c (jump_command): Remove code to demangle name and add
it to a cleanup list. Now just use SYMBOL_DEMANGLED_NAME.
* minsyms.c (demangle.h): Include.
* minsyms.c (lookup_minimal_symbol): Indent comment to match code.
* minsyms.c (install_minimal_symbols): Attempt to demangle symbol
names as C++ names, and cache them in SYMBOL_DEMANGLED_NAME.
* mipsread.c (psymtab_language): Add static variable.
* stabsread.c (demangle.h): Include.
* stabsread.c (define_symbol): Attempt to demangle C++ symbol
names and cache them in the SYMBOL_DEMANGLED_NAME field.
* stack.c (return_command): Remove explicit demangling of name
and use of cleanups. Just use SYMBOL_DEMANGLED_NAME.
* symfile.c (demangle.h): Include.
* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list): Fix
to match macros in symfile.h and allow them to be compiled
if INLINE_ADD_PSYMBOL is not true.
* symfile.h (INLINE_ADD_PSYMBOL): Default to true if not set.
* symfile.h (ADD_PSYMBOL_*): Add language and objfile parameters.
Add code to demangle and cache C++ symbol names. Use macro form
if INLINE_ADD_PSYMBOL is true, otherwise use C function form.
* symmisc.c (add_psymbol_to_list, add_psymbol_addr_to_list):
Remove, also defined in symfile.c, which we already fixed.
* symtab.c (expensive_mangler): Remove prototype and function.
* symtab.c (find_methods): Remove physnames parameter and fix
prototype to match.
* symtab.c (completion_list_add_symbol): Name changed to
completion_list_add_name.
* symtab.c (COMPLETION_LIST_ADD_SYMBOL): New macro, adds both
the normal symbol name and the cached C++ demangled name.
* symtab.c (lookup_demangled_partial_symbol,
lookup_demangled_block_symbol): Remove prototypes and functions.
* symtab.c (lookup_symbol): Remove use of expensive_mangler,
use lookup_block_symbol instead of lookup_demangled_block_symbol.
Remove code to try demangling names and matching them.
* symtab.c (lookup_partial_symbol, lookup_block_symbol):
Fix to try matching the cached demangled name if no match is
found using the regular symbol name.
* symtab.c (find_methods): Remove unused physnames array.
* symtab.c (name_match, NAME_MATCH): Remove function and macro,
replaced with SYMBOL_MATCHES_REGEXP from symtab.h.
* symtab.c (completion_list_add_symbol): Rewrite to use cached
C++ demangled symbol names.
* symtab.h: Much reformatting of structures and such to add
whitespace to make them more readable, and make them more
consistent with other gdb structure definitions.
* symtab.h (general_symbol_info): New struct containing fields
common to all symbols.
* symtab.h (SYMBOL_LANGUAGE, SYMBOL_DEMANGLED_NAME,
SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME,
SYMBOL_MATCHES_REGEXP, MSYMBOL_INFO, MSYMBOL_TYPE): New macros.
* symtab. (struct minimal_symbol, struct partial_symbol, struct
symbol): Use general_symbol_info struct.
* utils.c (demangle_and_match): Remove, no longer used.
* valops.c (demangle.h): Include.
* xcoffexec.c (eq): Remove macro, replace usages with STREQ.
* blockframe.c, breakpoint.c, c-exp.y, c-valprint.c, dbxread.c,
infcmd.c, m2-exp.y, minsyms.c, objfiles.h, solib.c, stack.c,
symmisc.c, symtab.c, valops.c: Replace references to minimal
symbol fields with appropriate macros.
* breakpoint.c, buildsym.c, c-exp.y, c-typeprint.c, c-valprint.c,
coffread.c, command.c, convex-tdep.c, cp-valprint.c, dbxread.c,
demangle.c, elfread.c, energize.c, environ.c, exec.c,
gdbtypes.c, i960-tdep.c, infrun.c, infrun-hacked.c, language.c,
main.c, minsyms.c, mipsread.c, partial-stab.h, remote-es1800.c,
remote-nindy.c, remote-udi.c, rs6000-tdep.c, solib.c, source.c,
sparc-pinsn.c, stabsread.c, standalone.c, state.c, stuff.c,
symfile.c, symmisc.c, symtab.c, symtab.h, tm-sysv4.h,
tm-ultra3.h, values.c, xcoffexec.c, xcoffread.c: Replace strcmp
and strncmp usages with STREQ, STREQN, or STRCMP as appropriate.
* breakpoint.c, buildsym.c, c-typeprint.c, expprint.c, findvar.c,
mipsread.c, printcmd.c, source.c, stabsread.c, stack.c,
symmisc.c, tm-29k.h, valops.c, values.c: Replace SYMBOL_NAME
references with SYMBOL_SOURCE_NAME or SYMBOL_LINKAGE_NAME as
appropriate.
* buildsym.c (start_subfile, patch_subfile_names): Default the
source language to what can be deduced from the filename.
* buildsym.c (end_symtab): Update the source language in the
allocated symtab to match what we have been using.
* buildsym.h (struct subfile): Add a language field.
* c-typeprint.c (c_print_type): Remove code to do explicit
demangling.
* dbxread.c (psymtab_language): Add static variable.
* dbxread.c (start_psymtab): Initialize psymtab_language using
deduce_language_from_filename.
* Makefile.in (SFILES_MAINDIR): Add typeprint.c, c-typeprint.c,
m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c.
* Makefile.in (HFILES): Add valprint.h.
* Makefile.in (OBS): Add typeprint.o, c-typeprint.o,
m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o.
* typeprint.c, typeprint.h: New files for language independent
type printing functions.
* c-typeprint.c, m2-typeprint.c: New files for language dependent
type printing functions and definitions.
* valprint.h: New include file for language independent value
printing definitions.
* c-valprint.c, cp-valprint.c, m2-valprint.c: New files for language
dependent value printing functions.
* c-exp.y (production ptype): Add range_type variable and use new
create_range_type function.
* c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab),
infcmd.c (path_var_name), language.c (unk_op_print_tab),
m2-lang.c (m2_op_print_tab): Change from ANSI-obsolescent
"const static" to ANSI-conformant "static const".
* c-exp.y (c_create_fundamental_type): Remove unused nbytes.
* c-exp.y (c_language_defn, cplus_language_defn): Add c_print_type,
and c_val_print.
* c-lang.h (c_print_type, c_val_print): Add prototypes.
* coffread.c (decode_type): Add range_type variable and call to
new create_range_type function.
* complaints.c (complain): Remove unused val variable.
* complaints.c (_initialize_complaints): Make it void.
* convex-tdep.c (value_of_trapped_internalvar): Add range_type
variable and call new create_range_type function.
* defs.h (enum val_prettyprint): Move enum from value.h to here
so we can avoid having to include value.h just for prototypes that
need the enum (thanks ANSI).
* dwarfread.c (struct_type): Local anonymous_size variable is
only used if !BITS_BIG_ENDIAN.
* dwarfread.c (decode_subscript_data_item): Add rangetype
variable and call new create_range_type function.
* elfread.c (elf_symfile_read): Remove unused dbx and text_sect
variables.
* eval.c (evaluate_subexp): Remove unused local variable name
and the statement with no side effects that initializes it.
* expprint.c (print_subexp): Change local_printstr to
LA_PRINT_STRING.
* gdbtypes.c (create_range_type): New function that creates
a range type using code fragments from object file readers as
an example of what has to be initialized.
* gdbtypes.c (create_array_type): Removed index_type, low_bound,
and high_bound parameters, replaced with a single range_type
parameter. Change function body to use passed in range_type
rather than handcrafting one.
* gdbtypes.h (create_range_type): Add prototype.
* gdbtypes.h (create_array_type): Change prototype parameters.
* infrun.c (normal_stop): Remove unused local variables tem and c.
* infrun.c (hook_stop_stub): Return 0 rather than random value.
* language.c (unk_lang_print_type, unk_lang_val_print): Add
stub functions that call error if called.
* language.c (unknown_language_defn, auto_language_defn,
local_language_defn): Add initializers unk_lang_print_type and
unk_lang_val_print.
* language.h (struct language_defn): Reformat for larger
comments, add la_print_type and la_val_print members. Add
LA_PRINT_TYPE and LA_VAL_PRINT macros. Change local_printchar
to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING.
* m2-lang.c (m2_create_fundamental_type): Remove unused local
variable nbytes.
* m2-lang.c (m2_language_defn): Add initializers m2_print_type
and m2_val_print.
* m2-lang.h (m2_print_type, m2_val_print): Add prototypes.
* main.c (execute_command): Remove unused local variable cmdlines.
* main.c (echo_command), stabsread.c (read_type), printcmd.c
(clear_displays), symmisc.c (block_depth), values.c
(clear_value_history):
Make testing of truth value of assignment result explicit.
* mipsread.c (upgrade_type): Update FIXME to include future use
of create_range_type.
* printcmd.c (ptype_command, ptype_eval, whatis_command,
whatis_exp, maintenance_print_type): Move prototypes and functions
to new typeprint.c.
* printcmd.c (_initialize_printcmd): Move add_com calls for
ptype_command and whatis_command to new typeprint.c.
* ser-bsd.c (serial_open): Remove unused variable sgttyb.
* source.c (find_source_lines): Local variable c only used
when LSEEK_NOT_LINEAR is defined.
* stabsread.c (read_array_type): Use new create_range_type
function.
* stabsread.c (read_range_type): Add new index_type variable and
call new create_range_type function rather than handcrafting
range types.
* symmisc.c (type_print_1): Change usages to LA_PRINT_TYPE.
* symtab.c (typedef_print usages): Use c_typedef_print, renamed.
* symtab.c (type_print_base usages): Use c_type_print_base.
* symtab.c (type_print_varspec_prefix usages): Use
c_type_print_varspec_prefix.
* symtab.c (type_print_method_args usages): Use
cp_type_print_method_args.
* valprint.c: Completely ripped apart and the fragments used
to create c-valprint.c, cp-valprint.c, m2-valprint.c, and
valprint.h. Remaining stuff is language independent.
* value.h (struct fn_field): Forward declare for prototypes.
* value.h (type_print_1): Remove prototype.
* value.h (enum val_prettyprint): Moved to defs.h.
* value.h (typedef_print): Prototype renamed to c_typedef_print.
* value.h (baseclass_offset): Add prototype.
**** start-sanitize-chill ****
* Makefile.in (SFILES_MAINDIR): Add ch-typeprint.c, ch-valprint.c.
* Makefile.in (OBS): Add ch-typeprint.o, ch-valprint.o.
* ch-typeprint.c: New file for language dependent type printing.
* ch-valprint.c: New file for language dependent value printing.
* ch-exp.y (parse_number): Remove prototype and stub function.
* ch-exp.y (decode_integer_literal): Removed unused digits and
temp variables.
* ch-exp.y (convert_float): Completely ifdef out for now.
* ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5),
ch-lang.c (chill_op_print_tab):
Change from ANSI-obsolescent "const static" to ANSI-conformant
"static const".
* ch-exp.y (yylex): Add unhandled storage class enumeration
literals to switch statement for completeness.
* ch-lang.c (chill_create_fundamental_types): Remove unused
nbytes variable. Change dummy type to 2 bytes to match int.
Handle FT_VOID types gratuituously added to chill DWARF by
compiler. Change FT_CHAR case to generate an TYPE_CODE_CHAR
type rather than a one byte TYPE_CODE_INT type.
* ch-lang.c (chill_language_defn): Add chill_print_type and
chill_val_print.
* ch-lang.h (chill_print_type, chill_val_print): Add prototypes.
**** end-sanitize-chill ****
* complaints.c (complain): Made into a varargs function.
* complaints.h: New file, code moved from symfile.h.
* Makefile.in (SFILES_MAINDIR): Add complaints.c.
* Makefile.in (HFILES): Add complaints.h.
* Makefile.in (OBS): Add complaints.o.
* symfile.c (complaint_root, stop_whining, complaint_series,
complain, clear_complaints, add_show_from_set for stop_whining):
Moved to complaints.c.
* symfile.h (struct complaint, complaint_root decl, complain
prototype, clear_complaints prototype): Moved to complaints.h.
* buildsym.c, coffread.c, dbxread.c, dwarfread.c, elfread.c,
gdbtypes.c, mipsread.c, stbsread.c, symfile.c: Include
complaints.h. Remove casts from arguments to complain(),
which is now a varargs function, and remove unnecessary
placeholder zero args.
* defs.h (begin_line): Add prototype.
* defs.h (vprintf_filtered): Add prototype.
* dwarfread.c (varargs.h): Remove, no longer needed.
* dwarfread.c (dwarfwarn): Remove prototype and function.
* dwarfread.c (complaints): Define a bunch of complaints.
* dwarfread.c (SQUAWK): Remove macro defs, convert all
usages to standard complain() calls.
* utils.c (begin_line): New function that ensures that
whatever gets filter-printed next starts on its own line.
* utils.c (vprintf_filtered): New func, like vfprintf_filtered,
but to stdout (calls vfprintf_filtered internally).
* 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.
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.
* 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().
tokens with embedded whitespace, such as C++ demangled names.
* defs.h (demangle_and_match, strcmp_iw, skip_quoted): Prototypes.
* main.c (gdb_completer_quote_characters): Add global variable.
* main.c (symbol_completion_function): Total rewrite for C++
demangled name handling.
* main.c (skip_quoted): New function.
* main.c (main): Set rl_completer_quote_characters.
* symmisc.c (dump_symtab): Print source language for symtab.
* symtab.c (expensive_mangler): Add prototype and function.
* symtab.c (completion_list_add_symbol): Total rewrite for new
C++ demangled name handling.
* symtab.c (lookup_symbol): Check for demangled C++ symbol first,
other changes for demangled C++ symbol handling.
* symtab.c (lookup_demangled_block_symbol): Use demangle_and_match.
* symtab.c (lookup_demangled_partial_symbol): Use demangle_and_match.
* symtab.c (decode_line_1): Recognize C++ demangled names on input.
* symtab.c (completion_list_add_symbol): Total rewrite for new
C++ demangled name handling.
* symtab.c (expensive_mangler): New function.
* utils.c (strcmp_iw, demangle_and_match): New functions.
* xcoffread.c (aixcoff_symfile_read): Fix prototype.
* All GDB files that #include defs.h: Removed stdio.h.
(defs.h): #include stdio.h.
This has been tested by building GDBs for all targets hosted on Sun4.
None of the build problems were related to stdio.h inclusion. (n.b.
many configurations don't build for other reasons.)