Commit Graph

21 Commits

Author SHA1 Message Date
Mark Kettenis a7aad9aa6a * hppa-tdep.h (hppa_frame_prev_register_helper): Change types of
last argument to `gdb_byte *'.
* hppa-tdep.c (hppa32_convert_from_func_ptr_addr): Rewrite.
(hppa_frame_prev_register_helper): Change types of last argument
to `gdb_byte *'.
* hppa-hpux-tdep.c (hppa_hpux_sigtramp_frame_prev_register):
Change types of last argument to `gdb_byte *'.
2005-07-18 20:34:09 +00:00
Mark Kettenis 38ca4e0c24 * hppa-tdep.h (hppa_regnum): Add HPPA_DP_REGNUM, HPPA_RET0_REGNUM,
HPPA_RET1_REGNUM and HPPA64_FP4_REGNUM.
* hppa-tdep.c (hppa64_integral_or_pointer_p)
(hppa64_floating_p) New functions.
(hppa64_push_dummy_call): Re-implement.
(hppa32_register_type): Rename argument reg_nr to regnum.
(hppa64_register_type): Likewise.  Use HPPA64_FP4_REGNUM instead
of HPPA_FP4_REGNUM.
(hppa32_cannot_store_register): Renamed from
hppa_cannot_store_register.
(hppa64_cannot_store_register): New function.
(hppa_gdbarch_init): Set cannot_store_register and
cannot_fetch_register to hppa32_cannot_store_register or
hppa64_cannot_store_register when appropriate.
2004-12-19 21:09:40 +00:00
Randolph Chung 77d18ded6e 2004-12-17 Randolph Chung <tausq@debian.org>
* hppa-hpux-tdep.c (IS_32BIT_TARGET): New.
	(in_opd_section): New.
	(hppa32_hpux_find_global_pointer): Rename from
	hppa_hpux_som_find_global_pointer.
	(hppa64_hpux_find_global_pointer): New.
	(ldsid_pattern): New.
	(hppa_hpux_search_pattern): New.
	(hppa32_hpux_search_dummy_call_sequence): New.
	(hppa64_hpux_search_dummy_call_sequence): New.
	(hppa_hpux_find_import_stub_for_addr): New.
	(hppa_hpux_sr_for_addr): New.
	(hppa_hpux_find_dummy_bpaddr): New.
	(hppa_hpux_init_abi): Use IS_32BIT_TARGET predicate.
	(hppa_hpux_som_init_abi): Set find_global_pointer method to
	hppa32_hpux_find_global_pointer instead of
	hppa_hpux_som_find_global_pointer.
	(hppa_hpux_elf_init_abi): Set find_global_pointer method.
	* hppa-tdep.c (hppa_init_objfile_priv_data): New.
	(read_unwind_info): Use function to initialize objfile-private data.
	(hppa32_push_dummy_call): Don't automatically set the RP if there is
	a push_dummy_code method.
	(hppa64_push_dummy_call): Retrieve and set the global pointer.
	Don't automatically set the RP if there is a push_dummy_code method.
	* hppa-tdep.h (hppa_objfile_private): Add dummy_call_sequence_reg and
	dummy_call_sequence_addr members.
	(hppa_init_objfile_priv_data): New prototype.
2004-12-17 19:09:53 +00:00
Joel Brobecker ff644745cd * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): New function.
* hppa-tdep.h (hppa_lookup_stub_minimal_symbol): Add declaration.
        * solib-som.c (som_solib_create_inferior_hook): Replace stub
        msymbol search by call to hppa_lookup_stub_minimal_symbol. This
        extends the search to all objfiles, not just shared libraries.
        Remove unused variable.
2004-12-17 07:42:48 +00:00
Randolph Chung acf86d5407 2004-12-13 Randolph Chung <tausq@debian.org>
* 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.
2004-12-13 04:06:16 +00:00
Randolph Chung f77a2124d6 2004-12-07 Randolph Chung <tausq@debian.org>
* hppa-tdep.h (gdbarch_tdep): Add unwind_adjust_stub method.
	* hppa-hpux-tdep.c (hppa_hpux_unwind_adjust_stub): New function.
	(hppa_hpux_init_abi) Set unwind_adjust_stub method.
	* hppa-tdep.c (hppa_frame_cache): Call unwind_adjust_stub method
    	if defined.
2004-12-08 01:48:03 +00:00
Mark Kettenis cc72850f95 * hppa-tdep.h (hppa_read_pc, hppa_write_pc, hppa_unwind_pc): New
prototypes.
* hppa-tdep.c (hppa_read_pc): Rename from hppa_target_read_pc.
Make global.  Remove HP-UX specific code.  Use
frame_unwind_register_unsigned instead of
frame_unwind_register_signed.
(hppa_write_pc): Rename from hppa_target_write_pc.  Make global.
Remove HP-UX specific code.
(hppa_unwind_pc): Make global.  Remove HP-UX specific code.
(hppa_frame_prev_register_helper): Set "flags" register to zero
for all unwound frames.
(hppa_gdbarch_init): Adjust.
* hppa-hpux-tdep.c (HPPA_HPUX_SS_INSYSCALL): New define.
(hppa_hpux_read_pc, hppa_hpux_write_pc)
(hppa_hpux_unwind_pc): New functions.
(hppa_hpux_init_abi): Set read_pc, write_pc and unwind_pc.
2004-12-07 18:04:11 +00:00
Andrew Cagney 84674fe179 2004-10-31 Andrew Cagney <cagney@gnu.org>
* hppa-tdep.c (hppa_stub_unwind_sniffer): Replace
	IN_SOLIB_CALL_TRAMPOLINE with tdep.in_solib_call_trampoline.
	* hppa-tdep.h (struct gdbarch_tdep): Add in_solib_call_trampoline.
	* hppa-hpux-tdep.c (hppa_hpux_init_abi): Set same.
	* hppa-linux-tdep.c (hppa_linux_init_abi): Ditto.
2004-10-31 21:09:28 +00:00
Randolph Chung 3388d7ff41 2004-06-06 Randolph Chung <tausq@debian.org>
* hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
	(hppa_hpux_skip_trampoline_code): Don't cache symbol values.
	* hppa-linux-tdep.c (hppa_linux_in_dyncall): Likewise.
	* hppa-tdep.c (hppa_symbol_address): New function definition.
	* hppa-tdep.h (hppa_symbol_address): New function declaration.
2004-06-07 02:17:29 +00:00
Randolph Chung d49771efb5 2004-06-06 Randolph Chung <tausq@debian.org>
* 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.
2004-06-07 02:08:07 +00:00
Mark Kettenis 8d1b517b97 * hppa-tdep.h (hppa_regnum): Add HPPA_R31_REGNUM. 2004-05-30 14:31:29 +00:00
Randolph Chung 69e7b95e2e 2004-05-24 Randolph Chung <tausq@debian.org>
* hppa-tdep.c (SR4EXPORT_LDIL_OFFSET, SR4EXPORT_LDO_OFFSET): Remove
	unused symbols.
	* hppa-tdep.h (HPPA_INSTRUCTION_SIZE): Remove, since there are no more
	references.
2004-05-25 03:55:23 +00:00
Randolph Chung 0d99fdb991 2004-05-15 Randolph Chung <tausq@debian.org>
* hppa-tdep.h (hppa_frame_prev_register_helper): Pass save_regs
	as pointer instead of array reference since HPUX compiler does
	not accept unsized array arguments.
	* somsolib.c (dld_flags_buffer): Use constant array size.
2004-05-16 04:33:41 +00:00
Mark Kettenis c481d1caf4 * hppa-tdep.h (enum hppa_regnum): Name enum, add HPPA_R1_REGNUM. 2004-05-09 20:56:41 +00:00
Mark Kettenis f626a069af * hppa-tdep.h: Update copyright year.
(struct trad_frame_saved_reg): Add opaque declaration.
2004-05-09 20:51:48 +00:00
Randolph Chung 0da28f8a58 2004-05-07 Randolph Chung <tausq@debian.org>
* hppa-tdep.c (hppa_frame_prev_register_helper): New function to
	do common handling of the pcoqt register.
	(hppa_frame_prev_register, hppa_stub_frame_prev_register): Convert
	to use helper function.
	(hppa_frame_unwind_sniffer): Only use if unwind entry is present.
	(hppa_fallback_frame_cache, hppa_fallback_frame_this_id)
	(hppa_fallback_frame_prev_register, hppa_fallback_frame_unwind): New
	generic fallback unwinder when all else fails.
	(hppa_gdbarch_init): Add fallback sniffer.
	* hppa-tdep.h (hppa_frame_prev_register_helper): Prototype.
	* hppa-linux-tdep.c (hppa_linux_sigtramp_frame_prev_register): Convert
	to use helper function.
2004-05-08 03:17:57 +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
Randolph Chung abc485a155 2004-04-22 Randolph Chung <tausq@debian.org>
* hppa-tdep.h (find_unwind_entry, hppa_get_field, hppa_extract_5_load)
	(hppa_extract_5R_store, hppa_extract_5r_store, hppa_extract_17)
	(hppa_extract_21, hppa_extract_14, hppa_low_sign_extend)
	(hppa_sign_extend): Add prototype.
	* hppa-tdep.c (get_field, extract_5_load, extract_5R_store)
	(extract_5r_store, extract_17, extract_21, extract_14, low_sign_extend)
	(sign_extend): Rename with hppa_ prefix and make non-static.  Other
	hppa targets will also use these functions.
	(find_unwind_entry): Remove prototype (moved to hppa-tdep.h).
	(hppa_in_solib_call_trampoline, hppa_in_solib_return_trampoline)
	(hppa_skip_trampoline_code): Move to hppa-hpux-tdep.c
	(hppa_gdbarch_init): Remove gdbarch setting of
	skip_trampoline_code, in_solib_call_trampoline and
	in_solib_return_trampoline.
	* hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
	(hppa64_hpux_in_solib_call_trampoline): New functions, split from
	hppa_in_solib_call_trampoline.
	(hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code):
	Moved from hppa-tdep.c.
 	(hppa_hpux_init_abi): Set gdbarch for skip_trampoline_code,
	in_solib_call_trampoline and in_solib_return_trampoline.
2004-04-23 02:54:21 +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
Joel Brobecker 3ff7cf9eed Further multiarching work mostly for hppa64-*-hpux11:
* hppa-tdep.h: New file.
        * hppa-tdep.c: #include hppa-tdep.c.
        (hppa32_num_regs): Renamed from hppa_num_regs.
        (hppa64_num_regs): New constant.
        (hppa64_call_dummy_breakpoint_offset): New constant.
        (hppa32_call_dummy_length): New constant.
        (hppa64_call_dummy_length): New constant.
        (hppa32_stack_align): Make name 32bit explicit.
        (hppa32_register_virtual_type): Likewise.
        (hppa32_extract_return_value): Likewise.
        (hppa32_use_struct_convention): Likewise.
        (hppa32_store_return_value): Likewise.
        (hppa64_register_virtual_type): New function.
        (hppa64_extract_return_value): New function.
        (hppa64_use_struct_convention): New function.
        (hppa64_store_return_value): New function.
        (hppa_frame_locals_address): Remove declaration, function does
        not exist anymore.
        (hppa_register_byte): Add support for PA64 ABI.
        (hppa_gdbarch_init): Add support for PA64 ABI.
        * hppa-hpux-tdep.c (hppa32_hpux_frame_saved_pc_in_sigtramp):
        Make name 32bit explicit.
        (hppa32_hpux_frame_base_before_sigtramp): Likewise.
        (hppa32_hpux_frame_find_saved_regs_in_sigtramp): Likewise.
        (hppa64_hpux_frame_saved_pc_in_sigtramp): New function.
        (hppa64_hpux_frame_base_before_sigtramp): New function.
        (hppa64_hpux_frame_find_saved_regs_in_sigtramp): New function.
        * config/pa/tm-hppa64.h: Remove macros that are no longer
        necessary now that the gdbarch vector is properly setup.
        Transform some macros into function calls. Some minor cleanup.
        * config/pa/tm-hppah.h: Update function calls in macros
        following the function renaming in hppa-hpux-tdep.c.
        * Makefile.in (hppa_tdep_h): New variable.
        (hppa-tdep.o): Add dependency over hppa_tdep_h.
2003-08-15 23:02:05 +00:00