Commit Graph

1080 Commits

Author SHA1 Message Date
Randolph Chung cea96d64fe 2004-05-17 Randolph Chung <tausq@debian.org>
* hppa-tdep.c: Remove superfluous #include's.
	* Makefile.in (hppa-tdep.o): Update dependencies.
2004-05-17 15:16:39 +00:00
Joel Brobecker 0d4d54840d * aix-thread.c: #include "gdb_string.h". Needed for memset and memcopy.
* Makefile.in (aix-thread.o): Add dependency on gdb_string.h.
2004-05-13 22:26:39 +00:00
Andrew Cagney d28b44a731 2004-05-11 Andrew Cagney <cagney@redhat.com>
* ppcnbsd-tdep.c: Include "gdb_assert.h".
	* Makefile.in (ppcnbsd-tdep.o): Update dependencies.
2004-05-11 16:16:29 +00:00
Jim Blandy 383f0f5b9a * ppc-tdep.h (struct gdbarch_tdep): Change definition of
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.
2004-05-11 04:55:32 +00:00
Jim Blandy 7bcda025ec Back out change. The NetBSD changes need Jason Thorpe's approval, but
he hasn't reviewed it yet.
2004-05-10 18:58:44 +00:00
Jim Blandy c4143af614 * ppc-tdep.h (struct gdbarch_tdep): Change definition of
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.
2004-05-10 17:07:02 +00:00
Mark Kettenis 0543f3876c * vax-tdep.c: Tweak comments. Reorder include files. Don't
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.
2004-05-08 22:52:43 +00:00
Mark Kettenis 527ca6bb9e * alphanbsd-tdep.c: Include "gdb_string.h".
* armnbsd-tdep.c: Update copyright year.
Include "gdb_string.h".
* Makefile.in (alphanbsd-tdep.o, armnbsd-tdep.o): Update
dependencies.
2004-05-08 17:33:23 +00:00
Mark Kettenis d39fdc61d8 * delta68-nat.c: Remove file.
* m68k-tdep.c (delta68_in_sigtramp, delta68_frame_args_address)
(delta68_frame_saved_pc, delta68_frame_num_args): Remove functions.
* Makefile.in (ALLDEPFILES): Remove delta68-nat.c.
(delta68-nat.o): Remove dependency.
2004-05-08 16:10:07 +00:00
Randolph Chung 959464ff2c 2004-05-07 Randolph Chung <tausq@debian.org>
* Makefile.in (ALLDEPFILES): Add hppa-linux-tdep.c and
	hppa-linux-nat.c.
	(hppa-linux-tdep.o, hppa-linux-nat.o): Define rules.
	* hppa-linux-nat.c (fetch_register, store_register): Define.
	(fetch_inferior_registers, store_inferior_registers): Define.
	(supply_gregset): Add comment and clean up some unneeded code.
	(fill_gregset): Add comment and fix so that it saves registers in
	the right place in the gregset.
	(fill_fpregset): Fix buffer overrun problem.
	* config/pa/nm-linux.h (FETCH_INFERIOR_REGISTERS): Define.
2004-05-08 03:27:24 +00:00
Andrew Cagney 2b4855ab6b 2004-05-07 Andrew Cagney <cagney@redhat.com>
* observer.c: Include "commands.h" and "gdbcmd.h".
	(observer_debug, _initialize_observer): Add the
	command "set/show debug observer".
	* observer.sh: When observer debugging, log notify calls.
	* Makefile.in (observer.o): Update dependencies.

Index: doc/ChangeLog
2004-05-07  Andrew Cagney  <cagney@redhat.com>

	* observer.texi (GDB Observers): Add "Debugging" section.  Include
	cross reference to "set/show debug observer".
	* gdb.texinfo (Debugging Output): Document "set/show debug
	observer".
