GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "gdbcore.h"
#include "osabi.h"
#include "frame.h"
#include "frame-unwind.h"
#include "trad-frame.h"
#include "symtab.h"
#include "objfiles.h"
#include "inferior.h"
#include "infcall.h"
#include "observer.h"
#include "hppa-tdep.h"
#include "solib-som.h"
#include "solib-pa64.h"
#include "regset.h"
#include "regcache.h"
#include "exceptions.h"
#include "gdb_string.h"
Go to the source code of this file.
#define HPPA_HPUX_PA89_SAVE_STATE_SIZE 512 |
Definition at line 61 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_regset_from_core_section().
#define HPPA_HPUX_SAVE_STATE_SIZE 1152 |
Definition at line 57 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_supply_save_state().
#define HPPA_HPUX_SS_FLAGS_OFFSET 0 |
Definition at line 51 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_sigtramp_frame_unwind_cache(), and hppa_hpux_supply_save_state().
#define HPPA_HPUX_SS_FPBLOCK_OFFSET 256 |
Definition at line 53 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_supply_ss_fpblock().
#define HPPA_HPUX_SS_INSYSCALL 0x02 |
Definition at line 1391 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_read_pc(), hppa_hpux_unwind_pc(), and hppa_hpux_write_pc().
#define HPPA_HPUX_SS_NARROW_OFFSET 4 |
Definition at line 52 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_sigtramp_frame_unwind_cache(), and hppa_hpux_supply_ss_narrow().
#define HPPA_HPUX_SS_WIDE_OFFSET 640 |
Definition at line 54 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_sigtramp_frame_unwind_cache(), and hppa_hpux_supply_ss_wide().
#define HPPA_HPUX_SS_WIDEREGS 0x40 |
Definition at line 47 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_sigtramp_frame_unwind_cache(), and hppa_hpux_supply_save_state().
#define INSN | ( | I1, | |
I2, | |||
I3, | |||
I4 | |||
) | 0x ## I1, 0x ## I2, 0x ## I3, 0x ## I4 |
Referenced by hppa_hpux_push_dummy_code().
#define IS_32BIT_TARGET | ( | _gdbarch | ) | ((gdbarch_tdep (_gdbarch))->bytes_per_address == 4) |
Definition at line 41 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_init_abi(), hppa_hpux_push_dummy_code(), and hppa_hpux_sigtramp_frame_unwind_cache().
void _initialize_hppa_hpux_tdep | ( | void | ) |
static CORE_ADDR hppa32_hpux_find_global_pointer | ( | struct gdbarch * | gdbarch, |
struct value * | function | ||
) | [static] |
Definition at line 751 of file hppa-hpux-tdep.c.
References extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_tdep(), gdbarch_tdep::solib_get_got_by_pc, exsummary::status, target_read_memory(), and value_as_address().
Referenced by hppa_hpux_som_init_abi().
static int hppa32_hpux_in_solib_call_trampoline | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 74 of file hppa-hpux-tdep.c.
References _, EXPORT, find_unwind_entry(), gdbarch_byte_order(), hppa_symbol_address(), IMPORT, LONG_BRANCH, lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, PARAMETER_RELOCATION, read_memory_integer(), unwind_table_entry::region_end, unwind_table_entry::stub_type, unwind_table_entry::stub_unwind, SYMBOL_LINKAGE_NAME, and warning().
Referenced by hppa_hpux_init_abi().
static CORE_ADDR hppa32_hpux_search_dummy_call_sequence | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc, | ||
int * | argreg | ||
) | [static] |
Definition at line 838 of file hppa-hpux-tdep.c.
References _, hppa_objfile_private::dummy_call_sequence_addr, hppa_objfile_private::dummy_call_sequence_reg, error(), EXPORT, extract_unsigned_integer(), find_pc_partial_function(), find_pc_section(), find_unwind_entry(), frame_unwind_register_unsigned(), gdbarch_byte_order(), get_current_frame(), hppa_hpux_search_pattern(), hppa_init_objfile_priv_data(), hppa_objfile_priv_data, hppa_symbol_address(), hppa_unwind_info::last, ldsid_pattern, obj_section::objfile, unwind_table_entry::region_end, unwind_table_entry::region_start, unwind_table_entry::stub_type, unwind_table_entry::stub_unwind, hppa_unwind_info::table, target_read_memory(), and hppa_objfile_private::unwind_info.
Referenced by hppa_hpux_push_dummy_code().
static CORE_ADDR hppa64_hpux_find_global_pointer | ( | struct gdbarch * | gdbarch, |
struct value * | function | ||
) | [static] |
Definition at line 776 of file hppa-hpux-tdep.c.
References extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_tdep(), pc_in_section(), gdbarch_tdep::solib_get_got_by_pc, target_read_memory(), and value_as_address().
Referenced by hppa_hpux_elf_init_abi().
static int hppa64_hpux_in_solib_call_trampoline | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 144 of file hppa-hpux-tdep.c.
References gdbarch_byte_order(), lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, bound_minimal_symbol::objfile, read_memory_integer(), and SYMBOL_OBJ_SECTION.
Referenced by hppa_hpux_init_abi().
static CORE_ADDR hppa64_hpux_search_dummy_call_sequence | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc, | ||
int * | argreg | ||
) | [static] |
Definition at line 938 of file hppa-hpux-tdep.c.
References _, ALL_OBJFILE_MSYMBOLS, hppa_objfile_private::dummy_call_sequence_addr, hppa_objfile_private::dummy_call_sequence_reg, error(), extract_unsigned_integer(), find_pc_partial_function(), find_pc_section(), gdbarch_byte_order(), hppa_init_objfile_priv_data(), HPPA_INSN_SIZE, hppa_objfile_priv_data, HPPA_RP_REGNUM, name, obj_section::objfile, offset, SYMBOL_VALUE_ADDRESS, and target_read_memory().
Referenced by hppa_hpux_push_dummy_code().
static enum gdb_osabi hppa_hpux_core_osabi_sniffer | ( | bfd * | abfd | ) | [static] |
Definition at line 1532 of file hppa-hpux-tdep.c.
References GDB_OSABI_HPUX_ELF, GDB_OSABI_HPUX_SOM, GDB_OSABI_UNKNOWN, and size.
static void hppa_hpux_elf_init_abi | ( | struct gdbarch_info | info, |
struct gdbarch * | gdbarch | ||
) | [static] |
Definition at line 1520 of file hppa-hpux-tdep.c.
References gdbarch_tdep::find_global_pointer, gdbarch_tdep(), hppa64_hpux_find_global_pointer(), hppa_hpux_init_abi(), gdbarch_tdep::is_elf, and pa64_solib_select().
static CORE_ADDR hppa_hpux_find_dummy_bpaddr | ( | CORE_ADDR | addr | ) | [static] |
Definition at line 1061 of file hppa-hpux-tdep.c.
References _, ALL_OBJFILE_MSYMBOLS, find_pc_partial_function(), find_pc_section(), find_unwind_entry(), func, obj_section_addr, obj_section::objfile, unwind_table_entry::stub_type, unwind_table_entry::stub_unwind, SYMBOL_VALUE_ADDRESS, and warning().
Referenced by hppa_hpux_push_dummy_code().
static CORE_ADDR hppa_hpux_find_import_stub_for_addr | ( | CORE_ADDR | funcaddr | ) | [static] |
Definition at line 1013 of file hppa-hpux-tdep.c.
References ALL_OBJFILES, find_unwind_entry(), IMPORT, IMPORT_SHLIB, lookup_minimal_symbol_by_pc(), lookup_minimal_symbol_solib_trampoline(), bound_minimal_symbol::minsym, unwind_table_entry::stub_type, unwind_table_entry::stub_unwind, SYMBOL_LINKAGE_NAME, and SYMBOL_VALUE.
Referenced by hppa_hpux_push_dummy_code().
static int hppa_hpux_in_solib_return_trampoline | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc, | ||
const char * | name | ||
) | [static] |
Definition at line 217 of file hppa-hpux-tdep.c.
References _, EXPORT, find_unwind_entry(), gdbarch_byte_order(), IMPORT, LONG_BRANCH, PARAMETER_RELOCATION, read_memory_integer(), unwind_table_entry::region_end, unwind_table_entry::stub_type, unwind_table_entry::stub_unwind, and warning().
Referenced by hppa_hpux_init_abi().
static void hppa_hpux_init_abi | ( | struct gdbarch_info | info, |
struct gdbarch * | gdbarch | ||
) | [static] |
Definition at line 1476 of file hppa-hpux-tdep.c.
References frame_unwind_append_unwinder(), gdbarch_tdep(), hppa32_hpux_in_solib_call_trampoline(), hppa64_hpux_in_solib_call_trampoline(), hppa_hpux_in_solib_return_trampoline(), hppa_hpux_push_dummy_code(), hppa_hpux_read_pc(), hppa_hpux_regset_from_core_section(), hppa_hpux_skip_trampoline_code(), hppa_hpux_unwind_adjust_stub(), hppa_hpux_unwind_pc(), hppa_hpux_write_pc(), hppa_skip_permanent_breakpoint(), gdbarch_tdep::in_solib_call_trampoline, IS_32BIT_TARGET, ON_STACK, set_gdbarch_call_dummy_location(), set_gdbarch_in_solib_return_trampoline(), set_gdbarch_push_dummy_code(), set_gdbarch_read_pc(), set_gdbarch_regset_from_core_section(), set_gdbarch_skip_permanent_breakpoint(), set_gdbarch_skip_trampoline_code(), set_gdbarch_unwind_pc(), set_gdbarch_write_pc(), and gdbarch_tdep::unwind_adjust_stub.
Referenced by hppa_hpux_elf_init_abi(), and hppa_hpux_som_init_abi().
static CORE_ADDR hppa_hpux_push_dummy_code | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | sp, | ||
CORE_ADDR | funcaddr, | ||
struct value ** | args, | ||
int | nargs, | ||
struct type * | value_type, | ||
CORE_ADDR * | real_pc, | ||
CORE_ADDR * | bp_addr, | ||
struct regcache * | regcache | ||
) | [static] |
Definition at line 1112 of file hppa-hpux-tdep.c.
References _, error(), gdbarch_convert_from_func_ptr_addr(), gdbarch_frame_align(), hppa32_hpux_search_dummy_call_sequence(), hppa64_hpux_search_dummy_call_sequence(), hppa_hpux_find_dummy_bpaddr(), hppa_hpux_find_import_stub_for_addr(), hppa_hpux_sr_for_addr(), HPPA_RP_REGNUM, INSN, IS_32BIT_TARGET, regcache_cooked_write_unsigned(), regcache_read_pc(), and write_memory().
Referenced by hppa_hpux_init_abi().
static CORE_ADDR hppa_hpux_read_pc | ( | struct regcache * | regcache | ) | [static] |
Definition at line 1394 of file hppa-hpux-tdep.c.
References flags, HPPA_FLAGS_REGNUM, HPPA_HPUX_SS_INSYSCALL, HPPA_R31_REGNUM, hppa_read_pc(), regcache_cooked_read_unsigned(), and ULONGEST.
Referenced by hppa_hpux_init_abi().
static struct regset* hppa_hpux_regset_from_core_section | ( | struct gdbarch * | gdbarch, |
const char * | sect_name, | ||
size_t | sect_size | ||
) | [static, read] |
Definition at line 1377 of file hppa-hpux-tdep.c.
References HPPA_HPUX_PA89_SAVE_STATE_SIZE, and hppa_hpux_regset.
Referenced by hppa_hpux_init_abi().
static CORE_ADDR hppa_hpux_search_pattern | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | start, | ||
CORE_ADDR | end, | ||
unsigned int * | patterns, | ||
int | count | ||
) | [static] |
Definition at line 803 of file hppa-hpux-tdep.c.
References extract_unsigned_integer(), gdbarch_byte_order(), HPPA_INSN_SIZE, offset, and read_memory().
Referenced by hppa32_hpux_search_dummy_call_sequence().
static struct value* hppa_hpux_sigtramp_frame_prev_register | ( | struct frame_info * | this_frame, |
void ** | this_prologue_cache, | ||
int | regnum | ||
) | [static, read] |
Definition at line 696 of file hppa-hpux-tdep.c.
References hppa_frame_prev_register_helper(), hppa_hpux_sigtramp_frame_unwind_cache(), and hppa_hpux_sigtramp_unwind_cache::saved_regs.
static void hppa_hpux_sigtramp_frame_this_id | ( | struct frame_info * | this_frame, |
void ** | this_prologue_cache, | ||
struct frame_id * | this_id | ||
) | [static] |
Definition at line 685 of file hppa-hpux-tdep.c.
References hppa_hpux_sigtramp_unwind_cache::base, frame_id_build(), get_frame_pc(), and hppa_hpux_sigtramp_frame_unwind_cache().
static struct hppa_hpux_sigtramp_unwind_cache* hppa_hpux_sigtramp_frame_unwind_cache | ( | struct frame_info * | this_frame, |
void ** | this_cache | ||
) | [static, read] |
Definition at line 614 of file hppa-hpux-tdep.c.
References trad_frame_saved_reg::addr, hppa_hpux_sigtramp_unwind_cache::base, gdbarch_tdep::bytes_per_address, FRAME_OBSTACK_ZALLOC, gdbarch_byte_order(), gdbarch_tdep(), get_frame_arch(), get_frame_register_unsigned(), HPPA_HPUX_SS_FLAGS_OFFSET, HPPA_HPUX_SS_NARROW_OFFSET, HPPA_HPUX_SS_WIDE_OFFSET, HPPA_HPUX_SS_WIDEREGS, hppa_hpux_tramp_reg, HPPA_R0_REGNUM, HPPA_SP_REGNUM, IS_32BIT_TARGET, read_memory_unsigned_integer(), hppa_hpux_sigtramp_unwind_cache::saved_regs, sp, and trad_frame_alloc_saved_regs().
Referenced by hppa_hpux_sigtramp_frame_prev_register(), and hppa_hpux_sigtramp_frame_this_id().
static int hppa_hpux_sigtramp_unwind_sniffer | ( | const struct frame_unwind * | self, |
struct frame_info * | this_frame, | ||
void ** | this_cache | ||
) | [static] |
Definition at line 708 of file hppa-hpux-tdep.c.
References gdbarch::byte_order, EXPORT, extract_unsigned_integer(), find_unwind_entry(), gdbarch_byte_order(), get_frame_arch(), get_frame_pc(), unwind_table_entry::HP_UX_interrupt_marker, hppa_extract_17(), HPPA_INSN_SIZE, unwind_table_entry::region_start, safe_frame_unwind_memory(), unwind_table_entry::stub_type, and unwind_table_entry::stub_unwind.
static CORE_ADDR hppa_hpux_skip_trampoline_code | ( | struct frame_info * | frame, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 292 of file hppa-hpux-tdep.c.
References _, ALL_MSYMBOLS, gdbarch::byte_order, EXPORT, find_unwind_entry(), gdbarch_byte_order(), gdbarch_ptr_bit(), get_frame_arch(), get_frame_register_unsigned(), hppa_extract_17(), hppa_extract_21(), HPPA_SP_REGNUM, hppa_symbol_address(), lookup_minimal_symbol(), lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, mst_solib_trampoline, mst_text, MSYMBOL_TYPE, read_memory_integer(), sp, unwind_table_entry::stub_type, unwind_table_entry::stub_unwind, SYMBOL_LINKAGE_NAME, SYMBOL_PRINT_NAME, SYMBOL_VALUE, and warning().
Referenced by hppa_hpux_init_abi().
static void hppa_hpux_som_init_abi | ( | struct gdbarch_info | info, |
struct gdbarch * | gdbarch | ||
) | [static] |
Definition at line 1507 of file hppa-hpux-tdep.c.
References gdbarch_tdep::find_global_pointer, gdbarch_tdep(), hppa32_hpux_find_global_pointer(), hppa_hpux_init_abi(), gdbarch_tdep::is_elf, and som_solib_select().
static int hppa_hpux_sr_for_addr | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | addr | ||
) | [static] |
Definition at line 1052 of file hppa-hpux-tdep.c.
References gdbarch_tdep::bytes_per_address, and gdbarch_tdep().
Referenced by hppa_hpux_push_dummy_code().
static void hppa_hpux_supply_save_state | ( | const struct regset * | regset, |
struct regcache * | regcache, | ||
int | regnum, | ||
const void * | regs, | ||
size_t | len | ||
) | [static] |
Definition at line 1334 of file hppa-hpux-tdep.c.
References _, gdbarch::byte_order, error(), extract_unsigned_integer(), flags, gdbarch_byte_order(), get_regcache_arch(), HPPA_FLAGS_REGNUM, HPPA_HPUX_SAVE_STATE_SIZE, HPPA_HPUX_SS_FLAGS_OFFSET, HPPA_HPUX_SS_WIDEREGS, hppa_hpux_supply_ss_fpblock(), hppa_hpux_supply_ss_narrow(), hppa_hpux_supply_ss_wide(), regcache_raw_supply(), register_size(), size, store_unsigned_integer(), and ULONGEST.
static void hppa_hpux_supply_ss_fpblock | ( | struct regcache * | regcache, |
int | regnum, | ||
const gdb_byte * | save_state | ||
) | [static] |
Definition at line 1280 of file hppa-hpux-tdep.c.
References get_regcache_arch(), HPPA_FP0_REGNUM, HPPA_HPUX_SS_FPBLOCK_OFFSET, offset, regcache_raw_supply(), and register_size().
Referenced by hppa_hpux_supply_save_state().
static void hppa_hpux_supply_ss_narrow | ( | struct regcache * | regcache, |
int | regnum, | ||
const gdb_byte * | save_state | ||
) | [static] |
Definition at line 1264 of file hppa-hpux-tdep.c.
References HPPA_FP0_REGNUM, HPPA_HPUX_SS_NARROW_OFFSET, HPPA_R1_REGNUM, offset, and regcache_raw_supply().
Referenced by hppa_hpux_supply_save_state().
static void hppa_hpux_supply_ss_wide | ( | struct regcache * | regcache, |
int | regnum, | ||
const gdb_byte * | save_state | ||
) | [static] |
Definition at line 1315 of file hppa-hpux-tdep.c.
References get_regcache_arch(), HPPA_FP0_REGNUM, HPPA_HPUX_SS_WIDE_OFFSET, HPPA_R1_REGNUM, offset, regcache_raw_supply(), and register_size().
Referenced by hppa_hpux_supply_save_state().
static void hppa_hpux_unwind_adjust_stub | ( | struct frame_info * | this_frame, |
CORE_ADDR | base, | ||
struct trad_frame_saved_reg * | saved_regs | ||
) | [static] |
Definition at line 1443 of file hppa-hpux-tdep.c.
References gdbarch::byte_order, EXPORT, extract_unsigned_integer(), find_unwind_entry(), gdbarch_byte_order(), gdbarch_ptr_bit(), get_frame_arch(), get_pc_function_start(), HPPA_PCOQ_HEAD_REGNUM, hppa_symbol_address(), read_memory_integer(), register_size(), unwind_table_entry::stub_type, unwind_table_entry::stub_unwind, trad_frame_get_prev_register(), trad_frame_set_value(), ULONGEST, and value_contents_all().
Referenced by hppa_hpux_init_abi().
static CORE_ADDR hppa_hpux_unwind_pc | ( | struct gdbarch * | gdbarch, |
struct frame_info * | next_frame | ||
) | [static] |
Definition at line 1424 of file hppa-hpux-tdep.c.
References flags, frame_unwind_register_unsigned(), HPPA_FLAGS_REGNUM, HPPA_HPUX_SS_INSYSCALL, HPPA_R31_REGNUM, hppa_unwind_pc(), and ULONGEST.
Referenced by hppa_hpux_init_abi().
static void hppa_hpux_write_pc | ( | struct regcache * | regcache, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 1411 of file hppa-hpux-tdep.c.
References flags, HPPA_FLAGS_REGNUM, HPPA_HPUX_SS_INSYSCALL, HPPA_R31_REGNUM, hppa_write_pc(), regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), and ULONGEST.
Referenced by hppa_hpux_init_abi().
static void hppa_skip_permanent_breakpoint | ( | struct regcache * | regcache | ) | [static] |
Definition at line 544 of file hppa-hpux-tdep.c.
References HPPA_PCOQ_HEAD_REGNUM, HPPA_PCOQ_TAIL_REGNUM, HPPA_PCSQ_HEAD_REGNUM, HPPA_PCSQ_TAIL_REGNUM, regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), and ULONGEST.
Referenced by hppa_hpux_init_abi().
Definition at line 1559 of file hppa-hpux-tdep.c.
Referenced by initialize_all_files().
struct regset hppa_hpux_regset [static] |
{ NULL, hppa_hpux_supply_save_state }
Definition at line 1370 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_regset_from_core_section().
struct frame_unwind hppa_hpux_sigtramp_frame_unwind [static] |
{ SIGTRAMP_FRAME, default_frame_unwind_stop_reason, hppa_hpux_sigtramp_frame_this_id, hppa_hpux_sigtramp_frame_prev_register, NULL, hppa_hpux_sigtramp_unwind_sniffer }
Definition at line 741 of file hppa-hpux-tdep.c.
int hppa_hpux_tramp_reg[] [static] |
Definition at line 581 of file hppa-hpux-tdep.c.
Referenced by hppa_hpux_sigtramp_frame_unwind_cache().
unsigned int ldsid_pattern[] [static] |
{ 0x000010a0, 0x00001820, 0xe0000000 }
Definition at line 796 of file hppa-hpux-tdep.c.
Referenced by hppa32_hpux_search_dummy_call_sequence().