Merge from gcc:
[deliverable/binutils-gdb.git] / gdb / hppa-hpux-tdep.c
index e7188e51c30789f0e23a08b5113379a0ce09dbcf..509de352107d22b94f1a26f2f564374f32277c98 100644 (file)
@@ -299,6 +299,7 @@ hppa_hpux_in_solib_return_trampoline (CORE_ADDR pc, char *name)
 static CORE_ADDR
 hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
 {
+  struct gdbarch *gdbarch = get_frame_arch (frame);
   long orig_pc = pc;
   long prev_inst, curr_inst, loc;
   struct minimal_symbol *msym;
@@ -315,13 +316,13 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
          itself.  Bit 31 has meaning too, but only for MPE.  */
       if (pc & 0x2)
        pc = (CORE_ADDR) read_memory_integer
-                          (pc & ~0x3, gdbarch_ptr_bit (current_gdbarch) / 8);
+                          (pc & ~0x3, gdbarch_ptr_bit (gdbarch) / 8);
     }
   if (pc == hppa_symbol_address("$$dyncall_external"))
     {
       pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
       pc = (CORE_ADDR) read_memory_integer
-                        (pc & ~0x3, gdbarch_ptr_bit (current_gdbarch) / 8);
+                        (pc & ~0x3, gdbarch_ptr_bit (gdbarch) / 8);
     }
   else if (pc == hppa_symbol_address("_sr4export"))
     pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22);
@@ -517,7 +518,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
        {
          return (read_memory_integer
                  (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
-                  gdbarch_ptr_bit (current_gdbarch) / 8)) & ~0x3;
+                  gdbarch_ptr_bit (gdbarch) / 8)) & ~0x3;
        }
 
       /* What about be,n 0(sr0,%rp)?  It's just another way we return to
@@ -530,7 +531,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
             mtsp %r1,%sr0 if we want to do sanity checking.  */
          return (read_memory_integer
                  (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24,
-                  gdbarch_ptr_bit (current_gdbarch) / 8)) & ~0x3;
+                  gdbarch_ptr_bit (gdbarch) / 8)) & ~0x3;
        }
 
       /* Haven't found the branch yet, but we're still in the stub.
@@ -1092,7 +1093,7 @@ hppa_hpux_find_dummy_bpaddr (CORE_ADDR addr)
 
 static CORE_ADDR
 hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
-                          CORE_ADDR funcaddr, int using_gcc,
+                          CORE_ADDR funcaddr,
                           struct value **args, int nargs,
                           struct type *value_type,
                           CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
@@ -1422,6 +1423,7 @@ static void
 hppa_hpux_unwind_adjust_stub (struct frame_info *next_frame, CORE_ADDR base,
                              struct trad_frame_saved_reg *saved_regs)
 {
+  struct gdbarch *gdbarch = get_frame_arch (next_frame);
   int optimized, realreg;
   enum lval_type lval;
   CORE_ADDR addr;
@@ -1441,14 +1443,14 @@ hppa_hpux_unwind_adjust_stub (struct frame_info *next_frame, CORE_ADDR base,
   if (u && u->stub_unwind.stub_type == EXPORT)
     {
       stubpc = read_memory_integer
-                (base - 24, gdbarch_ptr_bit (current_gdbarch) / 8);
+                (base - 24, gdbarch_ptr_bit (gdbarch) / 8);
       trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc);
     }
   else if (hppa_symbol_address ("__gcc_plt_call") 
            == get_pc_function_start (val))
     {
       stubpc = read_memory_integer
-                (base - 8, gdbarch_ptr_bit (current_gdbarch) / 8);
+                (base - 8, gdbarch_ptr_bit (gdbarch) / 8);
       trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc);
     }
 }
@@ -1494,7 +1496,7 @@ hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   tdep->find_global_pointer = hppa32_hpux_find_global_pointer;
 
   hppa_hpux_init_abi (info, gdbarch);
-  som_solib_select (tdep);
+  som_solib_select (gdbarch);
 }
 
 static void
@@ -1506,7 +1508,7 @@ hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   tdep->find_global_pointer = hppa64_hpux_find_global_pointer;
 
   hppa_hpux_init_abi (info, gdbarch);
-  pa64_solib_select (tdep);
+  pa64_solib_select (gdbarch);
 }
 
 static enum gdb_osabi
This page took 0.024977 seconds and 4 git commands to generate.