summaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.h
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2004-04-17 17:19:29 +0000
committerRandolph Chung <tausq@debian.org>2004-04-17 17:19:29 +0000
commit07d15647e431ede17f370416570c24beea88ab38 (patch)
tree3ce0b68b7f4278f905bef3ba7ec5b6173a7fe67a /gdb/hppa-tdep.h
parentef36d80dff23b357be411bc068c119b6231de7b6 (diff)
downloadgdb-07d15647e431ede17f370416570c24beea88ab38.tar.gz
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.
Diffstat (limited to 'gdb/hppa-tdep.h')
-rw-r--r--gdb/hppa-tdep.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h
index 05a4e8965ad..f41af2d957b 100644
--- a/gdb/hppa-tdep.h
+++ b/gdb/hppa-tdep.h
@@ -21,6 +21,8 @@
#ifndef HPPA_TDEP_H
#define HPPA_TDEP_H
+enum { HPPA_INSTRUCTION_SIZE = 4 };
+
/* Target-dependent structure in gdbarch. */
struct gdbarch_tdep
{
@@ -29,4 +31,103 @@ struct gdbarch_tdep
int bytes_per_address;
};
+/*
+ * Unwind table and descriptor.
+ */
+
+struct unwind_table_entry
+ {
+ CORE_ADDR region_start;
+ CORE_ADDR region_end;
+
+ unsigned int Cannot_unwind:1; /* 0 */
+ unsigned int Millicode:1; /* 1 */
+ unsigned int Millicode_save_sr0:1; /* 2 */
+ unsigned int Region_description:2; /* 3..4 */
+ unsigned int reserved1:1; /* 5 */
+ unsigned int Entry_SR:1; /* 6 */
+ unsigned int Entry_FR:4; /* number saved *//* 7..10 */
+ unsigned int Entry_GR:5; /* number saved *//* 11..15 */
+ unsigned int Args_stored:1; /* 16 */
+ unsigned int Variable_Frame:1; /* 17 */
+ unsigned int Separate_Package_Body:1; /* 18 */
+ unsigned int Frame_Extension_Millicode:1; /* 19 */
+ unsigned int Stack_Overflow_Check:1; /* 20 */
+ unsigned int Two_Instruction_SP_Increment:1; /* 21 */
+ unsigned int Ada_Region:1; /* 22 */
+ unsigned int cxx_info:1; /* 23 */
+ unsigned int cxx_try_catch:1; /* 24 */
+ unsigned int sched_entry_seq:1; /* 25 */
+ unsigned int reserved2:1; /* 26 */
+ unsigned int Save_SP:1; /* 27 */
+ unsigned int Save_RP:1; /* 28 */
+ unsigned int Save_MRP_in_frame:1; /* 29 */
+ unsigned int extn_ptr_defined:1; /* 30 */
+ unsigned int Cleanup_defined:1; /* 31 */
+
+ unsigned int MPE_XL_interrupt_marker:1; /* 0 */
+ unsigned int HP_UX_interrupt_marker:1; /* 1 */
+ unsigned int Large_frame:1; /* 2 */
+ unsigned int Pseudo_SP_Set:1; /* 3 */
+ unsigned int reserved4:1; /* 4 */
+ unsigned int Total_frame_size:27; /* 5..31 */
+
+ /* This is *NOT* part of an actual unwind_descriptor in an object
+ file. It is *ONLY* part of the "internalized" descriptors that
+ we create from those in a file.
+ */
+ struct
+ {
+ unsigned int stub_type:4; /* 0..3 */
+ unsigned int padding:28; /* 4..31 */
+ }
+ stub_unwind;
+ };
+
+/* HP linkers also generate unwinds for various linker-generated stubs.
+ GDB reads in the stubs from the $UNWIND_END$ subspace, then
+ "converts" them into normal unwind entries using some of the reserved
+ fields to store the stub type. */
+
+/* The gaps represent linker stubs used in MPE and space for future
+ expansion. */
+enum unwind_stub_types
+ {
+ LONG_BRANCH = 1,
+ PARAMETER_RELOCATION = 2,
+ EXPORT = 10,
+ IMPORT = 11,
+ IMPORT_SHLIB = 12,
+ };
+
+/* We use the objfile->obj_private pointer for two things:
+ * 1. An unwind table;
+ *
+ * 2. A pointer to any associated shared library object.
+ *
+ * #defines are used to help refer to these objects.
+ */
+
+/* Info about the unwind table associated with an object file.
+ * This is hung off of the "objfile->obj_private" pointer, and
+ * is allocated in the objfile's psymbol obstack. This allows
+ * us to have unique unwind info for each executable and shared
+ * library that we are debugging.
+ */
+struct hppa_unwind_info
+ {
+ struct unwind_table_entry *table; /* Pointer to unwind info */
+ struct unwind_table_entry *cache; /* Pointer to last entry we found */
+ int last; /* Index of last entry */
+ };
+
+struct hppa_objfile_private
+ {
+ struct hppa_unwind_info *unwind_info; /* a pointer */
+ struct so_list *so_info; /* a pointer */
+ CORE_ADDR dp;
+ };
+
+extern const struct objfile_data *hppa_objfile_priv_data;
+
#endif /* HPPA_TDEP_H */