]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/nios2-tdep.c
gdb: pass frames as `const frame_info_ptr &`
[thirdparty/binutils-gdb.git] / gdb / nios2-tdep.c
index 196f50bc8694271000a3a2b3b87b85521ced60d4..0a8eeb88bb5af48728461d11f653bf998f8b8c7d 100644 (file)
@@ -1189,7 +1189,7 @@ static CORE_ADDR
 nios2_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc,
                        const CORE_ADDR current_pc,
                        struct nios2_unwind_cache *cache,
-                       frame_info_ptr this_frame)
+                       const frame_info_ptr &this_frame)
 {
   /* Maximum number of possibly-prologue instructions to check.
      Note that this number should not be too large, else we can
@@ -1880,7 +1880,7 @@ nios2_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
 /* Implement the unwind_pc gdbarch method.  */
 
 static CORE_ADDR
-nios2_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+nios2_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_byte buf[4];
 
@@ -1893,7 +1893,7 @@ nios2_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
    *THIS_PROLOGUE_CACHE first.  */
 
 static struct nios2_unwind_cache *
-nios2_frame_unwind_cache (frame_info_ptr this_frame,
+nios2_frame_unwind_cache (const frame_info_ptr &this_frame,
                          void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1920,7 +1920,7 @@ nios2_frame_unwind_cache (frame_info_ptr this_frame,
 /* Implement the this_id function for the normal unwinder.  */
 
 static void
-nios2_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+nios2_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                     struct frame_id *this_id)
 {
   struct nios2_unwind_cache *cache =
@@ -1936,7 +1936,7 @@ nios2_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 /* Implement the prev_register function for the normal unwinder.  */
 
 static struct value *
-nios2_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+nios2_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                           int regnum)
 {
   struct nios2_unwind_cache *cache =
@@ -1966,7 +1966,7 @@ nios2_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
    for the normal unwinder.  */
 
 static CORE_ADDR
-nios2_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+nios2_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct nios2_unwind_cache *info
     = nios2_frame_unwind_cache (this_frame, this_cache);
@@ -2000,7 +2000,7 @@ static const struct frame_base nios2_frame_base =
    in the stub unwinder.  */
 
 static struct trad_frame_cache *
-nios2_stub_frame_cache (frame_info_ptr this_frame, void **this_cache)
+nios2_stub_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   CORE_ADDR pc;
   CORE_ADDR start_addr;
@@ -2033,7 +2033,7 @@ nios2_stub_frame_cache (frame_info_ptr this_frame, void **this_cache)
 /* Implement the this_id function for the stub unwinder.  */
 
 static void
-nios2_stub_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+nios2_stub_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                          struct frame_id *this_id)
 {
   struct trad_frame_cache *this_trad_cache
@@ -2045,7 +2045,7 @@ nios2_stub_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 /* Implement the prev_register function for the stub unwinder.  */
 
 static struct value *
-nios2_stub_frame_prev_register (frame_info_ptr this_frame,
+nios2_stub_frame_prev_register (const frame_info_ptr &this_frame,
                                void **this_cache, int regnum)
 {
   struct trad_frame_cache *this_trad_cache
@@ -2061,7 +2061,7 @@ nios2_stub_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 nios2_stub_frame_sniffer (const struct frame_unwind *self,
-                         frame_info_ptr this_frame, void **cache)
+                         const frame_info_ptr &this_frame, void **cache)
 {
   gdb_byte dummy[4];
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
@@ -2218,7 +2218,7 @@ nios2_software_single_step (struct regcache *regcache)
 /* Implement the get_longjump_target gdbarch method.  */
 
 static int
-nios2_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+nios2_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch);