* 2006-03-22 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C and M16C.
* configure.tgt (m32c-*-*): New entry.
* config/m32c/m32c.mt: New file.
* m32c-tdep.c: New file.
* Makefile.in (elf_m32c_h): New variable.
(m32c-tdep.o): New rule.
* NEWS: Mention new target.
* MAINTAINERS: Designate Jim Blandy as responsible maintainer.
frame sniffer.
* sparc-tdep.c (sparc32_gdbarch_init): Make sure to call
dwarf2_frame_set_init_reg() before gdbarch_init_osabi() so
that the latter can override.
* Makefile.in (sparc64-linux-tdep.o): Update dependencies.
(sparc32_linux_init_abi): Hook it into tdep->step_trap.
* sparc64-linux-tdep.c (sparc64_linux_step_trap): New.
(sparc64_linux_init_abi): Hook it into tdep->step_trap.
* Makefile.in: Update dependencies.
(check_for_thread_db): New function, split out from
thread_db_new_objfile. Remove dead check for active
thread_db on inapplicable targets.
(thread_db_new_objfile): Call check_for_thread_db.
* Makefile.in (linux-thread-db.o): Update.
* linux-nat.c (child_post_attach): Call check_for_thread_db.
(linux_child_post_startup_inferior): Likewise.
(lin_lwp_attach_lwp): Call target_post_attach instead of
child_post_attach.
* linux-nat.h (check_for_thread_db): New prototype.
2006-03-28 Jim Blandy <jimb@codesourcery.com>
* prologue-value.c, prologue-value.h: New files.
* Makefile.in (prologue_value_h): New variable.
(HFILES_NO_SRCDIR): List prologue-value.h.
(SFILES): List prologue-value.c.
(COMMON_OBS): List prologue-value.o.
(prologue-value.o): New rule.
src/gdb/doc/ChangeLog:
2006-03-28 Jim Blandy <jimb@codesourcery.com>
* gdbint.texinfo (Prologue Analysis): New section.
(fork_load_infrun_state): Set inferior_ptid and stop_pc here.
Update the register cache and selected frame also.
(linux_fork_mourn_inferior): Use fork_load_infrun_state. Return
to single fork mode if necessary.
(linux_fork_context): Remove bits handled by fork_load_infrun_state.
* Makefile.in (linux_fork_h): New.
(linux-fork.o, linux-nat.o): Update.
(mips_linux_init_abi): Use 128-bit long double for N32 and N64.
(mips_n32n64_return_value): Support 128-bit long double.
(print_gp_register_row): Don't print spaces before ignored
or floating point registers.
* symfile.c (generic_load): Use buildargv() and tilde_expand()
to parse file names with quoting, spaces and tildes properly.
(load_command): Quote all special characters before calling
target_load() such that buildargv() doesn't break file names.
(_initialize_symfile): Mention the load offset in the help for
the load command.
* remote-sim.c: Include readline.h.
(gdbsim_load): Use buildargv and tilde_expand() to parse file
names with quoting, spaces and tildes properly.
* target.h (target_load): Comment the parameters better.
* Makefile.in (remote_sim.o): Add readline.h dependency.
testsuite/
* gdb.base/help.exp (help load): Update expected results.
* Makefile.in (gdb_select_h, ser_tcp_h): New.
(ALLDEPFILES): Add ser-mingw.c.
(event-loop.o, inflow.o, mingw-hdep.o, posix-hdep.o, ser-base.o)
(ser-tcp.o, ser-unix.o): Update.
(ser-mingw.o): New rule.
* configure: Regenerated.
* configure.ac: Add ser-mingw.o for mingw32.
* ser-mingw.c: New file.
* event-loop.c: Include "gdb_select.h".
(gdb_select): Remove, moved to mingw-hdep.c and posix-hdep.c.
* ser-base.c: Include "gdb_select.h".
(ser_base_wait_for): Use gdb_select.
* serial.c (serial_for_fd): New function.
(serial_fdopen): Try "terminal" before "hardwire". Initialize
the allocated struct serial.
(serial_wait_handle): New function.
* serial.h (serial_for_fd, serial_wait_handle): New prototypes.
(struct serial_ops) [USE_WIN32API]: Add wait_handle.
* gdb_select.h: New file.
* ser-tcp.c: Include "ser-tcp.h". Remove unused "ser-unix.h" include.
(net_close, net_read_prim, net_write_prim): Make global.
(net_open): Likewise. Pass an exception set to select. Whitespace fix.
Document why we can not use gdb_select.
(_initialize_ser_tcp) [USE_WIN32API]: Do not register TCP support here.
* ser-tcp.h: New file.
* inflow.c (gdb_has_a_terminal): Don't initialize stdin_serial here.
(handle_sigio): Use gdb_select.
(initialize_stdin_serial): New function.
* terminal.h (initialize_stdin_serial): New prototype.
* top.c (gdb_init): Call initialize_stdin_serial.
* mingw-hdep.c (gdb_select): New function, moved from gdb_select in
event-loop.c. Add exception condition support. Use serial_for_fd
and serial_wait_handle. Fix timeout handling.
* posix-hdep.c: Include "gdb_select.h".
(gdb_select): New function.
* remote-st.c (connect_command): Use gdb_select.
* ser-unix.c: Include "gdb_select.h".
(hardwire_send_break, wait_for): Use gdb_select.
(ALLDEPFILES): Add mingw-hdep.c and posix-hdep.c.
* configure.ac: Add gdb_host_obs to CONFIG_OBS. Set gdb_host_obs
to posix-hdep.o by default.
* configure: Regenerated.
* configure.host: Document gdb_host_obs. Add an entry for
i[34567]86-*-mingw32*.
* mingw-hdep.c, posix-hdep.c: New files.
* utils.c (safe_strerror): Remove, moved to posix-hdep.o.
* osabi.c (gdb_osabi_name): Add name of new value GDB_OSABI_AIX.
* rs6000-tdep.h: New file.
* rs6000-tdep.c: Include "rs6000-tdep.h".
(rs6000_gdbarch_init): Remove enabling of software single step.
Will be done in the AIX-specific initialization routine.
* rs6000-aix-tdep.c: New file.
* config/powerpc/aix.mt (TDEPFILES): Add rs6000-aix-tdep.o.
* Makefile.in (rs6000_tdep_h): New variable.
(rs6000-tdep.o): Update dependencies.
(rs6000-aix-tdep.o): New rule.
stricter. Add separate cases for long_arg, ptr_arg, and
long_double_arg.
* utils.c (xstrvprintf): Improve the error message issued
for a bad format string.
* Makefile.in (GDB_WARN_CFLAGS_NO_FORMAT, INTERNAL_CFLAGS_BASE):
New variables.
(gnu-v3-abi.o, monitor.o, procfs.o, linux-thread-db.o): Remove
$(NO_WERROR_CFLAGS).
(printcmd.o): Likewise. Use $(GDB_WARN_CFLAGS_NO_FORMAT) and
enable -Werror.
* sh-tdep.c: Include reggroups.h.
(sh_register_reggroup_p): New function.
(sh_gdbarch_init): Add call to set_gdbarch_register_reggroup_p.
* Makefile.in (sh-tdep.o): Add dependency on reggroups.h.
Checkpoint/Restart for Linux.
* linux-nat.c: Add support for debugging multiple forks.
Add #include for linux-fork.h (interface spec).
(super_mourn_inferior): New function pointer.
(child_mourn_inferior): New function / target method.
(linux_target): Claim to_mourn_inferior method pointer.
(child_follow_fork): Call interface to linux-fork, conditionally
add new fork processes to list of debugged processes.
(kill_inferior): Use interface to linux-fork to kill
multiple processes.
* linux-fork.h: New file.
* linux-fork.c: New file. Support for debugging multiple forks
of the same program. Support for checkpoint and restart commands.
* infrun.c (nullify_last_target_wait_ptid): New function.
* Makefile.in: Add linux-fork.
* config/*/linux.mh: Add linux-fork.
* NEWS: Mention new functionality.
"bsd-uthread.h".
(SPARC64OBSD_UTHREAD_FP_OFFSET, SPARC64OBSD_UTHREAD_PC_OFFSET):
New defines.
(sparc64obsd_supply_uthread, sparc64obsd_collect_uthread): New
functions.
(sparc64obsd_init_abi): Set supply_uthread and collect_uthread.
* Makefile.in (sparc64obsd-tdep.o): Update dependencies.
(amd64obsd_uthread_reg_offset): New variable.
(AMD64OBSD_UTHREAD_RSP_OFFSET): New define.
(amd64obsd_supply_uthread, amd64obsd_collect_uthread): New
functions.
(amd64obsd_init_abi): Set supply_uthread and collect_uthread.
* Makefile.in (amd64obsd-tdep.o): Update dependencies.
floatformat_vax.
(convert_doublest_to_floatformat): Use
floatformat_normalize_byteorder to swap bytes if necessary.
* vax-tdep.c: Include floatformat.h.
(vax_gdbarch_init): Set float_format, double_format,
long_double_format and long_double_bit.
* Makefile.in (vax-tdep.o): Update dependencies.
(alpha-linux-nat.o, sparc-linux-nat.o): New rules.
(amd64-linux-nat.o, arm-linux-nat.o, hppa-linux-nat.o)
(i386-linux-nat.o, ia64-linux-nat.o, linux-nat.o, m32r-linux-nat.o)
(m68klinux-nat.o, mips-linux-nat.o, ppc-linux-nat.o, s390-nat.o)
(sparc64-linux-nat.o): Update dependencies.
* alpha-linux-nat.c, sparc-linux-nat.c: New files.
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(amd64_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(amd64_linux_child_post_start_inferior): Renamed from
child_post_startup_inferior and made static. Call
super_post_startup_inferior.
(super_post_startup_inferior): New.
(_initialize_amd64_linux_nat): Set it. Call linux_target and
add_target.
* arm-linux-nat.c (arm_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(arm_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_arm_linux_nat): Add a prototype. Use linux_target and
add_target.
* hppa-linux-nat.c (hppa_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(hppa_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_hppa_linux_nat): New function.
* i386-linux-nat.c (i386_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(i386_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(i386_linux_resume): Renamed from child_resume and made static.
(i386_linux_child_post_start_inferior): Renamed from
child_post_startup_inferior and made static. Call
super_post_startup_inferior.
(super_post_startup_inferior): New.
(_initialize_i386_linux_nat): New function.
* i386-nat.c: Remove LINUX_CHILD_POST_STARTUP_INFERIOR #ifndef.
* ia64-linux-nat.c (ia64_linux_xfer_unwind_table): Remove.
(super_xfer_partial): New.
(ia64_linux_xfer_partial): New function. Use it.
(_initialize_ia64_linux_nat): New function.
* ia64-tdep.c (getunwind_table): Revert 2005-06-08 change; use
target_read_partial and document the problem.
* inf-ptrace.c (inf_ptrace_fetch_register): Use
CANNOT_FETCH_REGISTER. Fix some comments.
(inf_ptrace_store_register): Use CANNOT_STORE_REGISTER. Fix some
comments.
* linux-nat.c: Include "inf-ptrace.h" and "auxv.h".
(linux_ops, super_xfer_partial): New variables.
(linux_child_post_startup_inferior): Make static.
(child_post_startup_inferior): Delete.
(linux_nat_attach, linux_nat_detach, resume_callback)
(linux_nat_resume, linux_nat_wait, linux_nat_create_inferior)
(linux_nat_mourn_inferior): Use linux_ops instead of
deprecated_child_ops.
(child_wait): Do not depend on CHILD_WAIT.
(linux_nat_xfer_memory): Remove, replace by ...
(linux_nat_xfer_partial): ... this. Use linux_ops->to_xfer_partial
instead of linux_proc_xfer_memory and child_xfer_memory.
(linux_nat_fetch_registers, linux_nat_store_registers)
(linux_nat_child_post_startup_inferior): New functions.
(init_linux_nat_ops): Use the new functions.
(linux_proc_xfer_memory): Remove, replace by ...
(linux_proc_xfer_partial): ... this. Make static.
(linux_xfer_partial, linux_register_u_offset, linux_target): New
functions.
(_initialize_linux_nat): Do not modify deprecated_child_ops.
* linux-nat.h (linux_proc_xfer_memory): Remove prototype.
(struct mem_attrib, struct target_ops): Remove forward declarations.
(linux_child_post_startup_inferior): Remove prototype.
(linux_target): Add prototype.
* linux-thread-db.c (thread_db_xfer_memory): Remove, replace by ...
(thread_db_xfer_partial): ... this.
(init_thread_db_ops): Set to_xfer_partial instead of
deprecated_xfer_memory.
* m32r-linux-nat.c (m32r_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(m32r_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_m32r_linux_nat): New function.
* m68klinux-nat.c (m68k_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(m68k_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(old_fetch_inferior_registers, old_store_inferior_registers): Made
static.
(_initialize_m68k_linux_nat): Use linux_target and add_target.
* mips-linux-nat.c (_initialize_mips_linux_nat): New function.
* ppc-linux-nat.c (ppc_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(ppc_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_ppc_linux_nat): New function.
* s390-nat.c (s390_linux_fetch_inferior_registers): Renamed
from fetch_inferior_registers and made static.
(s390_linux_store_inferior_registers): Renamed from
store_inferior_registers and made static.
(_initialize_s390_nat): New function.
* sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
linux_target and add_target.
* config/nm-linux.h: Don't include "auxv.h".
(struct target_waitstatus, child_wait, CHILD_WAIT)
(CHILD_PID_TO_EXEC_FILE, CHILD_INSERT_FORK_CATCHPOINT)
(CHILD_INSERT_VFORK_CATCHPOINT, CHILD_INSERT_EXEC_CATCHPOINT)
(CHILD_POST_STARTUP_INFERIOR, CHILD_POST_ATTACH, CHILD_FOLLOW_FORK)
(DEPRECATED_KILL_INFERIOR, NATIVE_XFER_AUXV): Delete.
* config/alpha/alpha-linux.mh (NATDEPFILES): Replace infptrace.o
and inftarg.o with inf-ptrace.o and alpha-linux-nat.o.
* config/sparc/linux.mh (NATDEPFILES): Replace infptrace.o and
inftarg.o with sparc-linux-nat.o.
* config/sparc/linux64.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o.
* config/arm/linux.mh (NATDEPFILES): Replace infptrace.o and
inftarg.o with inf-ptrace.o.
* config/i386/linux.mh (NATDEPFILES): Likewise.
* config/i386/linux64.mh (NATDEPFILES): Likewise.
* config/ia64/linux.mh (NATDEPFILES): Likewise.
* config/m32r/linux.mh (NATDEPFILES): Likewise.
* config/m68k/linux.mh (NATDEPFILES): Likewise.
* config/mips/linux.mh (NATDEPFILES): Likewise.
* config/pa/linux.mh (NATDEPFILES): Likewise.
* config/powerpc/linux.mh (NATDEPFILES): Likewise.
* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
* config/s390/s390.mh (NATDEPFILES): Likewise.
* config/i386/nm-linux.h (DEPRECATED_CHILD_RESUME): Don't define.
(LINUX_CHILD_POST_STARTUP_INFERIOR): Don't define.
* config/i386/nm-linux64.h (LINUX_CHILD_POST_STARTUP_INFERIOR):
Don't define.
* config/ia64/nm-linux.h: Don't include "target.h".
(NATIVE_XFER_UNWIND_TABLE, ia64_linux_xfer_unwind_table): Remove.
* config/djgpp/fnchange.lst: Add alpha-linux-tdep.c,
alpha-linux-nat.c, sparc-linux-tdep.c, and sparc-linux-nat.c.
include "tramp-frame.h".
(ppcobsd_sigtramp_cache_init): Remove function.
(ppcobsd_sigtramp): Remove variable.
(ppcobsd_page_size, ppcobsd_sigreturn_offset): New variables.
(ppcobsd_sigtramp_p): New function.
(ppcobsd_sigtramp_frame_cache, ppcobsd_sigtramp_frame_this_id)
(ppcobsd_sigtramp_frame_prev_register): New functions.
(ppcobsd_sigtramp_frame_unwind): New variable.
(ppcobsd_sigtramp_frame_sniffer): New function.
(ppcobsd_init_abi): Adjust to register new sigtramp sniffer
instead of the old one.
* Makefile.in (ppcobsd-tdep.o): Update dependencies.
instead of 8.
* m68kbsd-tdep.c: Include "frame.h", "trad-frame.h" and
"tramp-frame.h".
(m68kobsd_sigtramp_cache_init): New function.
(m68kbsd_aout_init_abi): Prepend m68kobsd_sigtramp unwinder.
"value.h" and "elf/common.h".
(hppabsd_supply_gregset): Use `gdb_byte *' for byte buffer.
(hppabsd_find_global_pointer): New function.
(hppabsd_init_abi): Set TDEP->find_global_pointer to
hppabsd_find_global_pointer.
* Makefile.in (hppabsd-tdep.o): Update dependencies.
* Makefile.in (symfile.o): Add $(exec_h).
* exec.h (exec_set_section_address): Add prototype.
* exec.c (exec_set_section_address): New function.
* symfile.c: Include "exec.h".
(struct place_section_arg, place_section): New.
(default_symfile_offsets): Call place_section for each
section of a relocatable file.
gdb/testsuite/
* gdb.base/relocate.c: Add a copyright notice.
(dummy): Remove.
* gdb.base/relocate.exp: Test printing the values of variables
from a relocatable file.
Reorder includes. Don't require FETCH_INFERIOR_REGISTERS to be
defined.
(armnbsd_fetch_registers): Rename from armnbsd_fetch_registers.
Make static.
(armnbsd_store_registers): Rename from armnbsd_store_registers.
Make static.
(_initialize_arm_netbsd_nat): Construct and add target vector.
* Makefile.in (armnbsd-nat.o): Update dependencies.
* config/arm/nbsdaout.mh (NATDEPFILES): Remove infptrace.o and
intarg.o, add inf-ptrace.o.
(NAT_FILE): Set to solib.h.
* config/arm/nbsdelf.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o, add inf-ptrace.o.
(NAT_FILE): Remove.
* Makefile.in: Re-add v850-tdep.o dependencies.
* configure.tgt: Re-add v850.
* v850-tdep.c: Reorder code slightly. Add register number enumerator.
(struct v850_frame_cache): New structure.
(v850_processor_type_table): Remove. Move functionality into
v850_register_name, v850e_register_name and v850_gdbarch_init.
(v850_register_name): New function.
(v850e_register_name): New function.
(struct prologue_info): Remove definition.
(v850_register_type): New function.
(v850_type_is_scalar): New function.
(v850_use_struct_convention): Align to gcc behaviour.
(v850_handle_prepare): Renamed from handle_prepare. Change third
parameter to struct v850_frame_cache *.
(v850_handle_pushm): Renamed from handle_pushm. Change third parameter
to struct v850_frame_cache *.
(v850_is_save_register): New function to evaluate if a register is
caller-save.
(v850_analyze_prologue): Replace v850_scan_prologue. Change to support
new frame code.
(v850_init_extra_frame_info): Remove.
(v850_frame_chain): Remove.
(v850_find_callers_reg): Remove.
(v850_skip_prologue): Make static.
(v850_pop_frame): Remove.
(v850_frame_align): New function.
(v850_push_dummy_call): Replace v850_push_arguments.
(v850_push_return_address): Remove.
(v850_extract_return_value): New function.
(v850_store_return_value): New function.
(v850_return_value): New function.
(v850_frame_saved_pc): Remove.
(v850_breakpoint_from_pc): New function.
(v850_alloc_frame_cache): New function.
(v850_fix_call_dummy): Remove.
(v850_frame_cache): New function.
(v850_target_architecture_hook): Remove.
(v850_frame_prev_register): New function.
(v850_frame_this_id): New function.
(v850_frame_unwind): New structure.
(v850_frame_sniffer): New function.
(v850_unwind_sp): New function.
(v850_unwind_pc): New function.
(v850_unwind_dummy_id): New function.
(v850_frame_base_address): New function.
(v850_frame_base): New structure.
(v850_gdbarch_init): New function.
* config/v850/v850.mt: Undelete. Drop TM_FILE.
* go32-nat.c: Include top.h. Update copyright years.
(init_go32_ops): Override the default value of gdbinit[] with
"gdb.ini".
* cli/cli-cmds.c (init_cli_cmds): Use gdbinit[] instead of a
compile-time literal string GDBINIT_FILENAME.
* top.c (PATH_MAX): Define if not defined.
(gdbinit): Declare with a constant size PATH_MAX.
* config/i386/go32.mh (XM_FILE): Remove.
* config/i386/xm-go32.h: Remove file.
* Makefile.in: Re-add h8300-tdep.o dependencies.
* h8300-tdep.c: Slightly rearrange type definitions and functions.
(struct frame_extra_info): Remove.
(struct h8300_frame_cache): Replace locals with differently defined
uses_fp member.
(h8300_unwind_pc): Simplify.
(h8300_unwind_sp): New function.
(h8300_unwind_dummy_id): Simplify.
(h8300_init_frame_cache): New function.
(h8300_is_argument_spill): Use reworked defines for opcode scanning.
(h8300_skip_prologue): Rewrite.
(h8300_alloc_frame_cache): Remove.
(h8300_analyze_frame_setup): Remove.
(h8300_analyze_register_saves): Remove.
(h8300_analyze_prologue): Rewrite.
(h8300_frame_cache): Use h8300_init_frame_cache instead of
h8300_alloc_frame_cache. Use BINWORD instead of constant 4 to
accomodate 16 bit mode. Fix saved_sp and register offset evaluation.
(h8300_frame_this_id): Correctly calculate this_id using saved stack
pointer instead of base.
(h8300_frame_prev_register): Drop needless braces.
(h8300_frame_base_address): New function.
(h8300_frame_base): New frame_base.
(h8300_push_dummy_call): Return correct CFA value.
(h8300h_extract_return_value): Fix 8 byte value handling.
(h8300_use_struct_convention): New function.
(h8300h_use_struct_convention): New function.
(h8300h_store_return_value): Fix 8 byte value handling.
(h8300_return_value): New function.
(h8300h_return_value): New function.
(h8300_extract_struct_value_address): Remove deprecated functionality.
(h8300_push_dummy_code): Remove.
(h8300_gdbarch_init): Replace set_gdbarch_extract_return_value and
set_gdbarch_store_return_value calls by set_gdbarch_return_value.
Remove calls to set_gdbarch_deprecated_fp_regnum,
set_gdbarch_deprecated_extract_struct_value_address,
set_gdbarch_deprecated_use_struct_convention and
set_gdbarch_push_dummy_code.
Add calls to set_gdbarch_unwind_sp and frame_base_set_default.
Slightly rearrange code.
(<windows.h>): Include under Windows.
(<io.h>): Likeiwse.
(gdb_select): New function.
(gdb_wait_for_event): Use it.
* Makefile.in (event-loop.o): Depend on $(gdb_assert_h).
signal return stub symbol names, __restore and __restore_rt are
the i386 symbol names not the sparc ones.
(sparc32_linux_sigtramp_frame_cache): Document bits/sigcontext.h
as where the offsets were obtained from.
* sparc64-linux-tdep.c (LINUX64_RT_SIGTRAMP_INSN0,
LINUX64_RT_SIGTRAMP_INSN1): New defines.
(sparc64_linux_sigtramp_start, sparc64_linux_sigtramp_p,
sparc64_linux_sigtramp_frame_cache,
sparc64_linux_sigtramp_frame_this_id,
sparc64_linux_sigtramp_frame_prev_register,
sparc64_linux_sigtramp_frame_sniffer): New functions.
(sparc64_linux_sigtramp_frame_unwind): New frame unwinder.
(sparc64_linux_init_abi): Register sigtramp frame sniffer.
* Makefile.in (sparc64-linux-tdep.o): Update dependencies.
"inf-ptrace.h".
(hppabsd_fetch_registers): Renamed from fetch_inferior_registers;
made static.
(hppabsd_store_registers): Renamed from store_inferior_registers;
made static.
(_initialize_hppabsd_nat): New function and prototype.
* config/pa/obsd.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o. Add inf-ptrace.o.
(NAT_FILE): Remove.
* Makefile.in (hppabsd-nat.o): Update dependencies.
and "tramp-frame.h".
(ppcobsd_sigtramp_cache_init): New function.
(ppcobsd_sigtramp): New variable.
(ppcobsd_init_abi): Prepend signal trampoline unwinder.
* Makefile.in (ppcobsd-tdep.o): Update dependencies.
* symtab.c: Include "observer.h".
(find_main_name): New function.
(main_name): If name_of_main is unset, then compute it
using find_main_name.
(symtab_observer_executable_changed): New function.
(_initialize_symtab): Attach executable_changed observer.
* exec.c: Include "observer.h".
(exec_file_attach): Emit executable_changed notification.
* symfile.c: Include "observer.h".
(reread_symbols): Send an executable_changed if appropriate.
* Makefile.in (exec.o): Add dependency on observer.h.
(symfile.o): Likewise.
(symtab.o): Likewise.
PR exp/1821
* cp-valprint.c: Include "language.h".
(cp_print_value_fields): Pass the current language to
fprintf_symbol_filtered.
* Makefile.in (cp-valprint.o): Update dependencies.
testsuite/
From Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>:
PR exp/1821
* gdb.base/gdb1821.c: New test file.
* gdb.base/gdb1821.exp: New test file.
* cli/cli-script.c: Include "exceptions.h".
(struct wrapped_read_command_file_args): Define.
(wrapped_read_command_file): New function.
(script_from_file): Replace direct call to read_command_file by
one wrapped by an exception handler.
* exceptions.c (throw_it): Free the old message after creating the
new.
* Makefile.in: Update dependencies.
Index: testsuite/ChangeLog
2005-01-16 Andrew Cagney <cagney@gnu.org>
* gdb.base/source.exp: Delete KFAIL gdb/1846, simplify.
(_initialize_sparc64fbsd_nat): Add some extra features to the
generic SPARC target.
* Makefile.in (sparc64fbsd-nat.o): Update dependencies.
* config/sparc/fbsd.mh (NATDEPFILES): Add fbsd-nat.o and gcore.o.
(NAT_FILE): Set to solib.h.
* config/sparc/nm-fbsd.h: Remove file.
* Makefile.in (pa64solib_h, somsolib_h): Delete.
(solib_pa64_h, solib_som_h): New.
(HFILES_NO_SRCDIR, ALLDEPFILES): Replace somsolib.h with solib-som.h.
(hppa-hpux-tdep.o, hpread.o): Update dependencies.
(pa64solib.o, somsolib.o): Delete.
(solib-pa64.o, solib-som.o): New.
* hppa-hpux-tdep.c: Include new solib interfaces.
(hppa_hpux_som_init_abi): Attach to SOM solib interface.
(hppa_hpux_elf_init_abi): Attach to PA64 ELF solib interface.
* hppa-tdep.c (internalize_unwinds): If solib_get_text_base method
is available, use it to determine the base of unwind records.
* hppa-tdep.h (gdbarch_tdep): Add new solib methods.
* hpread.c: Replace somsolib.h with solib-som.h.
(hpread_process_one_debug_symbol): Use target vector to get thread
start address.
* config/pa/hppa64.mt (TDEPFILES): Use new solib interface.
* config/pa/hppahpux.mt (TDEPFILES): Likewise.
* config/pa/hpux.mh (NATDEPFILES): Delete references to target objects.
* config/pa/tm-hppah.h: Use new solib interface.
(inf_ttrace_num_lwps): New variable.
(inf_ttrace_num_lwps_in_syscall): Renamed from
inf_ttrace_num_threads_in_syscall.
(inf_ttrace_him): Track TTEVT_LWP_CREATE, TTEVT_LWP_EXIT and
TTEVT_LWP_TERMINATE events.
(inf_ttrace_create_inferior): Assert that INF_TTRACE_NUM_LWPS is
zero.
(inf_ttrace_mourn_inferior): Set INF_TTRACE_NUM_LWPS to zero.
(inf_ttrace_attach): Assert that INF_TTRACE_NUM_LWPS is zero.
Track TTEVT_LWP_CREATE, TTEVT_LWP_EXIT and TTEVT_LWP_TERMINATE
events.
(inf_ttrace_wait): Report status as TARGET_WAITKIND_SPURIOUS by
default. Handle TTEVT_LWP_CREATE, TTEVT_LWP_EXIT and
TTEVT_LWP_TERMINATE events.
(inf_ttrace_thread_alive, inf_ttrace_pid_to_str): New functions.
(inf_ttrace_target): Set to_thread_alive and to_pid_to_str.
* Makefile.in (inf-ttrace.o): Update dependencies.
* inf-ttrace.h: New file.
* hppa-hpux-nat.c [HAVE_TTRACE]: Include <sys/ttrace>.
Include "inf-ttrace.h".
(ss_mpsfu_high): Define to ss_tlsp if necessary.
(hppa_hpux_fetch_register, hppa_hpux_store_register): Use
ptid_get_pid instead of PIDGET. Modify to handle both ttrace and
ptrace systems.
(_initialize_hppa_hpux_nat) [HAVE_TTRACE]: Call inf_ttrace_traget
instead of inf_ptrace_target.
* config/pa/hpux.mh (NATDEPFILES): Add inf-ttrace.o.
* Makefile.in (inf_ttrace_h): New variable.
(hppa-hpux-nat.o): Update dependency.
(inf-ttrace.o): New dependency.
(ALLDEPFILES): Add inf-ptrace.c and inf-ttrace.c.
(record_minimal_symbol, read_ofile_symtab): Replace
DEPRECATED_STREQ and DEPRECATED_STREQN with strcmp and strncmp.
* Makefile.in (dbxread.o): Update dependencies.
* i386-linux-tdep.c (i386_linux_dwarf_signal_frame_p): New.
(i386_linux_init_abi): Call dwarf2_frame_set_signal_frame_p.
* inf-ptrace.c (inf_ptrace_attach): Call
observer_notify_inferior_created.
* inftarg.c (child_attach): Likewise.
* symfile-mem.c: Include "observer.h", "auxv.h", and "elf/common.h".
(symbol_file_add_from_memory): Take NAME argument. Use it for
the new BFD's filename.
(add_symbol_file_from_memory_command): Update call to
symbol_file_add_from_memory.
(struct symbol_file_add_from_memory_args, add_vsyscall_page)
(symbol_file_add_from_memory_wrapper): New.
(_initialize_symfile_mem): Register add_vsyscall_page as an
inferior_created observer.
(mipsnbsd_fetch_inferior_registers): Rename from
fetch_inferior_registers. Make static.
(mipsnbsd_store_inferior_registers): Rename from
store_inferior_registers. Make static.
(_initialize_mipsnbsd_nat): New function and prototype.
* Makefile.in (mipsnbsd-nat.o): Update dependencies.
* config/mips/nbsd.mh (NAT_CLIBS, NAT_FILE): Remove variables.
(NATDEPFILES): Remove infptrace.o and inftarg.o. Add
inf-ptrace.o.
(fill_fpregset): Do not compile for 64-bit systems.
* i386-sol2-nat.c: Don't include "i386v4-nat.c".
* Makefile.in (i386-sol2-nat.o): Update dependencies.
* config/i386/i386sol2.mh (NATDEPFILES): Add back i386v4-nat.c.
(mips_mdebug_frame_cache, mips16_scan_prologue)
(mips32_scan_prologue, mips_stub_frame_cache)
(heuristic_proc_start, heuristic_proc_desc)
(mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
(mips_n32n64_return_value, mips_o32_push_dummy_call)
(mips_o32_return_value, mips_o64_push_dummy_call)
(mips_step_skips_delay, mips_skip_trampoline_code)
(mips_gdbarch_init): Use MIPS_A0_REGNUM instead of A0_REGNUM,
MIPS_RA_REGNUM instead of RA_REGNUM, MIPS_T9_REGNUM instead of
T9_REGNUM, MIPS_V0_REGNUM instead of V0_REGNUM, MIPS_ZERO_REGNUM
instead of ZERO_REGNUM, MIPS32_SIZE_INSN instead of MIPS_INSTLEN
and MIPS16_INSN_SIZE instead of MIPS16_INSTLEN.
(mips_dump_tdep): Don't print A0_REGNUM, RA_REGNUM,
T9_REGNUM, V0_REGNUM, ZERO_REGNUM, MIPS_INSTLEN and
MIPS16_INSTLEN. Use MIPS_A0_REGNUM instead of A0_REGNUM.
* mips-linux-tdep.c (mips_linux_o32_sigframe_init)
(mips_linux_n32n64_sigframe_init): Use MIPS_ZERO_REGNUM instead of
ZERO_REGNUM.
* mipsnbsd-tdep.c (mipsnbsd_cannot_fetch_register)
(mipsnbsd_cannot_store_register): Use MIPS_ZERO_REGNUM instead of
ZERO_REGNUM.
(mipsnbsd_get_longjmp_target): Use MIPS_A0_REGNUM instead of
A0_REGNUM.
* mipsnbsd-nat.c: Include "mips-tdep.h".
(getregs_supplies): Use MIPS_ZERO_REGNUM instead of ZERO_REGNUM.
* Makefile.in (mipsnbsd-nat.o): Update dependencies.
* ada-exp.y, ada-lex.l: Use xmalloc and xrealloc through out.
* inf-ptrace.c: Include "gdb_wait.h" instead of <wait.h>.
* Makefile.in (.y.c, .l.c): Don't replace xmalloc with xxmalloc.
Update dependencies.
(fetch_fpregs): Use i387_supply_fxsave to fill the floating-point
registers when the floating-point state isn't initialized.
* Makefile.in (i386gnu-nat.o): Update dependencies.
* Makefile.in (.l.c): Do conversions of names of alloc and free
functions that are done for .y.c files, plus special one
for yy_flex_realloc. Also, correct missing-file tests here.
* ada-lex.l (malloc, free): Remove macros.
(resize_tempbuf): Use "realloc"; rely on sed changes to convert to
xrealloc.
(ada_flex_use): Dummy definition to remove warnings about unused
functions.
* ada-exp.y (dummy_string_to_ada_operator): Temporary definition
to suppress warning.
(m88kbsd_fetch_inferior_registers): Rename from
fetch_inferior_registers. Make static.
(m88kbsd_store_inferior_registers): Rename from
store_inferior_registers. Make static.
(_initialize_m88kbsd_nat): New prototype and function.
* config/m88k/obsd.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o. Add inf-child.o and inf-ptrace.o.
(NAT_FILE): Remove.
* Makefile.in (m88kbsd-nat.o): Update dependencies.
(amd64bsd_target): New prototype.
* amd64bsd-nat.c: Include "target.h" and "inf-ptrace.h".
(amd64bsd_target): New function.
(amd64bsd_fetch_inferior_registers): Rename from
fetch_inferior_registers. Make static.
(amd64bsd_store_inferior_registers): Rename from
store_inferior_registers. Make static.
* amd64fbsd-nat.c: Include "target.h" and "fbsd-nat.h".
(_initialize_amd64fbsd_nat): Construct and add target vector.
* amd64nbsd-nat.o: Include "target.h".
(_initialize_amd64nbsd_nat): Construct and add target vector.
* amd64obsd-nat.c: Include "target.h".
(_initialize_amd64obsd_nat): Construct and add target vector.
* config/i386/nm-fbsd64.h (CHILD_PID_TO_EXEC_FILE): Remove define.
* config/i386/fbsd64.mh (NATDEPFILES): Remove infptrace.o,
inftarg.o and fbsd-proc.o. Add inf-child.o, inf-ptrace.o and
fbsd-nat.o.
* config/i386/nbsd64.mh, config/i386/obsd64.mh (NATDEPFILES):
Remove infptrace.o and inftarg.o. Add inf-child.o and
inf-ptrace.o.
* Makefile.in (amd64bsd-nat.o, amd64fbsd-nat.o, amd64nbsd-nat.o)
(amd64obsd-nat.o): Update dependencies.
(sparc64nbsd_init_abi): Set in_solib_call_trampoline and
skip_trampoline_code. Set solib_svr4_fetch_link_map_offsets to
svr4_lp64_fetch_link_map_offsets.
* sparc64obsd-tdep.c: Include "objfiles.h". Don't include
"nbsd-tdep.h".
(sparc64obsd_init_abi): Set in_solib_call_trampoline and
skip_trampoline_code. Set solib_svr4_fetch_link_map_offsets to
svr4_lp64_fetch_link_map_offsets.
* Makefile.in (sparc64nbsd-tdep.o, sparc64obsd-tdep.o): Update
dependencies.
* inf-child.c: Include "gdb_string.h".
(inf_child_core_file_to_sym_file): Delete.
(inf_child_target): Set to_fetch_registers and to_store_registers.
* inf-ptrace.c: Include "gdb_string.h".
* Makefile.in: Update all dependencies.
* language.c (hex_string, hex_string_custom): Move from here ...
* utils.c (hex_string, hex_string_custom): ... to here, rewrite.
(CELLSIZE): Increase to 50.
* language.h (hex_string, hex_string_custom): Move from here ...
* defs.h: ... to here.
* Makefile.in: Update all dependencies.
* symfile.c (copy_section_addr_info): New function.
(symbol_file_add_with_addrs_or_offsets): Use it to save the
original set of address arguments, instead of handwritten code
that uses one length to allocate and a different length to
initialize. Use make_cleanup_free_section_addr_info.
* symfile.h (copy_section_addr_info): New declaration.
* utils.c: #include "symfile.h".
(do_free_section_addr_info, make_cleanup_free_section_addr_info):
New functions.
* defs.h (make_cleanup_free_section_addr_info): New declaration.
* Makefile.in (utils.o): Update dependencies.
solib_svr4_fetch_link_map_offsets to
svr4_ilp32_fetch_link_map_offsets.
* sparcobsd-tdep.c: Don't include "nbsd-tdep.h".
(sparc32obsd_init_abi): Set solib_svr4_fetch_link_map_offsets to
svr4_ilp32_fetch_link_map_offsets.
* Makefile.in (sparcobsd-tdep.o): Update dependencies.
* observer.sh: Add struct so_list declaration.
* Makefile.in: Add dependencies on observer.h for solib.c and
breakpoint.c.
* breakpoint.c (disable_breakpoints_in_unloaded_shlib): New
function.
(_initialize_breakpoint): Register
disable_breakpoints_in_unloaded_shlib as an observer of the
"solib unloaded" observation event.
(re_enable_breakpoints_in_shlibs): For bp_shlib_disabled breakpoints,
call decode_line_1 so unfound breakpoint errors are silent.
* solib.c (update_solib_list): When a solib is discovered to have
been unloaded by the program, notify all observers of the
"solib unloaded" observation event.
Reorder includes.
(fetch_register, store_register): Remove prototypes.
(child_resume): Reorganize code and comments such that it is
grouped a bit more logically.
(attach): Explicitly compare errno against 0.
(detach): Likewise. Use perror_with_name instead of
print_sys_errmsg.
* Makefile.in (infptrace.o): Update dependencies.
"gdbcore.h", "regcache.h", and "bsd-kvm.h".
(ppcnbsd_supply_pcb): New function.
(_initialize_ppcnbsd_nat): New prototype and function.
* config/powerpc/nbsd.mh (NATDEPFILES): Add bsd-kvm.o.
(LOADLIBES): New variable.
* Makefile.in (ppcnbsd-nat.o): Update dependencies.
the lower 32-bit halves of the GPRS to be their own raw registers,
not pseudoregisters.
* ppc-tdep.h (struct gdbarch_tdep): Remove ppc_gprs_pseudo_p flag;
add ppc_ev0_upper_regnum flag.
* rs6000-tdep.c: #include "reggroups.h".
(spe_register_p): Recognize the ev upper half registers as SPE
registers.
(init_sim_regno_table): Build gdb->sim mappings for the upper-half
registers.
(e500_move_ev_register): New function.
(e500_pseudo_register_read, e500_pseudo_register_write): The 'ev'
vector registers are the pseudo-registers now, formed by splicing
together the gprs and the upper-half registers.
(e500_register_reggroup_p): New function.
(P): Macro deleted.
(P8, A4): New macro.
(PPC_EV_REGS, PPC_GPRS_PSEUDO_REGS): Macros deleted.
(PPC_SPE_GP_REGS, PPC_SPE_UPPER_GP_REGS, PPC_EV_PSEUDO_REGS): New
macros.
(registers_e500): Rearrange register set so that the raw register
set contains 32-bit GPRs and upper-half registers, and the SPE
vector registers become pseudo-registers.
(rs6000_gdbarch_init): Don't initialize tdep->ppc_gprs_pseudo_p;
it has been deleted. Initialize ppc_ev0_upper_regnum. Many other
register numbers are now the same for the E500 as they are for
other PowerPC variants. Register e500_register_reggroup_p as the
register group function for the E500.
* Makefile.in (rs6000-tdep.o): Update dependencies.
Adapt PPC E500 native support to the new raw regcache layout.
* ppc-linux-nat.c (struct gdb_evrregset_t): Doc fixes.
(read_spliced_spe_reg, write_spliced_spe_reg): Deleted.
(fetch_spe_register, store_spe_register): Handle fetching/storing
all the SPE registers at once, if regno == -1. These now take
over the job of fetch_spe_registers and store_spe_registers.
(fetch_spe_registers, store_spe_registers): Deleted.
(fetch_ppc_registers, store_ppc_registers): Fetch/store gprs
unconditionally; they're always raw. Fetch/store SPE upper half
registers, if present, instead of ev registers.
(fetch_register, store_register): Remove sanity checks: gprs are
never pseudo-registers now, so we never need to even mention any
registers that are ever pseudoregisters.
2004-07-20 Jim Blandy <jimb@redhat.com>
Use a fixed register numbering when communicating with the PowerPC
simulator.
* ppc-tdep.h (struct gdbarch_tdep): New member: 'sim_regno'.
* rs6000-tdep.c: #include "sim-regno.h" and "gdb/sim-ppc.h".
(set_sim_regno, init_sim_regno_table, rs6000_register_sim_regno):
New functions.
(rs6000_gdbarch_init): Register rs6000_register_sim_regno. Call
init_sim_regno_table.
* Makefile.in (gdb_sim_ppc_h): New variable.
(rs6000-tdep.o): Update dependencies.
include/gdb/ChangeLog:
2004-07-20 Jim Blandy <jimb@redhat.com>
* sim-ppc.h: New file.
sim/ppc/ChangeLog:
2004-07-20 Jim Blandy <jimb@redhat.com>
Use a fixed register numbering when communicating with the PowerPC
simulator.
* sim_calls.c: #include "registers.h" and "gdb/sim-ppc.h"; do not
include GDB's "defs.h".
(gdb_register_name_table): New variable.
(gdb_register_name_table_size): New enum constant.
(gdb_register_name): New function.
(sim_fetch_register, sim_store_register): Use gdb_register_name,
instead of calling gdbarch_register_name.
* Makefile.in (GDB_SIM_PPC_H): New variable.
(DEFS_H): Delete variable.
(sim_calls.o): Update dependencies.
<machine/pcb.h> and "bsd-kvm.h".
(PCB_REGS_FP, PCB_REGS_SP): Define if not already defined.
(m68kbsd_supply_pcb): New function.
(_initialize_m68kbsd_nat): New prototype and function.
* Makefile.in (m68kbsd-nat.o): Update dependencies.
* config/m68k/nbsdelf.mh (NATDEPFILES): Add bsd-kvm.o.
(LOADLIBES): New variable.
* config/m68k/obsd.mh (NATDEPFILES): Add bsd-kvm.o.
(LOADLIBES): New variable.
* hppa-tdep.h (struct value): Forward declaration.
(gdbarch_tdep): Define tdep find_global_pointer method.
* hppa-tdep.c (hppa32_push_dummy_call): Find the global pointer
associated with the function we are trying to call, and write it
to the gp register.
(hppa32_convert_from_funct_ptr_addr): New function.
(hppa_find_global_pointer): New function.
(hppa_gdbarch_init): Set default find_global_pointer method; set
convert_from_func_ptr_addr method.
* hppa-linux-tdep.c (hppa_linux_find_global_pointer): New function.
(hppa_linux_init_abi): Set find_global_pointer method.
* Makefile.in (hppa-linux-tdep.o): Add value.h dependency.
"gdb_assert.h". Con't include "gregset.h".
(fbsd_make_corefile_notes): Use regset-based core file support
instead off fill_gregset and fill_fpregset.
* Makefile.in (fbsd-proc.o): Update dependencies.
* symfile.h (symbol_file_add_from_memory): Delete declaration.
* symfile-mem.h: Delete file.
* symfile-mem.c: Do not include "symfile-mem.h".
(symbol_file_add_from_memory): Make static. Use "struct bfd" and
"struct bfd_section". When an error do not bother returning NULL.
(add_symbol_file_from_memory_command): Use "struct bfd" and
"struct bfd_section".
* Makefile.in (symfile_mem_h): Delete.
(symfile-mem.o): Update dependencies.
ppc_fp0_regnum and ppc_fpscr_regnum: if they are -1, then this
processor variant lacks those registers.
(ppc_floating_point_unit_p): Change description to make it clear
that this returns info about the ISA, not the ABI.
* rs6000-tdep.c (ppc_floating_point_unit_p): Decide whether to
return true or false by checking tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum. The original code replicated the BFD
arch/mach switching done in rs6000_gdbarch_init; it's better to
keep that logic there, and just check the results here.
(rs6000_gdbarch_init): On the E500, set tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum to -1 to indicate that we have no
floating-point registers.
(ppc_supply_fpregset, ppc_collect_fpregset)
(rs6000_push_dummy_call, rs6000_extract_return_value)
(rs6000_store_return_value): Assert that we have floating-point
registers.
(rs6000_dwarf2_stab_reg_to_regnum): Add FIXME.
(rs6000_frame_cache): Don't note the locations at which
floating-point registers were saved if we have no fprs.
* aix-thread.c (supply_fprs, fill_fprs): Assert that we have FP
registers.
(fetch_regs_user_thread, fetch_regs_kernel_thread)
(store_regs_user_thread, store_regs_kernel_thread): Only call
supply_fprs / fill_fprs if we actually have floating-point
registers.
(special_register_p): Check ppc_fpscr_regnum before matching
against it.
(supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32): Don't
supply / collect fpscr if we don't have it.
* ppc-bdm.c: #include "gdb_assert.h".
(bdm_ppc_fetch_registers, bdm_ppc_store_registers): Assert that we
have floating-point registers, since I can't test this code on
FP-free systems to adapt it.
* ppc-linux-nat.c (ppc_register_u_addr): Don't match against the
fpscr and floating point register numbers if they don't exist.
(fetch_register): Assert that we have floating-point registers
before we reach the code that handles them.
(store_register): Same. And use tdep instead of calling
gdbarch_tdep again.
(fill_fpregset): Don't try to collect FP registers and fpscr if we
don't have them.
(ppc_linux_sigtramp_cache): Don't record the saved locations of
fprs and fpscr if we don't have them.
(ppc_linux_supply_fpregset): Don't supply fp regs and fpscr if we
don't have them.
* ppcnbsd-nat.c: #include "gdb_assert.h".
(getfpregs_supplies): Assert that we have floating-point registers.
* ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg): Same.
* ppcobsd-tdep.c: #include "gdb_assert.h".
(ppcobsd_supply_gregset, ppcobsd_collect_gregset): Assert that we
have floating-point registers.
* rs6000-nat.c (regmap): Don't match against the fpscr and
floating point register numbers if they don't exist.
(fetch_inferior_registers, store_inferior_registers,
fetch_core_registers): Only fetch / store / supply the
floating-point registers and the fpscr if we have them.
* Makefile.in (ppc-bdm.o, ppc-linux-nat.o, ppcnbsd-nat.o)
(ppcobsd-tdep.o): Update dependencies.
ppc_fp0_regnum and ppc_fpscr_regnum: if they are -1, then this
processor variant lacks those registers.
(ppc_floating_point_unit_p): Change description to make it clear
that this returns info about the ISA, not the ABI.
* rs6000-tdep.c (ppc_floating_point_unit_p): Decide whether to
return true or false by checking tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum. The original code replicated the BFD
arch/mach switching done in rs6000_gdbarch_init; it's better to
keep that logic there, and just check the results here.
(rs6000_gdbarch_init): On the E500, set tdep->ppc_fp0_regnum and
tdep->ppc_fpscr_regnum to -1 to indicate that we have no
floating-point registers.
(ppc_supply_fpregset, ppc_collect_fpregset)
(rs6000_push_dummy_call, rs6000_extract_return_value)
(rs6000_store_return_value): Assert that we have floating-point
registers.
(rs6000_dwarf2_stab_reg_to_regnum): Add FIXME.
(rs6000_frame_cache): Don't note the locations at which
floating-point registers were saved if we have no fprs.
* aix-thread.c (supply_fprs, fill_fprs): Assert that we have FP
registers.
(fetch_regs_user_thread, fetch_regs_kernel_thread)
(store_regs_user_thread, store_regs_kernel_thread): Only call
supply_fprs / fill_fprs if we actually have floating-point
registers.
(special_register_p): Check ppc_fpscr_regnum before matching
against it.
(supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32): Don't
supply / collect fpscr if we don't have it.
* ppc-bdm.c: #include "gdb_assert.h".
(bdm_ppc_fetch_registers, bdm_ppc_store_registers): Assert that we
have floating-point registers, since I can't test this code on
FP-free systems to adapt it.
* ppc-linux-nat.c (ppc_register_u_addr): Don't match against the
fpscr and floating point register numbers if they don't exist.
(fetch_register): Assert that we have floating-point registers
before we reach the code that handles them.
(store_register): Same. And use tdep instead of calling
gdbarch_tdep again.
(fill_fpregset): Don't try to collect FP registers and fpscr if we
don't have them.
(ppc_linux_sigtramp_cache): Don't record the saved locations of
fprs and fpscr if we don't have them.
(ppc_linux_supply_fpregset): Don't supply fp regs and fpscr if we
don't have them.
* ppcnbsd-nat.c: #include "gdb_assert.h".
(getfpregs_supplies): Assert that we have floating-point registers.
* ppcnbsd-tdep.c (ppcnbsd_supply_fpreg, ppcnbsd_fill_fpreg): Same.
* ppcobsd-tdep.c: #include "gdb_assert.h".
(ppcobsd_supply_gregset, ppcobsd_collect_gregset): Assert that we
have floating-point registers.
* rs6000-nat.c (regmap): Don't match against the fpscr and
floating point register numbers if they don't exist.
(fetch_inferior_registers, store_inferior_registers,
fetch_core_registers): Only fetch / store / supply the
floating-point registers and the fpscr if we have them.
* Makefile.in (ppc-bdm.o, ppc-linux-nat.o, ppcnbsd-nat.o)
(ppcobsd-tdep.o): Update dependencies.
include "symtab.h", "opcode/vax.h" and "inferior.h".
(vax_skip_prologue): Replace calls to read_memory_integer by calls
to read_memory_unsigned_integer.
(vax_gdbarch_init): Reorder.
(_initialize_vax_tdep): Spell out prototype.
* Makefile.in (vax-tdep.o): Update dependencies.