* 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.
From David Deephanphongs <deephan@telocity.com>
* inferior.h: Fix declarations of get_inferior_args and
set_inferior_args, which were missing the trailing 's'.
* infcmd.c (get_inferior_args, set_inferior_args): Accessor functions
for the inferior program arguments.
(run_command, run_no_args_command, init_infcmd)): Use accessor
functions to set the inferior program arguments.
* inferior.h: Add definitions to the accessor functions above.
step_over_calls.
* infcmd.c (step_over_calls): Change definition.
(step_1): Use new enum values in relation to step_over_calls.
(step_once): Ditto.
(until_next_command): Ditto.
* infrun.c (clear_proceed_status): Ditto.
(handle_inferior_event): Ditto.
* inferior.h (step_stop_if_no_debug): New variable.
* infrun.c (step_stop_if_no_debug): Declare.
(handle_inferior_event): Stop the step command if we entered a function without
line info.
(_initialize_infrun): New command 'set step-mode' to control the step command.
* infcmd.c (step_once): Switch to stepi mode if there is no line info
(and switching is enabled).
* regcache.c (registers_changed, registers_fetched): Use
ARCH_NUM_REGS directly, eliminating an unnecessary variable.
This change adds pseudo-register capability to GDB.
Pseudo-registers are handled like registers, but they
don't come from or live on the target. They may be
aliases for an existing register, or they may be computed.
* defs.h (NUM_PSEUDO_REGISTERS): Define default of zero.
(ARCH_FETCH_PSEUDO_REGISTERS): Define default of no-op.
(ARCH_STORE_PSEUDO_REGISTERS): Define default of no-op.
# regcache.c (registers_changed): Mark pseudo-registers
invalid, as well as real registers.
(registers_fetched): Do not mark pseudo-registers as fetched
at the same time as other (real) registers.
(read_register_bytes): Fetch pseudo-registers (if any) from
the target architecture module instead of from the target.
(read_register_gen): Ditto.
(read_register): Ditto.
(write_register_bytes): Store pseudo-registers (if any) to
the target architecture module instead of to the target.
(write_register_gen): Ditto.
(write_register): Ditto.
(build_regcache): Allocate enough register_valid space for
pseudo-registers as well as normal (real) ones.
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.
config/gould/tmp-{pn,np1}.h,
config/{sparc/tm-sparc.h,pyr/tm-pyr.h,vax/tm-vax.h}: Remove field
next_frame from struct frame_info. It has no purpose beyond
->next->frame and is an artifact from GDB 2.8.
* am29k-tdep.c (_initialize_29k): Make it possible for the
user to set and query the address where function calls into the
inferior write a small scratch routine. `set call_scratch_address'
* inferior.h (PC_IN_CALL_DUMMY): Fix fencepost error.
* remote.c (remote_prepare_to_store): Only fetch regs if they are
not already cached validly.
child_mourn_inferior): collect unix child process stratum
functions which live below the target vector into this file to
facilitate host/target/native split. Also, make them static.
* inflow.c (child_mourn_inferior): removed.
* infrun.c (child_create_inferior, child_attach): removed.
(resume): becomes global so that functions below the
target vector can find it.
* inferior.h (resume): add prototype.
(child_mourn_inferior, child_create_inferior, child_attach):
remove prototypes.
defining CALL_DUMMY_LOCATION as BEFORE_TEXT_END. This is
because machines that do this will also have to know to
set NEED_TEXT_START_END. Besides, it was a redundant way to
say the same thing.
* tm-29k.h, tm-convex.h, tm-np1.h: Eliminate
CANNOT_EXECUTE_STACK, define CALL_DUMMY_LOCATION and
NEED_TEXT_START_END.
* 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.