]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/s390-tdep.c
gdb: pass frames as `const frame_info_ptr &`
[thirdparty/binutils-gdb.git] / gdb / s390-tdep.c
index 134bf984e5b6d10093bdef7a066abb1aff8c4328..1fd08ddf018ebbf7d33436188ff8a5f05cbb89c0 100644 (file)
@@ -1991,7 +1991,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
    breakpoint.  */
 
 static struct frame_id
-s390_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+s390_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   int word_size = gdbarch_ptr_bit (gdbarch) / 8;
   CORE_ADDR sp = get_frame_register_unsigned (this_frame, S390_SP_REGNUM);
@@ -2175,7 +2175,7 @@ s390_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* Implement unwind_pc gdbarch method.  */
 
 static CORE_ADDR
-s390_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+s390_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
   ULONGEST pc;
@@ -2186,7 +2186,7 @@ s390_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* Implement unwind_sp gdbarch method.  */
 
 static CORE_ADDR
-s390_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+s390_unwind_sp (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   ULONGEST sp;
   sp = frame_unwind_register_unsigned (next_frame, S390_SP_REGNUM);
@@ -2196,7 +2196,7 @@ s390_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* Helper routine to unwind pseudo registers.  */
 
 static struct value *
-s390_unwind_pseudo_register (frame_info_ptr this_frame, int regnum)
+s390_unwind_pseudo_register (const frame_info_ptr &this_frame, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
@@ -2267,7 +2267,7 @@ s390_adjust_frame_regnum (struct gdbarch *gdbarch, int num, int eh_frame_p)
    s390_dwarf2_frame_init_reg.  */
 
 static struct value *
-s390_dwarf2_prev_register (frame_info_ptr this_frame, void **this_cache,
+s390_dwarf2_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                           int regnum)
 {
   return s390_unwind_pseudo_register (this_frame, regnum);
@@ -2278,7 +2278,7 @@ s390_dwarf2_prev_register (frame_info_ptr this_frame, void **this_cache,
 static void
 s390_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
                            struct dwarf2_frame_state_reg *reg,
-                           frame_info_ptr this_frame)
+                           const frame_info_ptr &this_frame)
 {
   /* The condition code (and thus PSW mask) is call-clobbered.  */
   if (regnum == S390_PSWM_REGNUM)
@@ -2312,7 +2312,7 @@ s390_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
    register translation.  */
 
 struct value *
-s390_trad_frame_prev_register (frame_info_ptr this_frame,
+s390_trad_frame_prev_register (const frame_info_ptr &this_frame,
                               trad_frame_saved_reg saved_regs[],
                               int regnum)
 {
@@ -2337,7 +2337,7 @@ struct s390_unwind_cache {
    prologue analysis.  Helper for s390_frame_unwind_cache.  */
 
 static int
-s390_prologue_frame_unwind_cache (frame_info_ptr this_frame,
+s390_prologue_frame_unwind_cache (const frame_info_ptr &this_frame,
                                  struct s390_unwind_cache *info)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2524,7 +2524,7 @@ s390_prologue_frame_unwind_cache (frame_info_ptr this_frame,
    back chain unwinding.  Helper for s390_frame_unwind_cache.  */
 
 static void
-s390_backchain_frame_unwind_cache (frame_info_ptr this_frame,
+s390_backchain_frame_unwind_cache (const frame_info_ptr &this_frame,
                                   struct s390_unwind_cache *info)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2581,7 +2581,7 @@ s390_backchain_frame_unwind_cache (frame_info_ptr this_frame,
    s390_frame_unwind and s390_frame_base.  */
 
 static struct s390_unwind_cache *
-s390_frame_unwind_cache (frame_info_ptr this_frame,
+s390_frame_unwind_cache (const frame_info_ptr &this_frame,
                         void **this_prologue_cache)
 {
   struct s390_unwind_cache *info;
@@ -2615,7 +2615,7 @@ s390_frame_unwind_cache (frame_info_ptr this_frame,
 /* Implement this_id frame_unwind method for s390_frame_unwind.  */
 
 static void
-s390_frame_this_id (frame_info_ptr this_frame,
+s390_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_prologue_cache,
                    struct frame_id *this_id)
 {
@@ -2635,7 +2635,7 @@ s390_frame_this_id (frame_info_ptr this_frame,
 /* Implement prev_register frame_unwind method for s390_frame_unwind.  */
 
 static struct value *
-s390_frame_prev_register (frame_info_ptr this_frame,
+s390_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_prologue_cache, int regnum)
 {
   struct s390_unwind_cache *info
@@ -2670,7 +2670,7 @@ struct s390_stub_unwind_cache
    s390_stub_frame_unwind.  */
 
 static struct s390_stub_unwind_cache *
-s390_stub_frame_unwind_cache (frame_info_ptr this_frame,
+s390_stub_frame_unwind_cache (const frame_info_ptr &this_frame,
                              void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2698,7 +2698,7 @@ s390_stub_frame_unwind_cache (frame_info_ptr this_frame,
 /* Implement this_id frame_unwind method for s390_stub_frame_unwind.  */
 
 static void
-s390_stub_frame_this_id (frame_info_ptr this_frame,
+s390_stub_frame_this_id (const frame_info_ptr &this_frame,
                         void **this_prologue_cache,
                         struct frame_id *this_id)
 {
@@ -2710,7 +2710,7 @@ s390_stub_frame_this_id (frame_info_ptr this_frame,
 /* Implement prev_register frame_unwind method for s390_stub_frame_unwind.  */
 
 static struct value *
-s390_stub_frame_prev_register (frame_info_ptr this_frame,
+s390_stub_frame_prev_register (const frame_info_ptr &this_frame,
                               void **this_prologue_cache, int regnum)
 {
   struct s390_stub_unwind_cache *info
@@ -2722,7 +2722,7 @@ s390_stub_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 s390_stub_frame_sniffer (const struct frame_unwind *self,
-                        frame_info_ptr this_frame,
+                        const frame_info_ptr &this_frame,
                         void **this_prologue_cache)
 {
   CORE_ADDR addr_in_block;
@@ -2753,7 +2753,7 @@ static const struct frame_unwind s390_stub_frame_unwind = {
 /* Frame base handling.  */
 
 static CORE_ADDR
-s390_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+s390_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct s390_unwind_cache *info
     = s390_frame_unwind_cache (this_frame, this_cache);
@@ -2761,7 +2761,7 @@ s390_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 }
 
 static CORE_ADDR
-s390_local_base_address (frame_info_ptr this_frame, void **this_cache)
+s390_local_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct s390_unwind_cache *info
     = s390_frame_unwind_cache (this_frame, this_cache);