2004-05-07 22:51:55 +00:00
Randolph Chung 34f75cc19f 2004-05-06 Randolph Chung <tausq@debian.org>
* config/pa/tm-hppa.h (RO_REGNUM, FLAGS_REGNUM, RP_REGNUM)
	(HPPA_FP_REGNUM, HPPA_SP_REGNUM, SAR_REGNUM, IPSW_REGNUM)
	(PCOQ_HEAD_REGNUM, PCSQ_HEAD_REGNUM, PCOQ_TAIL_REGNUM, PCSQ_TAIL_REGNUM)
	(EIEM_REGNUM, IIR_REGNUM, ISR_REGNUM, IOR_REGNUM, SR4_REGNUM)
	(RCR_REGNUM, PID0_REGNUM, PID1_REGNUM, PID2_REGNUM, PID3_REGNUM)
	(CCR_REGNUM, TR0_REGNUM, CR27_REGNUM, HPPA_FP0_REGNUM, FP4_REGNUM)
	(ARG0_REGNUM, ARG1_REGNUM, ARG2_REGNUM, ARG3_REGNUM): Move *_REGNUM
	definitions ...
	* hppa-tdep.h: ... to here, with HPPA_ prefix.
	* Makefile.in (hppah-nat.o): Add $(hppa_tdep_h)
	* hppa-hpux-tdep.c (hppa32_hpux_frame_find_saved_regs_in_sig)
	(hppa64_hpux_frame_find_saved_regs_in_sig)
	(child_get_current_exception_event): Add HPPA_ prefix to *_REGNUM usage.
	* hppa-linux-nat.c (GR_REGNUM, TR_REGNUM, greg_map): Likewise.
	* hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum)
	(hppa_linux_target_write_pc, hppa_linux_sigtramp_frame_unwind_cache)
	(hppa_linux_sigtramp_frame_prev_register): Likewise.
	* hppa-tdep.c (hppa32_return_value, hppa64_return_value)
	(hppa32_push_dummy_call, hppa64_push_dummy_call, hppa64_frame_align)
	(hppa_target_read_pc, hppa_target_write_pc, hppa_frame_cache)
	(hppa_frame_prev_register, hppa_stub_frame_unwind_cache)
	(hppa_stub_frame_prev_register, hppa_unwind_dummy_id)
	(hppa_skip_permanent_breakpoint, hppa_instruction_nullified)
	(hppa32_register_type, hppa_cannot_store_register)
	(hppa_fetch_pointer_argument, hppa_pseudo_register_read): Likewise.
	* hppah-nat.c (store_inferior_registers, fetch_register): Likewise.
	* hpread.c (hpread_process_one_debug_symbol): Likewise.
	* pa64solib.c (pa64_solib_have_load_event)
	(pa64_solib_have_unload_event, pa64_solib_loaded_library_pathname)
	(pa64_solib_unloaded_library_pathname): Likewise.
	* somsolib.c (som_solib_have_load_event, som_solib_have_unload_event)
	(som_solib_library_pathname): Likewise.
