aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 344022c..d64f9f7 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -259,6 +259,7 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
if (size > 0)
{
struct gdbarch *gdbarch = objfile->arch ();
+ hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
unsigned long tmp;
unsigned i;
char *buf = (char *) alloca (size);
@@ -270,7 +271,7 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
Note that when loading a shared library (text_offset != 0) the
unwinds are already relative to the text_offset that will be
passed in. */
- if (gdbarch_tdep (gdbarch)->is_elf && text_offset == 0)
+ if (tdep->is_elf && text_offset == 0)
{
low_text_segment_address = -1;
@@ -280,9 +281,9 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
text_offset = low_text_segment_address;
}
- else if (gdbarch_tdep (gdbarch)->solib_get_text_base)
+ else if (tdep->solib_get_text_base)
{
- text_offset = gdbarch_tdep (gdbarch)->solib_get_text_base (objfile);
+ text_offset = tdep->solib_get_text_base (objfile);
}
bfd_get_section_contents (objfile->obfd, section, buf, 0, size);
@@ -730,7 +731,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
/* Global pointer (r19) of the function we are trying to call. */
CORE_ADDR gp;
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
for (write_pass = 0; write_pass < 2; write_pass++)
{
@@ -967,7 +968,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i, offset = 0;
CORE_ADDR gp;
@@ -2253,9 +2254,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
}
{
- struct gdbarch_tdep *tdep;
-
- tdep = gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (tdep->unwind_adjust_stub)
tdep->unwind_adjust_stub (this_frame, cache->base, cache->saved_regs);
@@ -2485,7 +2484,7 @@ hppa_stub_unwind_sniffer (const struct frame_unwind *self,
{
CORE_ADDR pc = get_frame_address_in_block (this_frame);
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (pc == 0
|| (tdep->in_solib_call_trampoline != NULL
@@ -3029,7 +3028,6 @@ hppa_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
static struct gdbarch *
hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
/* find a candidate among the list of pre-declared architectures. */
@@ -3038,7 +3036,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return (arches->gdbarch);
/* If none found, then allocate and initialize one. */
- tdep = XCNEW (struct gdbarch_tdep);
+ hppa_gdbarch_tdep *tdep = new hppa_gdbarch_tdep;
gdbarch = gdbarch_alloc (&info, tdep);
/* Determine from the bfd_arch_info structure if we are dealing with
@@ -3162,7 +3160,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
static void
hppa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
fprintf_unfiltered (file, "bytes_per_address = %d\n",
tdep->bytes_per_address);