Fix double parsing of filenames passed as command line arguments
to GDB (causes weird handling of escape characters).
Also, remove dependencies on the CLI from libgdb.
* call-cmds.h: Remove declaration of exec_file_command().
* gdbcore.h: Remove declaration of exec_file_command().
Add declarations for exec_open() and exec_file_clear().
* symfile.h: Add declarations for symbol_file_add_main() and
symbol_file_clear().
* exec.c (exec_open): New function. Implements to_open for exec
targets.
(exec_file_clear): New function. Makes GDB forget about a previously
specified executable file.
(exec_file_attach): Move parsing of arguments from here ...
(exec_file_command): ... to here.
(init_exec_ops): Use exec_open(), not exec_file_command() to
implement to_open for exec targets.
* symfile.c (symbol_file_add_main): New function. Call symbol_file_add() with default values. Used when the file name has already been parsed.
(symbol_file_clear): New function. Makes GDB forget about previously
read symbols.
(symbol_file_command): Call the above function instead of inline code.
* main.c: Include "symfile.h" and "gdbcore.h" instead of the deprecated
"call-cmds.h".
(captured_main): Call exec_file_attach() and symbol_file_add_main()
instead of exec_file_command() and symbol_file_command().
(captured_main): Add comment.
* corefile.c: Include "symfile.h".
(core_file_command): Call symbol_file_add_main() instead of
symbol_file_command().
(reopen_exec_file): Call exec_open() instead of exec_file_command().
* infcmd.c: Include "symfile.h".
(attach_command): Call symbol_file_add_main() instead of
symbol_file_command().
* infrun.c: Remove comment about the inclusion of "symfile.h",
not any longer appropriate.
(follow_exec): Call symbol_file_add_main() instead of
symbol_file_command().
* remote-es.c: Include "symfile.h".
(es1800_load): Call symbol_file_add_main() instead of
symbol_file_command().
* remote-vx.c: Remove comment about the inclusion of "symfile.h",
not any longer appropriate.
(vx-wait): Call symbol_file_add_main() instead of
symbol_file_command().
* solib-svr4.c (open_symbol_file_object): Call symbol_file_add_main()
instead of symbol_file_command().
* v850ice.c (ice_file): Call exec_open(), exec_file_attach() and
symbol_file_add_main() instead of exec_file_command() and
symbol_file_command().
* Makefile.in: Update dependencies.
* infptrace.c (child_xfer_memory): Likewise.
* monitor.c (monitor_xfer_memory): Likewise.
* remote-adapt.c (adapt_xfer_inferior_memory): Likewise.
* remote-array.c (array_xfer_memory): Likewise.
* remote-bug.c (bug_xfer_memory): Likewise.
* remote-e7000.c (e7000_xfer_inferior_memory): Likewise.
* remote-eb.c (eb_xfer_inferior_memory): Likewise.
* remote-es.c (es1800_xfer_inferior_memory): Likewise.
* remote-mips.c (mips_xfer_memory): Likewise.
* remote-mm.c (mm_xfer_inferior_memory): Likewise.
* remote-nindy.c (nindy_xfer_inferior_memory): Likewise.
* remote-os9k.c (rombug_xfer_inferior_memory): Likewise.
* remote-rdi.c (arm_rdi_xfer_memory): Likewise.
* remote-rdp.c (remote_rdp_xfer_inferior_memory): Likewise.
* remote-sds.c (sds_xfer_memory): Likewise.
* remote-sim.c (gdbsim_xfer_inferior_memory): Likewise.
* remote-st.c (st2000_xfer_inferior_memory): Likewise.
* remote-udi.c (udi_xfer_inferior_memory): Likewise.
* remote-vx.c (vx_xfer_memory): Likewise.
* remote.c (remote_xfer_memory): Likewise.
* target.c (debug_to_xfer_memory, do_xfer_memory): Likewise.
* target.h (child_xfer_memory, do_xfer_memory, xfer_memory): Likewise.
* target.h (#include "memattr.h"): Added.
(target_ops.to_xfer_memory): Add attrib argument.
* wince.c (_initialize_inftarg): Removed call to set_dcache_state.
* dcache.h (set_dcache_state): Removed declaration.
* dcache.c (set_dcache_state): Removed definition
* dcache.c: Update module comment, as dcache is now enabled and
disabled with memory region attributes instead of by the global
variable "remotecache". Add comment describing the interaction
between dcache and memory region attributes.
(dcache_xfer_memory): Add comment describing benefits of moving
cache writeback to a higher level.
(dcache_struct): Removed cache_has_stuff field. This was used to
record whether the cache had been accessed in order to invalidate
it when it was disabled. However, this is not needed because the
cache is write through and the code that enables, disables, and
deletes memory regions invalidate the cache. Add comment which
suggests that we could be more selective and only invalidate those
cache lines containing data from those memory regions.
(dcache_invalidate): Updated.
(dcache_xfer_memory): Updated.
(dcache_alloc): Don't abort() if dcache_enabled_p is clear.
(dcache_xfer_memory): Removed code that called do_xfer_memory() to
perform a uncached transfer if dcache_enabled_p was clear. This
function is now only called if caching is enabled for the memory
region.
(dcache_info): Always print cache info.
* target.c (do_xfer_memory): Add attrib argument.
(target_xfer_memory, target_xfer_memory_partial): Break transfer
into chunks defined by memory regions, pass region attributes to
do_xfer_memory().
* dcache.c (dcache_read_line, dcache_write_line): Likewise.
* Makefile.in (SFILES): Add memattr.c.
(COMMON_OBS): Add memattr.o.
(dcache.o): Add target.h to dependencies.
* memattr.c: New file.
* memattr.h: Likewise.
target.h, remote-es.c, remote-nindy.c: Don't set baud rate if
baud_rate is -1. Remove sr_get_baud_rate and sr_set_baud_rate;
just use the global variable itself. When printing baud rate,
don't print a baud rate if baud_rate is -1.
* Move target_signal_from_host, target_signal_to_host, and
store_waitstatus from inftarg.c to target.c. procfs needs them.
* target.c: Include "wait.h" and <signal.h>.
* target.h, infrun.c (proceed), proceed callers: Pass new code
TARGET_SIGNAL_DEFAULT instead of -1. This avoids problems with
enums being treated as unsigned and is cleaner.
* infrun.c (signals_info): Don't print TARGET_SIGNAL_DEFAULT or
TARGET_SIGNAL_0.
* infcmd.c (signal_command), infrun.c (signals_info):
Don't allow user to specify numeric equivalent of
TARGET_SIGNAL_DEFAULT.
struct target_waitstatus. Change status argument to target_wait to
be struct target_waitstatus * instead of int *.
* target.h, infrun.c, all targets: Change type of signal arguments
to resume(), proceed(), and target_resume() from int to enum
target_signal.
* All targets (*_wait, *_resume): Change accordingly.
* infcmd.c (program_info, signal_command), throughout infrun.c,
* fork-child.c, solib.c, hppa-tdep.c, osfsolib.c: Use this stuff.
* convex-xdep.c, convex-tdep.c: Add FIXME's (getting the Convex
signal code stuff right with the new signals would be non-trivial).
* inferior.h (stop_signal): Make it enum target_signal not int.
* target.c, target.h (target_signal_to_string, target_signal_to_name,
target_signal_from_name): New functions.
* inftarg.c, target.h (target_signal_to_host, target_signal_from_host,
store_waitstatus): New functions.
* procfs.c (procfs_notice_signals): Use them.
* i960-tdep.c (i960_fault_to_signal): New function, to replace
print_fault.
* config/i960/tm-i960.h: Don't define PRINT_RANDOM_SIGNAL.
cleans up all kinds of hassles (which nm to use in munch, etc). The
new formatting conventions (mostly already followed) are that
the name of the _initialize_* routines must start in column zero,
and must not be inside #if.
* munch: Removed.
* Makefile.in: Remove references to munch.
* serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c,
alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c,
procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c,
i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c,
z8k-tdep.c: Make sure the above conventions are followed. Make
sure they are all declared as returning void. Clean up
miscellaneous comments and such.
that clears the `inserted' flag for all breakpoints and deletes
any breakpoints which should go away between runs of programs.
* inflow.c (generic_mourn_inferior), infrun.c (init_wait_for_inferior),
remote-es.c (es1800_load), comments in exec.c and corelow.c:
Use it instead of mark_breakpoints_out.
* breakpoint.c (mark_breakpoints_out): Update comment, tm-rs6000.h
uses it in a completely different context.
* breakpoint.c (breakpoint_re_set_one): Add bp_call_dummy case.
* Makefile.in (CLIBS): Reorder to make Lynx ld happy.
* (HFILES): New file thread.h.
* (OBS): New file thread.c.
* configure.in: Host config for Lynx/386.
* fork-child.c (fork_inferior): Call init_thread_list().
* infrun.c (resume): Add pid to invocation of target_resume().
* (wait_for_inferior): Pay attention to pid from target_wait().
Multi-threading code now uses this to determine what to do.
* inftarg.c (child_wait): Conditionalize based on CHILD_WAIT macro.
Use target_pid_to_str() macro throughout when printing pid.
* inferior.h (child_resume): Add pid to prototype.
* hppab-nat.c hppah-nat.c infptrace.c (child_resume): Pass in pid as
argument, instead of using inferior_pid.
* procfs.c (procfs_resume): Pass in pid as argument. Ignored for
now. Use target_pid_to_str() macro throughout for printing process id.
* remote-adapt.c (adapt_resume): Pass in pid as argument.
* remote-eb.c (eb_resume): Pass in pid as argument.
* remote-es.c (es1800_resume): Pass in pid as argument.
* remote-hms.c (hms_resume): Pass in pid as argument.
* remote-mips.c (mips_resume): Pass in pid as argument.
* remote-mm.c (mm_resume): Pass in pid as argument.
* remote-monitor.c (monitor_resume): Pass in pid as argument.
* remote-nindy.c (nindy_resume): Pass in pid as argument.
* remote-sa.sparc.c (remote_resume): Pass in pid as argument.
* remote-sim.c (rem_resume): Pass in pid as argument.
* remote-sp64sim.c (simif_resume): Pass in pid as argument.
* remote-st.c (st2000_resume): Pass in pid as argument.
* remote-udi.c (udi_resume): Pass in pid as argument.
* remote-vx.c (vx_resume): Pass in pid as argument.
* remote-z8k.c (rem_resume): Pass in pid as argument.
* remote.c (remote_resume): Pass in pid as argument.
* solib.c (solid_create_inferior_hook): Pass inferior_pid to
target_resume().
* target.c (normal_pid_to_str): New routine to print out process
ID normally.
* target.h (struct target_ops): Add pid to prototype at
to_resume(). (target_resume): Add pid argument.
* (target_pid_to_str): Default definition for normal type pids.
* thread.c, thread.c: New modules for multi thread/process control.