2004-05-07 05:48:50 +00:00
Mark Kettenis 827f338d26 * m68knbsd-nat.c: Remove file.
* m68knbsd-tdep.c: Remove file.
* Makefile.in: (m68knbsd-nat.o, m68knbsd-tdep.o): Remove
dependencies.
* configure.host: Add m68k-*-netbsdelf*.
* configure.tgt (m68k-*-netbsd*): Set gdb_target to nbsd.
* config/m68k/nbsdaout.mh (NATDEPFILES): Add m68kbsd-nat.o,
solib.o and solib-sunos.o.  Remove m68knbsd-nat.o, corelow.o.
(XM_FILE): Remove.
* config/m68k/nbsdelf.mh: New file.
* config/m68k/nbsd.mt: New file.
* config/m68k/nbsdaout.mt: Remove file.
* config/m68k/tm-nbsd.h: Don't include <sys/param.h>,
<machine/vmparam.h> and "m68k/tm-m68k.h".  Include "solib.h".
(BPT_VECTOR, STACK_END_ADDR): Remove defines.
(DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Likewise.
(use_struct_convention): Remove prototype.
(USE_STRUCT_CONVENTION): Remove define.
* config/m68k/xm-nbsd.h: Remove file.
2004-05-04 23:47:15 +00:00
Mark Kettenis 6b57680da0 * sun3-nat.c: Remove file.
* Makefile.in (tm-sun3.h tm-altos.h tm-sun2.h tm-3b1.h): Remove
dependencies.
(ALLDEPFILES): Remove sun3-nat.c.
(sun3-nat.o): Remove dependencies.
2004-05-03 22:12:29 +00:00
Mark Kettenis 299726654e * i386-interix-nat.c, i386-interix-tdep.c,
config/i386/nm-interix.h, config/i386/interix.mh,
config/i386/interix.mt: Remove files.
* Makefile.in (i386-interix-nat.o, i386-interix-tdep.o): Remove
dependencies.
2004-05-03 22:06:15 +00:00
Mark Kettenis f595cb1909 * m68k-tdep.h (struct gdbarch_tdep): Add member
struct_value_regnum.
(m68k_svr4_init_abi): New prototype.
* m68k-tdep.c: Include "floatformat.h".  Add comment about all the
different calling conventions.
(m68k_extract_return_value): Remove code dealing with single-field
structs.
(m68k_store_return_value): Remove code dealing with single-field
structs.  Correctly store return values of 5, 6, 7 or 8 bytes.
(m68k_extract_struct_value_address): Remove function.
(m68k_svr4_extract_return_value,m68k_svr4_store_return_value)
(m68k_reg_struct_return_p, m68k_return_value)
(m68k_svr4_return_value): New functions.
(m68k_use_struct_convention): Remove function.
(m68k_push_dummy_call): Use new struct_value_regnum member of
`struct gdbarch_tdep' instead of hardcoded register number to
store STRUCT_ADDR.
(m68k_svr4_init_abi): New function.
(m68k_gdbarch_init): Don't set extract_return_value,
store_return_values, deprecated_extract_struct_value_address and
use_struct_convention.  Set return_value instead.  Initialize new
struct_value_regnum member of `struct gdbarch_tdep'.
* m68klinux-tdep.c: Update copyright year.
(m68k_linux_extract_return_value, m68k_linux_store_return_value)
(m68k_linux_extract_struct_value_address): Remove function.
(m68k_linux_init_abi): Don't set extract_return_value,
store_return_values, deprecated_extract_struct_value_address and
use_struct_convention.  Call m68k_svr4_init_abi but override the
new struct_value_regnum member of `struct gdbarch_tdep'.
* Makefile.in (m68k-tdep.o): Update dependencies.
2004-05-03 21:56:09 +00:00
Jim Blandy eb4556d736 Move the symbol-file-from-memory functions into their own file.
* symfile-mem.c, symfile-mem.h: New files.
* symfile.c (symbol_file_add_from_bfd): New function.
(symbol_file_add): Call symbol_file_add_from_bfd.
(symbol_file_add_from_memory, add_symbol_file_from_memory_command):
Moved to symfile-mem.c.
(_initialize_symfile): Move definition of
add-symbol-file-from-memory command to symfile-mem.c.
* symfile.h (symbol_file_add_from_bfd): New declaration.
* config/i386/linux.mt (TDEPFILES): Add symfile-mem.o.
* config/powerpc/linux.mt (TDEPFILES): Same.
* Makefile.in (SFILES): Add symfile-mem.c.
(symfile_mem_h): New variable.
(HFILES_NO_SRCDIR): Add symfile-mem.h.
(symfile-mem.o): New rule.
2004-05-02 10:14:02 +00:00
Andrew Cagney ac5eccb7a1 2004-05-01 Andrew Cagney <cagney@redhat.com>
* Makefile.in (m68klinux-tdep.o, m68klinux-nat.o): Fix
	m68klinux-tdep.o's dependencies, were previously added to
	m68klinux-nat.o.
2004-05-01 16:28:11 +00:00
Andrew Cagney 17e20bce79 2004-05-01 Andrew Cagney <cagney@redhat.com>
* Makefile.in (m68klinux-nat.o): Update dependencies.
	* m68klinux-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
	(m68k_linux_sigtramp_frame_cache)
	(m68k_linux_sigtramp_frame_this_id)
	(m68k_linux_sigtramp_frame_prev_register)
	(m68k_linux_sigtramp_frame_unwind)
	(m68k_linux_sigtramp_frame_sniffer)
	(struct m68k_linux_sigtramp_info, m68k_linux_init_abi): Code from
	m68k-tdep.h and m68k-tdep.c, add "linux" to function and variable
	names, use trad-frame.h.
	* m68k-tdep.h (struct gdbarch_tdep): Delete get_sigtramp_info.
	(struct m68k_sigtramp_info): Delete.
	* m68k-tdep.c (m68k_sigtramp_frame_cache)
	(m68k_sigtramp_frame_this_id, m68k_sigtramp_frame_prev_register)
	(m68k_sigtramp_frame_unwind, m68k_sigtramp_frame_sniffer)
	(m68k_gdbarch_init): Delete all the sigtramp code, moved to
	"m68klinux-tdep.c".
2004-05-01 15:10:15 +00:00
Andrew Cagney 9df0bb3fab 2004-05-01 Andrew Cagney <cagney@redhat.com>
* frv-linux-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
	(frv_linux_sigtramp_frame_cache)
	(frv_linux_sigtramp_frame_this_id)
	(frv_linux_sigtramp_frame_prev_register)
	(frv_linux_sigtramp_frame_unwind)
	(frv_linux_sigtramp_frame_sniffer): Copied from frv-tdep.c,
	include "linux" in function and variable names, directly call
	frv_linux_pc_in_sigtramp and frv_linux_sigcontext_reg_addr, use
	the latest trad-frame code.
	(frv_linux_init_abi): Append frv_linux_sigtramp_frame_sniffer, do
	not set frv_sigcontext_reg_addr or deprecated_pc_in_sigtramp
	* Makefile.in (frv-linux-tdep.o): Update dependencies.
	* frv-tdep.h (frv_set_sigcontext_reg_addr): Delete declaration.
	* frv-tdep.c (frv_sigtramp_frame_cache)
	(frv_sigtramp_frame_this_id, frv_sigtramp_frame_prev_register)
	(frv_sigtramp_frame_unwind, frv_sigtramp_frame_sniffer): Moved to
	frv-linux-tdep.c.
	(frv_gdbarch_init): Do not append a sigtramp sniffer.
	(struct gdbarch_tdep): Delete sigcontext_reg_addr.
	(frv_set_sigcontext_reg_addr): Delete function.
2004-05-01 14:00:57 +00:00
Mark Kettenis 8f2d3ea000 Add OpenBSD/m68k support.
* NEWS (New native configurations): Mention OpenBSD/m68k.
* m68kbsd-tdep.c: New file.
* m68kbsd-nat.c: New file.
* Makefile.in (ALLDEPFILES): Add m68kbsd-nat.c and m68kbsd-tdep.c.
(m68kbsd-nat.o, m68kbsd-tdep.o): New dependencies.
* configure.host: Add m68k-*-openbsd.
* configure.tgt: Add m68k-*-openbsd.
* config/m68k/tm-obsd.h: New file.
* config/m68k/obsd.mt: New file.
* config/m68k/obsd.mh: New file.
* config/djgpp/fnchange.lst: Add entries for m68kbsd-nat.c and
m68kbsd-tdep.c.
2004-04-30 23:28:52 +00:00
Orjan Friberg f4c5303c32 2004-04-26 Orjan Friberg <orjanf@axis.com>
* frame.c: Include "observer.h".
	(frame_observer_target_changed): New function.
	(_initialize_frame): Attach target_changed observer.
	* regcache.c: Include "observer.h".
	(regcache_observer_target_changed): New function.
	(_initialize_regcache): Attach target_changed observer.
	* valops.c: Include "observer.h".
	(value_assign): Notify target_changed event when modifying register.
	* Makefile.in (frame.o, regcache.o, valops.o): Add $(observer_h).
2004-04-26 09:49:36 +00:00
Mark Kettenis c79ac407f9 * ppcobsd-nat.c: Include "ppc-tdep.h".
* Makefile.in (ppcobsd-nat.o): Update dependencies.
2004-04-25 14:36:15 +00:00
Michael Chastain 38cc9c28f4 2004-04-24 Michael Chastain <mec.gnu@mindspring.com>
* xmodem.h, xmodem.c: Remove files.
	* Makefile.in: Remove references to xmodem.h, xmodem.c.
2004-04-24 18:44:29 +00:00
Mark Kettenis d195bc9fb0 Add OpenBSD/powerpc support.
* NEWS (New native configurations): Mention OpenBSD/powerpc.
* ppc-tdep.h (struct ppc_reg_offsets): New structure.
(ppc_supply_gregset, ppc_supply_fpregset, ppc_collect_gregset)
(ppc_collect_fpregset): New prototypes.
* ppcobsd-nat.c: New file.
* ppcobsd-tdep.c: New file.
* ppcobsd-tdep.h: New file.
* rs6000-tdep.c: Include "regset.h".
(ppc_supply_reg, ppc_collect_reg, ppc_supply_gregset)
(ppc_supply_fpregset, ppc_collect_gregset, ppc_collect_fpregset):
New functions.
* Makefile.in (ALLDEPFILES): Add pccobsd-nat.c and ppcobsd-tdep.c.
(ppcobsd-nat.o, ppcobsd-tdep.o): New dependencies.
(rs6000-tdep.o): Update dependencies.
* configure.host: Add powerpc-*-openbsd.
* configure.tgt: Add powerpc-*-openbsd.
* config/powerpc/obsd.mh: New file.
* config/powerpc/nm-obsd.h: New file.
* config/powerpc/obsd.mt: New file.
2004-04-22 21:13:06 +00:00
Andrew Cagney b2e31a62ed 2004-04-21 Andrew Cagney <cagney@redhat.com>
* Makefile.in (vaxnbsd-tdep.o): Update dependencies.
	* vaxnbsd-tdep.c: Include "gdb_string.h".
2004-04-21 23:27:02 +00:00
Mark Kettenis b4ead1bd29 * Makefile.in (ALLDEPFILES): List ppc-sysv-tdep.c, ppcnbsd-nat.c
and ppcnbsd-tdep.c instead of ppc-sysv-tdep.o, ppcnbsd-nat.o and
ppcnbsd-tdep.o.
2004-04-18 16:50:29 +00:00
Randolph Chung fdd72f950f 2004-04-17 Randolph Chung <tausq@debian.org>
* Makefile.in (hppa-hpux-tdep.o): Add $(hppa_tdep_h).
	* hppa-hpux-tdep.c (hppa-tdep.h): Include.
 	(hppa_hpux_som_init_abi): Set is_elf to 0.
 	(hppa_hpux_elf_init_abi): Set is_elf to 1.
	* hppa-tdep.c (low_text_segment_address): Remove global.
	(record_text_segment_lowaddr): Pass in low address as parameter. Use
	section offset to calculate segment address.
	(internalize_unwinds): Define low_text_segment_address as local and
	pass to record_text_segment_lowaddr for ELF targets.
	(hppa_gdbarch_init): Zero fill tdep structure.
	(hppa_dump_tdep): Print tdep structure.
	* hppa-tdep.h (gdbarch_tdep): Add is_elf member to tdep structure.
2004-04-17 17:41:10 +00:00
Randolph Chung 7c46b9fb41 2004-04-17 Randolph Chung <tausq@debian.org>
* Makefile.in (hpread.o, pa64solib.o, somsolib.o): Add $(hppa_tdep_h)
	* hppa-tdep.c (hppa_objfile_priv_data): New.
	(SR4EXPORT_LDIL_OFFSET, SR4EXPORT_LDO_OFFSET): Use
	HPPA_INSTRUCTION_SIZE.
	(read_unwind_info): Use objfile_data to reference unwind info.
	(find_unwind_entry): Likewise.
	(hpread_adjust_stack_address): Move to hpread.c.
	(_initialize_hppa_tdep): Register hppa objfile data.
	* hppa-tdep.h (HPPA_INSTRUCTION_SIZE): Define.
	(unwind_table_entry, unwind_stub_types): Move from tm-hppa.h.
	(obj_unwind_info, obj_private_struct): Move from tm-hppa.h, and rename
	with hppa_ prefix.
	* hpread.c (hppa-tdep.h): Include.
	(hpread_adjust_stack_address): Move from hppa-tdep.c.
	(hpread_read_function_type, hpread_read_doc_function_type)
	(hpread_process_one_debug_symbol): Call hpread_adjust_stack_address
	directly. Use objfile_data to access solib data.
	* pa64solib.c (hppa-tdep.h): Include.
	(pa64_solib_add_solib_objfile): Use objfile_data to access solib data.
	* somsolib.c (hppa-tdep.h): Include.
	(som_solib_add_solib_objfile): Use objfile_data to access solib data.
	* config/pa/tm-hppa.h (frame_info, frame_saved_regs, value, type)
	(inferior_status): Remove unused forward declarations.
	(INSTRUCTION_SIZE): Move to hppa-tdep.c.
	(unwind_table_entry, unwind_stub_types, obj_unwind_info)
	(obj_private_struct): Move to hppa-tdep.h.
	(HPREAD_ADJUST_STACK_ADDRESS): Remove.
2004-04-17 17:19:29 +00:00
Daniel Jacobowitz 72bf949259 * dwarf2read.c: Include "hashtab.h".
(struct dwarf2_cu): Add partial_dies, comp_unit_obstack,
	has_namespace_info.
	(struct partial_die_info): Add comments.  Use bitfields to reduce
	memory footprint.  Add scope, scope_set, has_specification,
	spec_offset, die_parent, die_child, and die_sibling.
	(peek_die_abbrev): Add prototype.
	(partial_read_comp_unit_head): New function, broken out from
	dwarf2_build_psymtabs_hard.
	(dwarf2_build_psymtabs_hard): Remove unused variable abbrev_ptr.
	Use partial_read_comp_unit_head.  Initialize the CU and
	comp_unit_obstack.  Update calls to read_partial_die and
	scan_partial_symbols.  Use free_stack_comp_unit and
	load_partial_dies.
	(scan_partial_symbols): Change PDI to a pointer.  Use the child and
	sibling pointers to walk partial DIEs.  Call fixup_partial_die.
	Update calls to helper functions.  Remove NAMESPACE argument.
	Update comments.
	(partial_die_parent_scope, partial_die_full_name): New functions.
	(add_partial_symbol): Remove namespace argument.  Update call to
	pdi_needs_namespace.  Use partial_die_full_name.  Handle
	DW_TAG_namespace.  Check has_namespace_info flag.
	(pdi_needs_namespace): Remove NAMESPACE argument.  Just check the
	tag.  Handle namespaces.
	(add_partial_namespace, add_partial_enumeration): Simplify.
	(guess_structure_name): New function, derived from
	add_partial_structure.
	(add_partial_structure): Remove.
	(determine_class_name): Update comment.
	(dwarf2_read_abbrevs): Set has_namespace_info flag.
	(is_type_tag_for_partial, load_partial_dies): New functions.
	(read_partial_die): Pass abbrev and abbrev_len as arguments.
	Record specifications instead of following them immediately.
	(find_partial_die_in_comp_unit, find_partial_die)
	(fixup_partial_die, free_stack_comp_unit)
	(hashtab_obstack_allocate, dummy_obstack_deallocate)
	(partial_die_hash, partial_die_eq): New functions.
	* Makefile.in (hashtab_h): Define.
	(dwarf2read.o): Update dependencies.
	(observer_inc, observer_h): Move to the correct section.
2004-04-16 15:18:23 +00:00
Mark Kettenis 8b910bab55 * vax-tdep.c: Include "regset.h".
(vax_supply_gregset): New function.
(vax_gregset): New variable.
(vax_regset_from_core_section): New function.
(vax_gdbarch_init): Set regset_from_core_section.
* Makefile.in (vax-tdep.o): Update dependencies.
2004-04-15 15:03:30 +00:00
Andrew Cagney 7a46442073 2004-04-15 Andrew Cagney <cagney@redhat.com>
* observer.c (normal_stop_subject, observer_notify_normal_stop)
	(observer_normal_stop_notification_stub)
	(observer_attach_normal_stop, observer_detach_normal_stop):
	Delete, replaced by #include "observer.inc".
	* infrun.c (normal_stop): Pass "stop_bpstat" to
	observer_notify_normal_stop.
	* Makefile.in (observer_inc): Define.
	(observer.o): Update dependencies.
	(observer.h, observer.inc): New rules.
	* observer.h: Delete file.
	* observer.sh: New file.

Index: doc/ChangeLog
2004-04-08  Andrew Cagney  <cagney@redhat.com>

	* observer.texi (GDB Observers): Rework, provide generic observer
	definitions and then a list of observable events.
2004-04-15 14:29:21 +00:00
Mark Kettenis 9c5519a5d0 * vaxnbsd-tdep.c: New file.
* Makefile.in (vaxnbsd-tdep.o): New dependency.
* configure.tgt: Add vax-*-netbsd* and vax-*-openbsd*.
* config/vax/nbsd.mt: New file.
* config/vax/tm-nbsd.h: New file.
2004-04-14 18:02:44 +00:00
Mark Kettenis 4844a61487 * Makefile.in (vaxbsd-nat.o): New dependency. 2004-04-14 17:52:01 +00:00
Mark Kettenis 7def7fef04 * vax-tdep.c: Include "frame-base.h", "frame-unwind.h" and
"trad-frame.h".
(vax_frame_init_saved_regs): Remove function.
(vax_sigtramp_saved_pc): Remove function.
(vax_frame_saved_pc): Remove function.
(vax_frame_args_address): Remove function.
(vax_frame_num_args): Rewrite.
(vax_frame_chain): Remove function.
(vax_push_dummy_frame): Replace DEPRECATED_FP_REGNUM with
VAX_FP_REGNUM.
(vax_pop_frame): Likewise.
(vax_saved_pc_after_call): Remove function.
(struct vax_frame_cache): New structure.
(vax_frame_cache): New function.
(vax_frame_this_id): New function.
(vax_frame_prev_register): New function.
(vax_frame_unwind): New variable.
(vax_frame_sniffer): New function.
(vax_frame_base_address): New function.
(vax_frame_args_address): New function.
(vax_frame_base): New variable.
(vax_unwind_pc): New function.
(vax_gdbarch_init): Don't set deprecated_init_frame_pc,
deprecated_fp_regnum, deprecated_saved_pc_after_call,
deprecated_frame_chain, deprecated_frame_saved_pc,
deprecated_frame_args_address and
deprecated_frame_init_saved_regs.
* Makefile.in (vax-tdep.o): Update dependencies.
2004-04-12 19:49:48 +00:00
Mark Kettenis d9f8c85b8e * i386-sol2-tdep.c: Include "gdb_string.h".
(i386_sol2_sigtramp_p): Recognize signal trampoline based on its
name.
* Makefile.in (i386-sol2-tdep.o): Update dependencies.
2004-04-09 23:15:53 +00:00
Mark Kettenis 75f501b5c9 * i386-sol2-tdep.c: Include "solib-svr4.h".
(i386_sol2_init_abi): Set solib_svr4_fetch_link_map_offsets.
* Makefile.in (i386-sol2-tdep.o): Update dependencies.
* config/i386/tm-i386sol2.h: Include :solib.h".
* config/i386/i386sol2.mh (NATDEPFILES): Remove solib.o,
solib-svr4.o and solib-legacy.o.
* config/i386/i386sol2.mt (TDEPFILES): Add solib.o and
solib-svr4.o.
2004-04-09 23:09:04 +00:00
Mark Kettenis 911bc6ee3f * amd64-tdep.c (amd64_sigtramp_frame_sniffer): Rewrite to use new
sigtramp_p member of `struct gdbarch_tdep'.  Also check whether
the program counter is in the range specified by `struct
gdbarch_tdep'.
* amd64-linux-tdep.c: Include "symtab.h".
(amd64_linux_pc_in_sigtramp): Remove function.
(amd64_linux_sigtramp_p): New function.
(amd64_linux_init_abi): Initialize TDEP->sigtramp_p.  Don't set
deprecated_pc_in_sigtramp.
* amd64nbsd-tdep.c: Include "symtab.h".
(amd64nbsd_sigtramp_p): New function.
(amd64nbsd_init_abi): Initialize TDEP->sigtramp_p.  Don't set
deprecated_pc_in_sigtramp.
* amd64obsd-tdep.c: Include "symtab.h" and "objfiles.h".  Add a
few comments.
(amd64obsd_pc_in_sigtramp): Remove function.
(amd64obsd_sigtramp_p): New function.
(amd64obsd_init_abi): Initialize TDEP->sigtramp_p.  Don't set
deprecated_pc_in_sigtramp.
* i386-tdep.h (struct gdbarch_tdep): Add sigtramp_p member.
(i386bsd_pc_ins_sigtramp): Remove prototype.
(i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove prototypes.
* i386-tdep.c (i386_sigtramp_frame_sniffer): Rewrite to use new
sigtramp_p member of `struct gdbarch_tdep'.  Also check whether
the program counter is in the range specified by `struct
gdbarch_tdep'.
(i386_pc_in_sigtramp, i386_svr4_pc_in_sigtramp): Remove functions.
(i386_sigtramp_p, i386_svr4_sigtramp_p): New functions.
(i386_go32_pc_in_sigtramp): Remove function.
(i386_svr4_init_abi): Don't set deprecated_pc_in_sigtramp.
Initialize TDEP->sigtramp_p.
(i386_go32_init_abi): Initialize TDEP->sigtramp_p to NULL.
(i386_gdbarch_init): Initialize TDEP->sigtramp_p.  Don't set
deprecated_pc_in_sigtramp.
* i386-linux-tdep.c: Adjust comments.
(i386_linux_pc_in_sigtramp): Remove function.
(i386_linux_sigtramp_p): New function.
(i386_linux_init_abi): Initialize TDEP->sigtramp_p.  Don't set
deprecated_pc_in_sigtramp.
* i386-nto-tdep.c: Update copyright year.
(i386nto_pc_in_sigtramp): Remove function.
(i386nto_sigtramp_p): New function.
(i386nto_sigcontext_addr): Use I386_ESP_REGNUM instead of
SP_REGNUM.
(i386nto_init_abi): Initialize TDEP->sigtramp_p.  Don't set
deprecated_pc_in_sigtramp.
* i386-sol2-tdep.c: Update copyright year.
(i386_sol2_pc_in_sigtramp): Remove function.
(i386_sol2_sigtramp_p): New function.
(i386_sol2_init_abi): Initialize TDEP->sigtramp_p.  Don't set
deprecated_pc_in_sigtramp.
* i386bsd-tdep.c (i386bsd_pc_in_sigtramp): Remove function.
(i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove functions.
(i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp,
deprecated_sigtramp_start and deprecated_sigtramp_end.
* i386nbsd-tdep.c: Include "frame.h" and "symtab.h".
(i386nbsd_pc_in_sigtramp): Remove function.
(i386nbsd_sigtramp_p): New function.
(i386nbsd_init_abi): Don't set deprecated_pc_in_sigtramp,
deprecated_sigtramp_start, deprecated_sigtramp_end.  Initialize
TDEP->sigtramp_start, TDEP->sigtramp_end and TDEP->sigtramp_p.
* i386obsd-tdep.c: Include "frame.h", "symtab.h" and "objfiles.h".
(i386obsd_pc_in_sigtramp): Remove function.
(i386obsd_sigtramp_p): New function.
(i386obsd_sigtramp_start, i386obsd_sigtramp_end): Remove
functions.
(i386bsd_init_abi): Don't set deprecated_pc_in_sigtramp,
deprecated_sigtramp_start, deprecated_sigtramp_end.  Initialize
TDEP->sigtramp_p.
* Makefile.in (amd64-linux-tdep.o, amd64nbsd-tdep.o,
amd64obsd-tdep.o, i386nbsd-tdep.o, i386obsd-tdep.o): Update
dependencies.
2004-04-09 16:28:50 +00:00
Mark Kettenis 70b216c813 * sparc-sol2-tdep.c: Update copyright year. Include
"solib-svr4.h".
(sparc32_sol2_init_abi): Set solib_svr4_fetch_link_map_offsets.
* sparc64-sol2-tdep.c: Include "solib-svr4.h".
(sparc64_sol2_init_abi): Set solib_svr4_fetch_link_map_offsets.
* Makefile.in (sparc-sol2-tdep.o, sparc64-sol2-tdep.o): ): Update
dependencies.
2004-04-07 00:04:29 +00:00
Andrew Cagney 6339dc9ee1 2004-04-06 Andrew Cagney <cagney@redhat.com>
* infttrace.c: Include "infttrace.h".
	* infttrace.h: Include "target.h".
	* Makefile.in (infttrace_h): Update.
	(infttrace.o): Update.
2004-04-06 18:29:10 +00:00
Andrew Cagney 6d5189699c 2004-04-06 Andrew Cagney <cagney@redhat.com>
* hppah-nat.c (hpux_has_forked, hpux_has_vforked)
	(hpux_has_execd, hpux_has_syscall_event): Include "infttrace.h",
	move extern declarations from here ...
	* infttrace.h: ... to here.
	* Makefile.in (hppah-nat.o): Update dependencies.
2004-04-06 17:56:01 +00:00
Daniel Jacobowitz a2f23071c9 * Makefile.in (linux_nat_h): Update dependencies.
* configure.in: Check for <gnu/libc-version.h>.
	* configure: Regenerate.
	* config.in: Regenerate.
	* linux-nat.h: Include "target.h".  Add waitstatus field to
	struct lwp_info.
	* lin-lwp.c (add_lwp): Initialize waitstatus.kind.
	(lin_lwp_attach_lwp): Don't attach to LWPs we have already attached
	to.
	(lin_lwp_handle_extended): New function.  Handle clone events.
	(wait_lwp): Use lin_lwp_handle_extended.  Update comment about
	thread exit events.
	(child_wait): Handle clone events.
	(lin_lwp_wait: Use lin_lwp_handle_extended and handle clone events.
	* linux-nat.c (linux_enable_event_reporting): Turn on
	PTRACE_O_TRACECLONE.
	(linux_handle_extended_wait): Handle clone events.
	* thread-db.c: Include <gnu/libc-version.h>.
	(struct private_thread_info): Add dying flag.
	(enable_thread_event_reporting): Enable TD_DEATH for glibc 2.2 and
	higher.
	(attach_thread): Update comments.  Handle dying threads.
	(detach_thread): Set the dying flag.
	(check_event): Always call attach_thread.
2004-03-29 18:07:14 +00:00
Daniel Jacobowitz 5792a79bd1 * Makefile.in (mips-linux-tdep.o): Update dependencies.
* mips-tdep.c (mips_gdbarch_init): Move frame predicates
	to after osabi initialization.
	* mips-linux-tdep.c: Include "trad-frame.h" and "tramp-frame.h".
	(mips_linux_o32_sigframe_init, mips_linux_n32n64_sigframe_init): New
	functions.
	(mips_linux_o32_sigframe, mips_linux_o32_rt_sigframe)
	(mips_linux_n32_rt_sigframe, mips_linux_n64_rt_sigframe): New
	variables.
	(mips_linux_init_abi): Append signal trampoline unwinders.
2004-03-25 01:27:26 +00:00
Andrew Cagney d2259dd367 2004-03-23 Andrew Cagney <cagney@redhat.com>
* tramp-frame.h, tramp-frame.h: New files.
	* Makefile.in (SFILES, tramp_frame_h, COMMON_OBS, tramp-frame.o):
	Update rules to include "tramp-frame.h" and "tramp-frame.c".
2004-03-23 14:12:30 +00:00
Andrew Cagney 8050c72f30 2004-03-23 Andrew Cagney <cagney@redhat.com>
* Makefile.in: Update all dependencies.
2004-03-23 13:58:03 +00:00
Andrew Cagney 0db9b4b709 2004-03-23 Andrew Cagney <cagney@redhat.com>
* Makefile.in (trad_frame_h): Add $(frame_h).
	* trad-frame.h: Update copyright.  Include "frame.h".
	(struct trad_frame_cache, trad_frame_cache_zalloc): Declare.
	(trad_frame_set_id, trad_frame_get_id): Declare.
	(trad_frame_set_reg_addr, trad_frame_get_register): Declare.
	* trad-frame.c: Update copyright.
	(struct trad_frame_cache): Define.
	(trad_frame_cache_zalloc): New function.
	(trad_frame_set_id, trad_frame_get_id): New functions.
	(trad_frame_set_reg_addr, trad_frame_get_register): New functions.
2004-03-23 13:49:50 +00:00
Nathan J. Williams 1777c7b4ae 2004-03-21 Nathan J. Williams <nathanw@wasabisystems.com>
* mipsnbsd-tdep.c: Update copyright. Include "mips-tdep.h".
        * Makefile.in (mipsnbsd-tdep.o): Update dependencies.
2004-03-21 22:34:12 +00:00
Andrew Cagney 0cad6aec70 2004-03-18 Andrew Cagney <cagney@redhat.com>
* frame-base.c: Update copyright.  Include "gdb_obstack.h".
	(struct frame_base_table_entry): Define.
	(struct frame_base_table): Re-implement as a linked list.
	(frame_base_init): Re-implement.
	(frame_base_table): Delete function.
	(append_predicate): Delete function.
	(frame_base_append_sniffer): Update.
	(frame_base_set_default): Update.
	(frame_base_find_by_frame): Update.
	(_initialize_frame_base): Use gdbarch_data_register_pre_init.
	* Makefile.in (frame-base.o): Update dependencies.
2004-03-18 16:22:00 +00:00
Andrew Cagney 41fe5eb389 2004-03-15 Andrew Cagney <cagney@redhat.com>
* Makefile.in (frame-unwind.o): Update dependencies.
	* frame-unwind.c: Include "gdb_obstack.h".
	(frame_unwind_init): Replace "gdbarch" parameter with an "obstack"
	parameter.
	(append_predicate): Delete function.
	(struct frame_unwind_table_entry): New structure.
	(struct frame_unwind_table): Replace "sniffer" with "head" and
	"tail".
	(frame_unwind_append_sniffer): Update.
	(frame_unwind_find_by_frame): Update.
	(_initialize_frame_unwind): Registe frame_unwind_init using
	gdbarch_data_register_pre_init.
2004-03-15 23:08:28 +00:00
Kevin Buettner 5ecb7103b5 * Makefile.in (frv-linux-tdep.o): Add dependencies.
* frv-linux-tdep.c: New file.
	* frv-tdep.c (struct gdbarch_tdep): Add new field
	``sigcontext_reg_addr''.
	(frv_set_sigcontext_reg_addr, frv_sigtramp,frame_cache)
	(frv_sigtramp_frame_this_id, frv_sigtramp_frame_prev_register)
	(frv_sigramp_frame_sniffer): New functions.
	(frv_sigtramp_frame_unwind): New static global.
	(frv_gdbarch_init): Hook in ABI-specific overrides.  Hook up frame
	sniffers.
	* frv-tdep.h (frv_set_sigcontext_reg_addr): New function.
	* config/frv/frv.mt (TDEPFILES): Add frv-linux-tdep.o.
2004-03-15 19:42:25 +00:00