* arch-utils.c (default_prepare_to_proceed)
(generic_prepare_to_proceed): Added new functions.
* arch-utils.h: New function declarations for
default_prepare_to_proceed() and generic_prepare_to_proceed().
* gdbarch.sh: Added PREPARE_TO_PROCEED.
* gdbarch.c: Regenerated.
* gdbarch.h: Regenerated.
* inferior.h: Added get_last_target_status() declaration.
* infrun.c (get_last_target_status): Added new function.
(handle_inferior_event): Saves last pid and waitstatus, which will
get returned by get_last_target_status().
* hppa-tdep.c (prepare_to_proceed): Added comment stating that
prepare_to_proceed() is potentially redundant since
default_prepare_to_proceed() has been added.
* linux-thread.c (prepare_to_proceed): Ditto.
* lin-lwp.c (prepare_to_proceed): Ditto.
* m3-nat.c (prepare_to_proceed): Ditto.
(init_dummy_target): New function, fills in dummy_target.
(initialize_targets): Use it.
* hpux-thread.c (hpux_thread_ops): Don't initialize statically.
(init_hpux_thread_ops): New function, fills in hpux_thread_ops.
(_initialize_hpux_thread): Use it.
* m3-nat.c (m3_ops): Don't initialize statically.
(init_m3_ops): New function, fills in m3_ops.
(_initialize_m3): Use it.
* infrun.c (set/show scheduler-locking) New command. Set a
mode bit that will control how GDB attempts to control thread
scheduling for step, continue, etc. (resume): make use of
the schedule-locking mode.
* target.h (struct target_ops): new field to_has_thread_control.
* sol-thread.c: initialize target_ops to_has_thread_control.
* procfs.c: ditto.
* target.c: ditto.
* m3-nat.c: ditto.
* remote.c: ditto.
* hpux-thread.c: ditto.
returns a possibly modified pid.
* inftarg.c (ptrace_him): Now returns pid;
* m3-nat.c (m3_trace_him): Now returns pid;
* infcmd.c (run_command): Minor cleanup.
* infrun.c (wait_for_inferior): Add another check for one_stepped
near where we read the pc to avoid erroneously setting
random_signal for multi-threaded support.
* procfs.c: Add support for Solaris LWPs. Remove def of
LOSING_POLL. Many cleanups... Several workarounds for Solaris
lossage. System call entry and exit are now handled by
dynamically registered handlers.
* (syscallname): Don't barf when handed an unknown syscall
number.
* (info_proc_syscalls): Ditto.
* sol-thread.c: New file. Implements Solaris thread support.
* symfile.c (symbol_file_add): Add call to target_new_objfile to
notify target-dependent code about new symbol tables.
* (clear_symtab_users): Call target_new_objfile to notify it of
the removal of all symbol tables.
* target.c (push_target): Make sure that to_close is non-zero
before calling it.
* target.h (target_new_objfile): Provide default.
* config/alpha/nm-osf2.h: Define LOSING_POLL because this version
of OSF can't hack using poll with /proc.
* config/sparc/nm-sun4sol2.h (target_new_objfile): Define to be
sol-thread-new-objfile.
* config/sparc/sun4sol2.mh: Add sol-thread.o to NATDEFFILES, and
add libthread_db.so.1 to NAT_CLIBS.
* config/sparc/tm-sun4sol2.h: Define PIDGET, TIDGET, and
target_pid_to_str.
and stack pointer during stepping, to speed things up.
A. Changes to not select a frame until we need a selected frame:
* blockframe.c (flush_cached_frames): Call select_frame (NULL, -1).
* infrun.c (wait_for_inferior): Move call to select_frame back to
normal_stop. This reverts a change of 13 Apr 94 (it says Jeff
Law, but the change was my idea); the only reason for that change
was so we could save and restore the selected frame in
wait_for_inferior, and now that flush_cached frames clears the
selected frame, that should work OK now.
B. Changes to not create a current_frame until we need one:
* blockframe.c (get_current_frame): If current_frame is NULL, try
to create an innermost frame.
* sparc-tdep.c (sparc_pop_frame), infcmd.c (run-stack_dummy),
infrun.c (wait_for_inferior), thread.c (thread_switch),
convex-tdep.c (set_thread_command), a29k-tdep.c (pop_frame),
alpha-tdep.c (alpha_pop_frame), convex-xdep.c (core_file_command),
h8300-tdep.c (h8300_pop_frame), h8500-tdep.c (h8300_pop_frame),
hppa-tdep.c (hppa_pop_frame), i386-tdep.c (i386_pop_frame),
i960-tdep.c (pop_frame), m68k-tdep.c
(m68k_pop_frame), mips-tdep.c (mips_pop_frame), rs6000-tdep.c
(push_dummy_frame, pop_dummy_frame, pop_frame), sh-tdep.c
(pop_frame), config/arm/tm-arm.h (POP_FRAME),
config/convex/tm-convex.h (POP_FRAME), config/gould/tm-pn.h
(POP_FRAME), config/ns32k/tm-merlin.h (POP_FRAME),
config/ns32k/tm-umax.h (POP_FRAME), config/tahoe/tm-tahoe.h
(POP_FRAME), config/vax/tm-vax.h (POP_FRAME): Don't
call create_new_frame.
* corelow.c (core_open), altos-xdep.c (core_file_command),
arm-xdep.c (core_file_command), gould-xdep.c (core_file_command),
m3-nat.c (select_thread), sun386-nat.c (core_file_command),
umax-xdep.c (core_file_command): Don't call create_new_frame; do
call flush_cached_frames.
* blockframe.c (reinit_frame_cache): Don't call create_new_frame
or select_frame.
C. Changes to get rid of stop_frame_address and instead only
fetch the frame pointer when we need it.
* breakpoint.c (bpstat_stop_status): Remove argument
frame_address; use FRAME_FP (get_current_frame ()).
* infrun.c (wait_for_inferior): Don't pass frame pointer to
bpstat_stop_status.
* infrun.c (wait_for_inferior): Use FRAME_FP (get_current_frame
()) instead of stop_frame_address.
* infrun.c (save_inferior_status, restore_inferior_status),
inferior.h (struct inferior_status): Don't save and restore
stop_frame_address.
* inferior.h, infcmd.c, thread.c (thread_switch), m3-nat.c
(select_thread): Remove stop_frame_address and uses thereof.
D. Same thing for the stack pointer.
* infrun.c (wait_for_inferior): Remove stop_sp and replace
uses thereof with read_sp ().
E. Change to eliminate one nasty little spot where we were
wanting to know the frame pointer from before the current step
(idea from GDB 3.5, which saved my ass, because my other ideas of
how to fix it were very baroque).
* infrun.c: Remove prev_frame_address.
* infrun.c (wait_for_inferior, step_over_function): Use
step_frame_address instead of prev_frame_address.
F. Same basic idea for the stack pointer.
* inferior.h, infcmd.c: New variable step_sp.
* infcmd.c (step_1, until_next_command): Set it.
* infrun.c: Remove prev_sp and replace uses by step_sp.
* infrun.c (wait_for_inferior): If we get out of the step
range, then set step_sp to the current stack pointer before we
start going again.
config/ns32k/ns32km3.mh: Define NAT_FILE.
* config/nm-m3.h: Change guard from _OS_MACH3_H_ and _OS_MACH3_H
(it was inconsistent and namespace-wrong) to NM_M3_H.
* m3-nat.c (mach_really_wait): Change parameter name to ourstatus.
(m3_open): New function.
(m3_ops): Use it.
* TODO: Update Mach section.
* Makefile.in: Remove "rapp" stuff; it is superseded by gdbserver.
* procfs.c (procfs_create_inferior), inftarg.c (child_create_inferior),
m3-nat.c (m3_create_inferior): Pass it.
* procfs.c: Remove ptrace function. It was declared in a way which
conflicted with the prototype in unistd.h on Solaris.
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.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.
Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')
Replaced calls to fopen for output to gdb_fopen.
Added sufficient goo to utils.c and defs.h to make the above work.
The net effect is that stdio output functions are only directly used
in utils.c. Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.
In the near future, GDB_FILE will stop being equivalant to FILE.
The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior. The testsuite doesn't notice anything
like this, though.
Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code. All output from commands
should go to a GDB_FILE.
Target-specific code can still use stdio directly to communicate with
targets.
remote-mon.c (monitor_create_inferior), remote-nindy.c
(nindy_create_inferior), remote-st.c (st2000_create_inferior),
remote-vx.c (vx_create_inferior): Remove CREATE_INFERIOR_HOOK; it
is replaced by init_trace_fun.
* config/convex/xm-convex.h, convex-xdep.c: Add comments explaining
how to do without CREATE_INFERIOR_HOOK for whoever fixes the Convex
port.
* Makefile.in: Add Mach files to ALLDEPFILES, etc.
* m3-nat.c: Clean up more hair--message(), cprocs.
* configure.in: Recognize Mach targets and hosts.
* config/ns32k/tm-umax.h: Add some #ifndef's so tm-ns32km3.h can
include this file.
* Mach headers in config/*/tm-*.h: Fix includes to match correct
locations of files.
* config/i386/i386mach.c: Explain this is for the old (probably
non-functional and/or obsolete) Mach stuff.
* m3-nat.c, config/nm-m3.h,
i386m3-nat.c, mipsm3-nat.c, ns32km3-nat.c,
config/i386/{i386m3.mh,i386m3.mt,tm-i386m3.h,xm-i386m3.h},
config/i386/{i386mk.mh,i386mk.mt,tm-i386mk.h,xm-i386mk.h},
config/mips/{mipsm3.mh,mipsm3.mt,tm-mipsm3.h,xm-mipsm3.h},
config/ns32k/{ns32km3.mh,ns32km3.mt,tm-ns32km3.h,xm-ns32km3.h}:
New files.