]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: pass frames as `const frame_info_ptr &`
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 19 Feb 2024 18:07:47 +0000 (13:07 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 20 Feb 2024 15:42:25 +0000 (10:42 -0500)
We currently pass frames to function by value, as `frame_info_ptr`.
This is somewhat expensive:

 - the size of `frame_info_ptr` is 64 bytes, which is a bit big to pass
   by value
 - the constructors and destructor link/unlink the object in the global
   `frame_info_ptr::frame_list` list.  This is an `intrusive_list`, so
   it's not so bad: it's just assigning a few points, there's no memory
   allocation as if it was `std::list`, but still it's useless to do
   that over and over.

As suggested by Tom Tromey, change many function signatures to accept
`const frame_info_ptr &` instead of `frame_info_ptr`.

Some functions reassign their `frame_info_ptr` parameter, like:

  void
  the_func (frame_info_ptr frame)
  {
    for (; frame != nullptr; frame = get_prev_frame (frame))
      {
        ...
      }
  }

I wondered what to do about them, do I leave them as-is or change them
(and need to introduce a separate local variable that can be
re-assigned).  I opted for the later for consistency.  It might not be
clear why some functions take `const frame_info_ptr &` while others take
`frame_info_ptr`.  Also, if a function took a `frame_info_ptr` because
it did re-assign its parameter, I doubt that we would think to change it
to `const frame_info_ptr &` should the implementation change such that
it doesn't need to take `frame_info_ptr` anymore.  It seems better to
have a simple rule and apply it everywhere.

Change-Id: I59d10addef687d157f82ccf4d54f5dde9a963fd0
Approved-By: Andrew Burgess <aburgess@redhat.com>
224 files changed:
gdb/aarch64-fbsd-tdep.c
gdb/aarch64-linux-tdep.c
gdb/aarch64-tdep.c
gdb/ada-lang.c
gdb/ada-lang.h
gdb/alpha-linux-tdep.c
gdb/alpha-mdebug-tdep.c
gdb/alpha-netbsd-tdep.c
gdb/alpha-obsd-tdep.c
gdb/alpha-tdep.c
gdb/alpha-tdep.h
gdb/amd64-darwin-tdep.c
gdb/amd64-fbsd-tdep.c
gdb/amd64-linux-tdep.c
gdb/amd64-netbsd-tdep.c
gdb/amd64-obsd-tdep.c
gdb/amd64-sol2-tdep.c
gdb/amd64-tdep.c
gdb/amd64-windows-tdep.c
gdb/amdgpu-tdep.c
gdb/arc-linux-tdep.c
gdb/arc-tdep.c
gdb/arc-tdep.h
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-fbsd-tdep.c
gdb/arm-linux-tdep.c
gdb/arm-obsd-tdep.c
gdb/arm-tdep.c
gdb/arm-tdep.h
gdb/arm-wince-tdep.c
gdb/avr-tdep.c
gdb/bfin-linux-tdep.c
gdb/bfin-tdep.c
gdb/blockframe.c
gdb/bpf-tdep.c
gdb/cp-abi.c
gdb/cp-abi.h
gdb/cris-tdep.c
gdb/csky-linux-tdep.c
gdb/csky-tdep.c
gdb/dtrace-probe.c
gdb/dummy-frame.c
gdb/dummy-frame.h
gdb/dwarf2/ada-imported.c
gdb/dwarf2/call-site.h
gdb/dwarf2/expr.c
gdb/dwarf2/expr.h
gdb/dwarf2/frame-tailcall.c
gdb/dwarf2/frame-tailcall.h
gdb/dwarf2/frame.c
gdb/dwarf2/frame.h
gdb/dwarf2/loc.c
gdb/dwarf2/loc.h
gdb/extension-priv.h
gdb/extension.c
gdb/extension.h
gdb/findvar.c
gdb/frame-base.c
gdb/frame-base.h
gdb/frame-unwind.c
gdb/frame-unwind.h
gdb/frame.c
gdb/frame.h
gdb/frv-linux-tdep.c
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/gdbarch-gen.h
gdb/gdbarch.c
gdb/gdbarch_components.py
gdb/gnu-v3-abi.c
gdb/h8300-tdep.c
gdb/hppa-bsd-tdep.c
gdb/hppa-linux-tdep.c
gdb/hppa-netbsd-tdep.c
gdb/hppa-tdep.c
gdb/hppa-tdep.h
gdb/i386-bsd-tdep.c
gdb/i386-darwin-tdep.c
gdb/i386-darwin-tdep.h
gdb/i386-fbsd-tdep.c
gdb/i386-gnu-tdep.c
gdb/i386-linux-tdep.c
gdb/i386-netbsd-tdep.c
gdb/i386-nto-tdep.c
gdb/i386-obsd-tdep.c
gdb/i386-sol2-tdep.c
gdb/i386-tdep.c
gdb/i386-tdep.h
gdb/i386-windows-tdep.c
gdb/i387-tdep.c
gdb/i387-tdep.h
gdb/ia64-libunwind-tdep.c
gdb/ia64-libunwind-tdep.h
gdb/ia64-tdep.c
gdb/ia64-tdep.h
gdb/infcmd.c
gdb/inferior.h
gdb/infrun.c
gdb/infrun.h
gdb/inline-frame.c
gdb/inline-frame.h
gdb/iq2000-tdep.c
gdb/jit.c
gdb/language.h
gdb/lm32-tdep.c
gdb/loongarch-linux-tdep.c
gdb/loongarch-tdep.c
gdb/loongarch-tdep.h
gdb/m32c-tdep.c
gdb/m32r-linux-tdep.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-linux-tdep.c
gdb/m68k-tdep.c
gdb/mep-tdep.c
gdb/mi/mi-cmd-stack.c
gdb/mi/mi-main.c
gdb/microblaze-linux-tdep.c
gdb/microblaze-tdep.c
gdb/minsyms.c
gdb/mips-fbsd-tdep.c
gdb/mips-linux-tdep.c
gdb/mips-netbsd-tdep.c
gdb/mips-sde-tdep.c
gdb/mips-tdep.c
gdb/mips-tdep.h
gdb/mips64-obsd-tdep.c
gdb/mn10300-linux-tdep.c
gdb/mn10300-tdep.c
gdb/moxie-tdep.c
gdb/msp430-tdep.c
gdb/nds32-tdep.c
gdb/nios2-linux-tdep.c
gdb/nios2-tdep.c
gdb/nios2-tdep.h
gdb/observable.h
gdb/or1k-linux-tdep.c
gdb/or1k-tdep.c
gdb/ppc-fbsd-tdep.c
gdb/ppc-linux-tdep.c
gdb/ppc-netbsd-tdep.c
gdb/ppc-obsd-tdep.c
gdb/ppc-sysv-tdep.c
gdb/ppc-tdep.h
gdb/ppc64-tdep.c
gdb/ppc64-tdep.h
gdb/printcmd.c
gdb/probe.c
gdb/probe.h
gdb/python/py-event.h
gdb/python/py-frame.c
gdb/python/py-framefilter.c
gdb/python/py-inferior.c
gdb/python/py-infevents.c
gdb/python/py-unwind.c
gdb/python/python-internal.h
gdb/record-btrace.c
gdb/riscv-fbsd-tdep.c
gdb/riscv-linux-tdep.c
gdb/riscv-tdep.c
gdb/riscv-tdep.h
gdb/rl78-tdep.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-tdep.c
gdb/rx-tdep.c
gdb/s12z-tdep.c
gdb/s390-linux-tdep.c
gdb/s390-tdep.c
gdb/s390-tdep.h
gdb/sentinel-frame.c
gdb/sh-linux-tdep.c
gdb/sh-tdep.c
gdb/sol2-tdep.c
gdb/sol2-tdep.h
gdb/sparc-linux-tdep.c
gdb/sparc-netbsd-tdep.c
gdb/sparc-obsd-tdep.c
gdb/sparc-sol2-tdep.c
gdb/sparc-tdep.c
gdb/sparc-tdep.h
gdb/sparc64-fbsd-tdep.c
gdb/sparc64-linux-tdep.c
gdb/sparc64-netbsd-tdep.c
gdb/sparc64-obsd-tdep.c
gdb/sparc64-sol2-tdep.c
gdb/sparc64-tdep.c
gdb/sparc64-tdep.h
gdb/stack.c
gdb/stack.h
gdb/stap-probe.c
gdb/std-regs.c
gdb/symtab.h
gdb/tic6x-linux-tdep.c
gdb/tic6x-tdep.c
gdb/tic6x-tdep.h
gdb/tilegx-linux-tdep.c
gdb/tilegx-tdep.c
gdb/tracepoint.c
gdb/trad-frame.c
gdb/trad-frame.h
gdb/tramp-frame.c
gdb/tramp-frame.h
gdb/tui/tui-disasm.c
gdb/tui/tui-disasm.h
gdb/tui/tui-hooks.c
gdb/tui/tui-regs.c
gdb/tui/tui-regs.h
gdb/tui/tui-source.c
gdb/tui/tui-source.h
gdb/tui/tui-status.c
gdb/tui/tui-status.h
gdb/tui/tui-winsource.h
gdb/unittests/frame_info_ptr-selftests.c
gdb/user-regs.c
gdb/user-regs.h
gdb/v850-tdep.c
gdb/valops.c
gdb/value.c
gdb/value.h
gdb/vax-tdep.c
gdb/xstormy16-tdep.c
gdb/xtensa-tdep.c
gdb/z80-tdep.c

index 2b043c0e735078ab22f65661704aa8264f89d1d4..44ca6c90c81808d9e111bcbc0965da1fb759e961 100644 (file)
@@ -88,9 +88,9 @@ static const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
 
 static void
 aarch64_fbsd_sigframe_init (const struct tramp_frame *self,
-                            frame_info_ptr this_frame,
-                            struct trad_frame_cache *this_cache,
-                            CORE_ADDR func)
+                           const frame_info_ptr &this_frame,
+                           struct trad_frame_cache *this_cache,
+                           CORE_ADDR func)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 7812ec5b7a1e620c56107d9587bc2ab7ba7e8dbe..4ebc173a0a001d19099b66af116a3c4f864579b4 100644 (file)
@@ -381,8 +381,8 @@ aarch64_linux_restore_vregs (struct gdbarch *gdbarch,
    SIGNAL_FRAME.  */
 
 static void
-aarch64_linux_read_signal_frame_info (frame_info_ptr this_frame,
-                                 struct aarch64_linux_sigframe &signal_frame)
+aarch64_linux_read_signal_frame_info (const frame_info_ptr &this_frame,
+                                     aarch64_linux_sigframe &signal_frame)
 {
   signal_frame.sp = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM);
   signal_frame.sigcontext_address
@@ -570,7 +570,7 @@ aarch64_linux_read_signal_frame_info (frame_info_ptr this_frame,
 
 static void
 aarch64_linux_sigframe_init (const struct tramp_frame *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             struct trad_frame_cache *this_cache,
                             CORE_ADDR func)
 {
@@ -704,7 +704,7 @@ aarch64_linux_sigframe_init (const struct tramp_frame *self,
 /* Implements the "prev_arch" method of struct tramp_frame.  */
 
 static struct gdbarch *
-aarch64_linux_sigframe_prev_arch (frame_info_ptr this_frame,
+aarch64_linux_sigframe_prev_arch (const frame_info_ptr &this_frame,
                                  void **frame_cache)
 {
   struct trad_frame_cache *cache
index b97e2153e14f364fd3a90e6927ac60c439b84db3..d1d5486f90ddc7a6377e81015136abbf21986f4f 100644 (file)
@@ -268,7 +268,7 @@ class instruction_reader : public abstract_instruction_reader
 
 static CORE_ADDR
 aarch64_frame_unmask_lr (aarch64_gdbarch_tdep *tdep,
-                        frame_info_ptr this_frame, CORE_ADDR addr)
+                        const frame_info_ptr &this_frame, CORE_ADDR addr)
 {
   if (tdep->has_pauth ()
       && frame_unwind_register_unsigned (this_frame,
@@ -298,7 +298,7 @@ aarch64_frame_unmask_lr (aarch64_gdbarch_tdep *tdep,
 /* Implement the "get_pc_address_flags" gdbarch method.  */
 
 static std::string
-aarch64_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc)
+aarch64_get_pc_address_flags (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   if (pc != 0 && get_frame_pc_masked (frame))
     return "PAC";
@@ -995,7 +995,7 @@ aarch64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
    cache CACHE.  */
 
 static void
-aarch64_scan_prologue (frame_info_ptr this_frame,
+aarch64_scan_prologue (const frame_info_ptr &this_frame,
                       struct aarch64_prologue_cache *cache)
 {
   CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
@@ -1049,7 +1049,7 @@ aarch64_scan_prologue (frame_info_ptr this_frame,
    not available.  */
 
 static void
-aarch64_make_prologue_cache_1 (frame_info_ptr this_frame,
+aarch64_make_prologue_cache_1 (const frame_info_ptr &this_frame,
                               struct aarch64_prologue_cache *cache)
 {
   CORE_ADDR unwound_fp;
@@ -1087,7 +1087,7 @@ aarch64_make_prologue_cache_1 (frame_info_ptr this_frame,
    *THIS_CACHE.  */
 
 static struct aarch64_prologue_cache *
-aarch64_make_prologue_cache (frame_info_ptr this_frame, void **this_cache)
+aarch64_make_prologue_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct aarch64_prologue_cache *cache;
 
@@ -1114,7 +1114,7 @@ aarch64_make_prologue_cache (frame_info_ptr this_frame, void **this_cache)
 /* Implement the "stop_reason" frame_unwind method.  */
 
 static enum unwind_stop_reason
-aarch64_prologue_frame_unwind_stop_reason (frame_info_ptr this_frame,
+aarch64_prologue_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                           void **this_cache)
 {
   struct aarch64_prologue_cache *cache
@@ -1140,7 +1140,7 @@ aarch64_prologue_frame_unwind_stop_reason (frame_info_ptr this_frame,
    PC and the caller's SP when we were called.  */
 
 static void
-aarch64_prologue_this_id (frame_info_ptr this_frame,
+aarch64_prologue_this_id (const frame_info_ptr &this_frame,
                          void **this_cache, struct frame_id *this_id)
 {
   struct aarch64_prologue_cache *cache
@@ -1155,7 +1155,7 @@ aarch64_prologue_this_id (frame_info_ptr this_frame,
 /* Implement the "prev_register" frame_unwind method.  */
 
 static struct value *
-aarch64_prologue_prev_register (frame_info_ptr this_frame,
+aarch64_prologue_prev_register (const frame_info_ptr &this_frame,
                                void **this_cache, int prev_regnum)
 {
   struct aarch64_prologue_cache *cache
@@ -1221,7 +1221,7 @@ static frame_unwind aarch64_prologue_unwind =
    *THIS_CACHE.  */
 
 static struct aarch64_prologue_cache *
-aarch64_make_stub_cache (frame_info_ptr this_frame, void **this_cache)
+aarch64_make_stub_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct aarch64_prologue_cache *cache;
 
@@ -1251,7 +1251,7 @@ aarch64_make_stub_cache (frame_info_ptr this_frame, void **this_cache)
 /* Implement the "stop_reason" frame_unwind method.  */
 
 static enum unwind_stop_reason
-aarch64_stub_frame_unwind_stop_reason (frame_info_ptr this_frame,
+aarch64_stub_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                       void **this_cache)
 {
   struct aarch64_prologue_cache *cache
@@ -1266,7 +1266,7 @@ aarch64_stub_frame_unwind_stop_reason (frame_info_ptr this_frame,
 /* Our frame ID for a stub frame is the current SP and LR.  */
 
 static void
-aarch64_stub_this_id (frame_info_ptr this_frame,
+aarch64_stub_this_id (const frame_info_ptr &this_frame,
                      void **this_cache, struct frame_id *this_id)
 {
   struct aarch64_prologue_cache *cache
@@ -1282,7 +1282,7 @@ aarch64_stub_this_id (frame_info_ptr this_frame,
 
 static int
 aarch64_stub_unwind_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;
@@ -1313,7 +1313,7 @@ static frame_unwind aarch64_stub_unwind =
 /* Return the frame base address of *THIS_FRAME.  */
 
 static CORE_ADDR
-aarch64_normal_frame_base (frame_info_ptr this_frame, void **this_cache)
+aarch64_normal_frame_base (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct aarch64_prologue_cache *cache
     = aarch64_make_prologue_cache (this_frame, this_cache);
@@ -1334,7 +1334,7 @@ static frame_base aarch64_normal_base =
    *THIS_FRAME.  */
 
 static struct value *
-aarch64_dwarf2_prev_register (frame_info_ptr this_frame,
+aarch64_dwarf2_prev_register (const frame_info_ptr &this_frame,
                              void **this_cache, int regnum)
 {
   gdbarch *arch = get_frame_arch (this_frame);
@@ -1361,7 +1361,7 @@ static const unsigned char op_lit1 = DW_OP_lit1;
 static void
 aarch64_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)
 {
   aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
 
@@ -2780,7 +2780,7 @@ aarch64_return_value (struct gdbarch *gdbarch, struct value *func_value,
 /* Implement the "get_longjmp_target" gdbarch method.  */
 
 static int
-aarch64_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+aarch64_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   CORE_ADDR jb_addr;
   gdb_byte buf[X_REGISTER_SIZE];
@@ -3105,7 +3105,7 @@ aarch64_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 /* Helper for aarch64_pseudo_read_value.  */
 
 static value *
-aarch64_pseudo_read_value_1 (frame_info_ptr next_frame,
+aarch64_pseudo_read_value_1 (const frame_info_ptr &next_frame,
                             const int pseudo_reg_num, int raw_regnum_offset)
 {
   unsigned v_regnum = AARCH64_V0_REGNUM + raw_regnum_offset;
@@ -3197,7 +3197,7 @@ aarch64_za_offsets_from_regnum (struct gdbarch *gdbarch, int regnum)
 /* Given REGNUM, a SME pseudo-register number, return its value in RESULT.  */
 
 static value *
-aarch64_sme_pseudo_register_read (gdbarch *gdbarch, frame_info_ptr next_frame,
+aarch64_sme_pseudo_register_read (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                                  const int pseudo_reg_num)
 {
   aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
@@ -3231,7 +3231,7 @@ aarch64_sme_pseudo_register_read (gdbarch *gdbarch, frame_info_ptr next_frame,
 /* Implement the "pseudo_register_read_value" gdbarch method.  */
 
 static value *
-aarch64_pseudo_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
+aarch64_pseudo_read_value (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                           const int pseudo_reg_num)
 {
   aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
@@ -3296,7 +3296,7 @@ aarch64_pseudo_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
 /* Helper for aarch64_pseudo_write.  */
 
 static void
-aarch64_pseudo_write_1 (gdbarch *gdbarch, frame_info_ptr next_frame,
+aarch64_pseudo_write_1 (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                        int regnum_offset,
                        gdb::array_view<const gdb_byte> buf)
 {
@@ -3322,7 +3322,7 @@ aarch64_pseudo_write_1 (gdbarch *gdbarch, frame_info_ptr next_frame,
    pseudo-register.  */
 
 static void
-aarch64_sme_pseudo_register_write (gdbarch *gdbarch, frame_info_ptr next_frame,
+aarch64_sme_pseudo_register_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                                   const int regnum,
                                   gdb::array_view<const gdb_byte> data)
 {
@@ -3364,7 +3364,7 @@ aarch64_sme_pseudo_register_write (gdbarch *gdbarch, frame_info_ptr next_frame,
 /* Implement the "pseudo_register_write" gdbarch method.  */
 
 static void
-aarch64_pseudo_write (gdbarch *gdbarch, frame_info_ptr next_frame,
+aarch64_pseudo_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                      const int pseudo_reg_num,
                      gdb::array_view<const gdb_byte> buf)
 {
@@ -3437,7 +3437,7 @@ aarch64_pseudo_write (gdbarch *gdbarch, frame_info_ptr next_frame,
 /* Callback function for user_reg_add.  */
 
 static struct value *
-value_of_aarch64_user_reg (frame_info_ptr frame, const void *baton)
+value_of_aarch64_user_reg (const frame_info_ptr &frame, const void *baton)
 {
   const int *reg_p = (const int *) baton;
 
index a3fd695e00348f8b9f2296efb64339197d65f889..3f3985400104fb90e8db96687b99715cdfa8a82a 100644 (file)
@@ -11720,7 +11720,7 @@ ada_exception_support_info_sniffer (void)
    to most users.  */
 
 static int
-is_known_support_routine (frame_info_ptr frame)
+is_known_support_routine (const frame_info_ptr &frame)
 {
   enum language func_lang;
   int i;
@@ -11779,9 +11779,9 @@ is_known_support_routine (frame_info_ptr frame)
    part of the Ada run-time, starting from FI and moving upward.  */
 
 void
-ada_find_printable_frame (frame_info_ptr fi)
+ada_find_printable_frame (const frame_info_ptr &initial_fi)
 {
-  for (; fi != NULL; fi = get_prev_frame (fi))
+  for (frame_info_ptr fi = initial_fi; fi != nullptr; fi = get_prev_frame (fi))
     {
       if (!is_known_support_routine (fi))
        {
@@ -12913,7 +12913,7 @@ ada_add_standard_exceptions (compiled_regex *preg,
 
 static void
 ada_add_exceptions_from_frame (compiled_regex *preg,
-                              frame_info_ptr frame,
+                              const frame_info_ptr &frame,
                               std::vector<ada_exc_info> *exceptions)
 {
   const struct block *block = get_frame_block (frame, 0);
@@ -13339,7 +13339,7 @@ public:
 
   struct value *read_var_value (struct symbol *var,
                                const struct block *var_block,
-                               frame_info_ptr frame) const override
+                               const frame_info_ptr &frame) const override
   {
     /* The only case where default_read_var_value is not sufficient
        is when VAR is a renaming...  */
index aefd335ff390e2868a3f9fcee39f903cee8a7fc3..5083d004ac98b0f75b55d2636675e9597e951bcf 100644 (file)
@@ -341,7 +341,7 @@ extern enum ada_renaming_category ada_parse_renaming (struct symbol *,
                                                      const char **,
                                                      int *, const char **);
 
-extern void ada_find_printable_frame (frame_info_ptr fi);
+extern void ada_find_printable_frame (const frame_info_ptr &fi);
 
 extern const char *ada_main_name ();
 
index 1a19626d9f09b20c3e98ae81eb8c7f19914b28f4..5f5e46d514e45da65e16159dcfbc3d5c149d4979 100644 (file)
@@ -126,7 +126,7 @@ alpha_linux_pc_in_sigtramp (struct gdbarch *gdbarch,
 }
 
 static CORE_ADDR
-alpha_linux_sigcontext_addr (frame_info_ptr this_frame)
+alpha_linux_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR pc;
index 7691a53148ae77ec5b4b24c6657d2620bbc0b0ed..7e9312d2aa731ac3bc93391dccea4a87bab23b9b 100644 (file)
@@ -185,7 +185,7 @@ struct alpha_mdebug_unwind_cache
    and store the resulting register save locations in the structure.  */
 
 static struct alpha_mdebug_unwind_cache *
-alpha_mdebug_frame_unwind_cache (frame_info_ptr this_frame, 
+alpha_mdebug_frame_unwind_cache (const frame_info_ptr &this_frame,
                                 void **this_prologue_cache)
 {
   struct alpha_mdebug_unwind_cache *info;
@@ -262,7 +262,7 @@ alpha_mdebug_frame_unwind_cache (frame_info_ptr this_frame,
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-alpha_mdebug_frame_this_id (frame_info_ptr this_frame,
+alpha_mdebug_frame_this_id (const frame_info_ptr &this_frame,
                            void **this_prologue_cache,
                            struct frame_id *this_id)
 {
@@ -275,7 +275,7 @@ alpha_mdebug_frame_this_id (frame_info_ptr this_frame,
 /* Retrieve the value of REGNUM in FRAME.  Don't give up!  */
 
 static struct value *
-alpha_mdebug_frame_prev_register (frame_info_ptr this_frame,
+alpha_mdebug_frame_prev_register (const frame_info_ptr &this_frame,
                                  void **this_prologue_cache, int regnum)
 {
   struct alpha_mdebug_unwind_cache *info
@@ -306,7 +306,7 @@ alpha_mdebug_max_frame_size_exceeded (struct mdebug_extra_func_info *proc_desc)
 
 static int
 alpha_mdebug_frame_sniffer (const struct frame_unwind *self,
-                           frame_info_ptr this_frame,
+                           const frame_info_ptr &this_frame,
                            void **this_cache)
 {
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
@@ -343,7 +343,7 @@ static const struct frame_unwind alpha_mdebug_frame_unwind =
 };
 
 static CORE_ADDR
-alpha_mdebug_frame_base_address (frame_info_ptr this_frame,
+alpha_mdebug_frame_base_address (const frame_info_ptr &this_frame,
                                 void **this_prologue_cache)
 {
   struct alpha_mdebug_unwind_cache *info
@@ -353,7 +353,7 @@ alpha_mdebug_frame_base_address (frame_info_ptr this_frame,
 }
 
 static CORE_ADDR
-alpha_mdebug_frame_locals_address (frame_info_ptr this_frame,
+alpha_mdebug_frame_locals_address (const frame_info_ptr &this_frame,
                                   void **this_prologue_cache)
 {
   struct alpha_mdebug_unwind_cache *info
@@ -363,7 +363,7 @@ alpha_mdebug_frame_locals_address (frame_info_ptr this_frame,
 }
 
 static CORE_ADDR
-alpha_mdebug_frame_args_address (frame_info_ptr this_frame,
+alpha_mdebug_frame_args_address (const frame_info_ptr &this_frame,
                                 void **this_prologue_cache)
 {
   struct alpha_mdebug_unwind_cache *info
@@ -380,7 +380,7 @@ static const struct frame_base alpha_mdebug_frame_base = {
 };
 
 static const struct frame_base *
-alpha_mdebug_frame_base_sniffer (frame_info_ptr this_frame)
+alpha_mdebug_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
   struct mdebug_extra_func_info *proc_desc;
index 0213fe5b94f336cf55600a9e31a38a2fcb8678a9..569fe42a2a94984ea20a0a795e656e1d35a0c0c6 100644 (file)
@@ -235,7 +235,7 @@ alphanbsd_pc_in_sigtramp (struct gdbarch *gdbarch,
 }
 
 static CORE_ADDR
-alphanbsd_sigcontext_addr (frame_info_ptr frame)
+alphanbsd_sigcontext_addr (const frame_info_ptr &frame)
 {
   /* FIXME: This is not correct for all versions of NetBSD/alpha.
      We will probably need to disassemble the trampoline to figure
index b22e584a4e484d26f8aa8dc865a05f6686467104..610866835c85aa48fb81a8242a207aab4bc5809a 100644 (file)
@@ -69,7 +69,7 @@ alphaobsd_pc_in_sigtramp (struct gdbarch *gdbarch,
 }
 
 static CORE_ADDR
-alphaobsd_sigcontext_addr (frame_info_ptr this_frame)
+alphaobsd_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR pc = get_frame_pc (this_frame);
index cafadae45c74f4f668383f447cecdb8c673e9d82..e5e0860fe24181dacde483aba050cd85a7e03676 100644 (file)
@@ -233,7 +233,7 @@ alpha_convert_register_p (struct gdbarch *gdbarch, int regno,
 }
 
 static int
-alpha_register_to_value (frame_info_ptr frame, int regnum,
+alpha_register_to_value (const frame_info_ptr &frame, int regnum,
                         struct type *valtype, gdb_byte *out,
                        int *optimizedp, int *unavailablep)
 {
@@ -260,7 +260,7 @@ alpha_register_to_value (frame_info_ptr frame, int regnum,
 }
 
 static void
-alpha_value_to_register (frame_info_ptr frame, int regnum,
+alpha_value_to_register (const frame_info_ptr &frame, int regnum,
                         struct type *valtype, const gdb_byte *in)
 {
   int reg_size = register_size (get_frame_arch (frame), regnum);
@@ -840,7 +840,7 @@ alpha_deal_with_atomic_sequence (struct gdbarch *gdbarch, CORE_ADDR pc)
    into the "pc".  This routine returns true on success.  */
 
 static int
-alpha_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+alpha_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
@@ -871,7 +871,7 @@ struct alpha_sigtramp_unwind_cache
 };
 
 static struct alpha_sigtramp_unwind_cache *
-alpha_sigtramp_frame_unwind_cache (frame_info_ptr this_frame,
+alpha_sigtramp_frame_unwind_cache (const frame_info_ptr &this_frame,
                                   void **this_prologue_cache)
 {
   struct alpha_sigtramp_unwind_cache *info;
@@ -912,7 +912,7 @@ alpha_sigtramp_register_address (struct gdbarch *gdbarch,
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-alpha_sigtramp_frame_this_id (frame_info_ptr this_frame,
+alpha_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                              void **this_prologue_cache,
                              struct frame_id *this_id)
 {
@@ -954,7 +954,7 @@ alpha_sigtramp_frame_this_id (frame_info_ptr this_frame,
 /* Retrieve the value of REGNUM in FRAME.  Don't give up!  */
 
 static struct value *
-alpha_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+alpha_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                    void **this_prologue_cache, int regnum)
 {
   struct alpha_sigtramp_unwind_cache *info
@@ -979,7 +979,7 @@ alpha_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 alpha_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1221,7 +1221,7 @@ alpha_heuristic_analyze_probing_loop (struct gdbarch *gdbarch, CORE_ADDR *pc,
 }
 
 static struct alpha_heuristic_unwind_cache *
-alpha_heuristic_frame_unwind_cache (frame_info_ptr this_frame,
+alpha_heuristic_frame_unwind_cache (const frame_info_ptr &this_frame,
                                    void **this_prologue_cache,
                                    CORE_ADDR start_pc)
 {
@@ -1398,7 +1398,7 @@ alpha_heuristic_frame_unwind_cache (frame_info_ptr this_frame,
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-alpha_heuristic_frame_this_id (frame_info_ptr this_frame,
+alpha_heuristic_frame_this_id (const frame_info_ptr &this_frame,
                               void **this_prologue_cache,
                               struct frame_id *this_id)
 {
@@ -1411,7 +1411,7 @@ alpha_heuristic_frame_this_id (frame_info_ptr this_frame,
 /* Retrieve the value of REGNUM in FRAME.  Don't give up!  */
 
 static struct value *
-alpha_heuristic_frame_prev_register (frame_info_ptr this_frame,
+alpha_heuristic_frame_prev_register (const frame_info_ptr &this_frame,
                                     void **this_prologue_cache, int regnum)
 {
   struct alpha_heuristic_unwind_cache *info
@@ -1438,7 +1438,7 @@ static const struct frame_unwind alpha_heuristic_frame_unwind =
 };
 
 static CORE_ADDR
-alpha_heuristic_frame_base_address (frame_info_ptr this_frame,
+alpha_heuristic_frame_base_address (const frame_info_ptr &this_frame,
                                    void **this_prologue_cache)
 {
   struct alpha_heuristic_unwind_cache *info
index f9c7e295609ac1342c5e7e7a125d919ec8a78fb1..0423abb255842f03ad3d914f5d481299608c66fb 100644 (file)
@@ -81,7 +81,7 @@ struct alpha_gdbarch_tdep : gdbarch_tdep_base
 
   /* Translate a signal handler stack base address into the address of
      the sigcontext structure for that signal handler.  */
-  CORE_ADDR (*sigcontext_addr) (frame_info_ptr) = nullptr;
+  CORE_ADDR (*sigcontext_addr) (const frame_info_ptr &) = nullptr;
 
   /* Does the PC fall in a signal trampoline.  */
   /* NOTE: cagney/2004-04-30: Do not copy/clone this code.  Instead
index bfba7a5284a6a93f68561befc420c55baaf3ea48..001f5379def2e2e2c6cfe664e08274612fbd034f 100644 (file)
@@ -75,7 +75,7 @@ const int amd64_darwin_thread_state_num_regs =
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-amd64_darwin_sigcontext_addr (frame_info_ptr this_frame)
+amd64_darwin_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 9144801a5d2992548a9d75a5ac534aa6f5c10f13..a837bd197ffe42611bc0ba9c6da60b2ab6613a9c 100644 (file)
@@ -169,7 +169,7 @@ const struct regset amd64_fbsd_segbases_regset =
 
 static void
 amd64_fbsd_sigframe_init (const struct tramp_frame *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          struct trad_frame_cache *this_cache,
                          CORE_ADDR func)
 {
index fe7f5d4a2597360a92a851b2a87297bef234e0f2..1deb13b4e9addec469b1aed2c3107439505362c7 100644 (file)
@@ -133,7 +133,7 @@ static const gdb_byte amd64_x32_linux_sigtramp_code[] =
    the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-amd64_linux_sigtramp_start (frame_info_ptr this_frame)
+amd64_linux_sigtramp_start (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch;
   const gdb_byte *sigtramp_code;
@@ -175,7 +175,7 @@ amd64_linux_sigtramp_start (frame_info_ptr this_frame)
    routine.  */
 
 static int
-amd64_linux_sigtramp_p (frame_info_ptr this_frame)
+amd64_linux_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -201,7 +201,7 @@ amd64_linux_sigtramp_p (frame_info_ptr this_frame)
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-amd64_linux_sigcontext_addr (frame_info_ptr this_frame)
+amd64_linux_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index d1a7cf3a0492a91121edba8d3d4a4200b4929f8e..40500ee5f76c252d77e26b9e7e55f9f90decf84b 100644 (file)
@@ -35,7 +35,7 @@
    routine.  */
 
 static int
-amd64nbsd_sigtramp_p (frame_info_ptr this_frame)
+amd64nbsd_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -48,7 +48,7 @@ amd64nbsd_sigtramp_p (frame_info_ptr this_frame)
    return the address of the associated mcontext structure.  */
 
 static CORE_ADDR
-amd64nbsd_mcontext_addr (frame_info_ptr this_frame)
+amd64nbsd_mcontext_addr (const frame_info_ptr &this_frame)
 {
   CORE_ADDR addr;
 
index 9cca6b12c84e3cb6aba6633a4a5386370c376cc4..6b37e8954ee417f05163b13a80274208f8db5dd1 100644 (file)
@@ -45,7 +45,7 @@ static const int amd64obsd_page_size = 4096;
    routine.  */
 
 static int
-amd64obsd_sigtramp_p (frame_info_ptr this_frame)
+amd64obsd_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   CORE_ADDR start_pc = (pc & ~(amd64obsd_page_size - 1));
@@ -98,7 +98,7 @@ amd64obsd_sigtramp_p (frame_info_ptr this_frame)
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-amd64obsd_sigcontext_addr (frame_info_ptr this_frame)
+amd64obsd_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   ULONGEST offset = (pc & (amd64obsd_page_size - 1));
@@ -315,7 +315,7 @@ amd64obsd_collect_uthread (const struct regcache *regcache,
 #define amd64obsd_tf_reg_offset amd64obsd_sc_reg_offset
 
 static struct trad_frame_cache *
-amd64obsd_trapframe_cache (frame_info_ptr this_frame, void **this_cache)
+amd64obsd_trapframe_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -362,7 +362,7 @@ amd64obsd_trapframe_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-amd64obsd_trapframe_this_id (frame_info_ptr this_frame,
+amd64obsd_trapframe_this_id (const frame_info_ptr &this_frame,
                             void **this_cache, struct frame_id *this_id)
 {
   struct trad_frame_cache *cache =
@@ -372,7 +372,7 @@ amd64obsd_trapframe_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-amd64obsd_trapframe_prev_register (frame_info_ptr this_frame,
+amd64obsd_trapframe_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache, int regnum)
 {
   struct trad_frame_cache *cache =
@@ -383,7 +383,7 @@ amd64obsd_trapframe_prev_register (frame_info_ptr this_frame,
 
 static int
 amd64obsd_trapframe_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_prologue_cache)
 {
   ULONGEST cs;
index 30a5dfa4c5ea549b7edc69ecd09c2203e202e4da..6cc84017f740ab0de710ac4f97628b93a4b286aa 100644 (file)
@@ -67,7 +67,7 @@ static int amd64_sol2_gregset_reg_offset[] = {
    'mcontext_t' that contains the saved set of machine registers.  */
 
 static CORE_ADDR
-amd64_sol2_mcontext_addr (frame_info_ptr this_frame)
+amd64_sol2_mcontext_addr (const frame_info_ptr &this_frame)
 {
   CORE_ADDR sp, ucontext_addr;
 
index a8ff9246b8ad7d227f55d3e79f9a91493cff4d9e..f5968ab4d0f90a04d1a73f769843fc15540a9a04 100644 (file)
@@ -348,7 +348,7 @@ amd64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
 }
 
 static value *
-amd64_pseudo_register_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
+amd64_pseudo_register_read_value (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                                  int regnum)
 {
   i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
@@ -379,7 +379,7 @@ amd64_pseudo_register_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
 }
 
 static void
-amd64_pseudo_register_write (gdbarch *gdbarch, frame_info_ptr next_frame,
+amd64_pseudo_register_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                             int regnum, gdb::array_view<const gdb_byte> buf)
 {
   i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
@@ -2510,7 +2510,7 @@ amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 /* Normal frames.  */
 
 static void
-amd64_frame_cache_1 (frame_info_ptr this_frame,
+amd64_frame_cache_1 (const frame_info_ptr &this_frame,
                     struct amd64_frame_cache *cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2579,7 +2579,7 @@ amd64_frame_cache_1 (frame_info_ptr this_frame,
 }
 
 static struct amd64_frame_cache *
-amd64_frame_cache (frame_info_ptr this_frame, void **this_cache)
+amd64_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct amd64_frame_cache *cache;
 
@@ -2603,7 +2603,7 @@ amd64_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static enum unwind_stop_reason
-amd64_frame_unwind_stop_reason (frame_info_ptr this_frame,
+amd64_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                void **this_cache)
 {
   struct amd64_frame_cache *cache =
@@ -2620,7 +2620,7 @@ amd64_frame_unwind_stop_reason (frame_info_ptr this_frame,
 }
 
 static void
-amd64_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+amd64_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                     struct frame_id *this_id)
 {
   struct amd64_frame_cache *cache =
@@ -2638,7 +2638,7 @@ amd64_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-amd64_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+amd64_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                           int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2692,7 +2692,7 @@ amd64_gen_return_address (struct gdbarch *gdbarch,
    on both platforms.  */
 
 static struct amd64_frame_cache *
-amd64_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
+amd64_sigtramp_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
@@ -2732,7 +2732,7 @@ amd64_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static enum unwind_stop_reason
-amd64_sigtramp_frame_unwind_stop_reason (frame_info_ptr this_frame,
+amd64_sigtramp_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                         void **this_cache)
 {
   struct amd64_frame_cache *cache =
@@ -2745,7 +2745,7 @@ amd64_sigtramp_frame_unwind_stop_reason (frame_info_ptr this_frame,
 }
 
 static void
-amd64_sigtramp_frame_this_id (frame_info_ptr this_frame,
+amd64_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                              void **this_cache, struct frame_id *this_id)
 {
   struct amd64_frame_cache *cache =
@@ -2763,7 +2763,7 @@ amd64_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-amd64_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+amd64_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                    void **this_cache, int regnum)
 {
   /* Make sure we've initialized the cache.  */
@@ -2774,7 +2774,7 @@ amd64_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 amd64_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              void **this_cache)
 {
   gdbarch *arch = get_frame_arch (this_frame);
@@ -2816,7 +2816,7 @@ static const struct frame_unwind amd64_sigtramp_frame_unwind =
 \f
 
 static CORE_ADDR
-amd64_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+amd64_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct amd64_frame_cache *cache =
     amd64_frame_cache (this_frame, this_cache);
@@ -2878,7 +2878,7 @@ amd64_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 static int
 amd64_epilogue_frame_sniffer_1 (const struct frame_unwind *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                void **this_prologue_cache, bool override_p)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2911,7 +2911,7 @@ amd64_epilogue_frame_sniffer_1 (const struct frame_unwind *self,
 
 static int
 amd64_epilogue_override_frame_sniffer (const struct frame_unwind *self,
-                                      frame_info_ptr this_frame,
+                                      const frame_info_ptr &this_frame,
                                       void **this_prologue_cache)
 {
   return amd64_epilogue_frame_sniffer_1 (self, this_frame, this_prologue_cache,
@@ -2920,7 +2920,7 @@ amd64_epilogue_override_frame_sniffer (const struct frame_unwind *self,
 
 static int
 amd64_epilogue_frame_sniffer (const struct frame_unwind *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              void **this_prologue_cache)
 {
   return amd64_epilogue_frame_sniffer_1 (self, this_frame, this_prologue_cache,
@@ -2928,7 +2928,7 @@ amd64_epilogue_frame_sniffer (const struct frame_unwind *self,
 }
 
 static struct amd64_frame_cache *
-amd64_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
+amd64_epilogue_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -2969,7 +2969,7 @@ amd64_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static enum unwind_stop_reason
-amd64_epilogue_frame_unwind_stop_reason (frame_info_ptr this_frame,
+amd64_epilogue_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                         void **this_cache)
 {
   struct amd64_frame_cache *cache
@@ -2982,7 +2982,7 @@ amd64_epilogue_frame_unwind_stop_reason (frame_info_ptr this_frame,
 }
 
 static void
-amd64_epilogue_frame_this_id (frame_info_ptr this_frame,
+amd64_epilogue_frame_this_id (const frame_info_ptr &this_frame,
                              void **this_cache,
                              struct frame_id *this_id)
 {
@@ -3018,7 +3018,7 @@ static const struct frame_unwind amd64_epilogue_frame_unwind =
 };
 
 static struct frame_id
-amd64_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+amd64_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR fp;
 
@@ -3081,7 +3081,7 @@ const struct regset amd64_fpregset =
    success.  */
 
 static int
-amd64_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+amd64_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   gdb_byte buf[8];
   CORE_ADDR jb_addr;
index 50304e15cb8ac7c3d25f90e80fac4a9c665f9b3e..7c5169fd98c5e935b47099a103989e56c70a67bf 100644 (file)
@@ -517,7 +517,7 @@ pc_in_range (CORE_ADDR pc, const struct amd64_windows_frame_cache *cache)
    Return 1 if an epilogue sequence was recognized, 0 otherwise.  */
 
 static int
-amd64_windows_frame_decode_epilogue (frame_info_ptr this_frame,
+amd64_windows_frame_decode_epilogue (const frame_info_ptr &this_frame,
                                     struct amd64_windows_frame_cache *cache)
 {
   /* According to MSDN an epilogue "must consist of either an add RSP,constant
@@ -697,7 +697,7 @@ amd64_windows_frame_decode_epilogue (frame_info_ptr this_frame,
 /* Decode and execute unwind insns at UNWIND_INFO.  */
 
 static void
-amd64_windows_frame_decode_insns (frame_info_ptr this_frame,
+amd64_windows_frame_decode_insns (const frame_info_ptr &this_frame,
                                  struct amd64_windows_frame_cache *cache,
                                  CORE_ADDR unwind_info)
 {
@@ -1077,7 +1077,7 @@ amd64_windows_find_unwind_info (struct gdbarch *gdbarch, CORE_ADDR pc,
    for THIS_FRAME.  */
 
 static struct amd64_windows_frame_cache *
-amd64_windows_frame_cache (frame_info_ptr this_frame, void **this_cache)
+amd64_windows_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1123,7 +1123,7 @@ amd64_windows_frame_cache (frame_info_ptr this_frame, void **this_cache)
    using the standard Windows x64 SEH info.  */
 
 static struct value *
-amd64_windows_frame_prev_register (frame_info_ptr this_frame,
+amd64_windows_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1169,7 +1169,7 @@ amd64_windows_frame_prev_register (frame_info_ptr this_frame,
    the standard Windows x64 SEH info.  */
 
 static void
-amd64_windows_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+amd64_windows_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                   struct frame_id *this_id)
 {
   struct amd64_windows_frame_cache *cache =
@@ -1235,7 +1235,7 @@ amd64_windows_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* Check Win64 DLL jmp trampolines and find jump destination.  */
 
 static CORE_ADDR
-amd64_windows_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+amd64_windows_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   CORE_ADDR destination = 0;
   struct gdbarch *gdbarch = get_frame_arch (frame);
index 44252e559cdc9fac934f434ec98d934ddc26a8d1..ac137d9acc44330051453b63e06d0a907a022b91 100644 (file)
@@ -846,7 +846,7 @@ struct amdgpu_frame_cache
 };
 
 static amdgpu_frame_cache *
-amdgpu_frame_cache (frame_info_ptr this_frame, void **this_cache)
+amdgpu_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   if (*this_cache != nullptr)
     return (struct amdgpu_frame_cache *) *this_cache;
@@ -862,7 +862,7 @@ amdgpu_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-amdgpu_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+amdgpu_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                      frame_id *this_id)
 {
   struct amdgpu_frame_cache *cache
@@ -880,13 +880,13 @@ amdgpu_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static frame_id
-amdgpu_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+amdgpu_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   return frame_id_build (0, get_frame_pc (this_frame));
 }
 
 static struct value *
-amdgpu_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+amdgpu_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                            int regnum)
 {
   return frame_unwind_got_register (this_frame, regnum, regnum);
index 03ff49a2b197c6aee671374fc96393467abb6573..ca630ab6df0c7707e57e6219044d458bf8887351 100644 (file)
@@ -159,7 +159,7 @@ static const int arc_linux_core_reg_offsets[] = {
    Returns TRUE if this is a sigtramp frame.  */
 
 static bool
-arc_linux_is_sigtramp (frame_info_ptr this_frame)
+arc_linux_is_sigtramp (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -257,7 +257,7 @@ arc_linux_is_sigtramp (frame_info_ptr this_frame)
    etc) in GDB hardcode values.  */
 
 static CORE_ADDR
-arc_linux_sigcontext_addr (frame_info_ptr this_frame)
+arc_linux_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   const int ucontext_offset = 0x80;
   const int sigcontext_offset = 0x14;
index 84e211ce9ad5154555179937b3ff3d4e29e01324..12d8aee949fd78867bc5c95b76c36e0e30305d43 100644 (file)
@@ -998,7 +998,7 @@ arc_store_return_value (struct gdbarch *gdbarch, struct type *type,
 /* Implement the "get_longjmp_target" gdbarch method.  */
 
 static int
-arc_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+arc_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   arc_debug_printf ("called");
 
@@ -1062,7 +1062,7 @@ arc_return_value (struct gdbarch *gdbarch, struct value *function,
    frame pointer.  */
 
 static CORE_ADDR
-arc_frame_base_address (frame_info_ptr this_frame, void **prologue_cache)
+arc_frame_base_address (const frame_info_ptr &this_frame, void **prologue_cache)
 {
   return (CORE_ADDR) get_frame_register_unsigned (this_frame, ARC_FP_REGNUM);
 }
@@ -1643,7 +1643,7 @@ arc_print_frame_cache (struct gdbarch *gdbarch, const char *message,
 /* Frame unwinder for normal frames.  */
 
 static struct arc_frame_cache *
-arc_make_frame_cache (frame_info_ptr this_frame)
+arc_make_frame_cache (const frame_info_ptr &this_frame)
 {
   arc_debug_printf ("called");
 
@@ -1710,7 +1710,7 @@ arc_make_frame_cache (frame_info_ptr this_frame)
 /* Implement the "this_id" frame_unwind method.  */
 
 static void
-arc_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+arc_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                   struct frame_id *this_id)
 {
   arc_debug_printf ("called");
@@ -1755,7 +1755,7 @@ arc_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 /* Implement the "prev_register" frame_unwind method.  */
 
 static struct value *
-arc_frame_prev_register (frame_info_ptr this_frame,
+arc_frame_prev_register (const frame_info_ptr &this_frame,
                         void **this_cache, int regnum)
 {
   if (*this_cache == NULL)
@@ -1792,7 +1792,7 @@ arc_frame_prev_register (frame_info_ptr this_frame,
 static void
 arc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
                           struct dwarf2_frame_state_reg *reg,
-                          frame_info_ptr info)
+                          const frame_info_ptr &info)
 {
   if (regnum == gdbarch_pc_regnum (gdbarch))
     /* The return address column.  */
@@ -1806,7 +1806,7 @@ arc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
     from within signal handlers.  */
 
 static struct arc_frame_cache *
-arc_make_sigtramp_frame_cache (frame_info_ptr this_frame)
+arc_make_sigtramp_frame_cache (const frame_info_ptr &this_frame)
 {
   arc_debug_printf ("called");
 
@@ -1845,7 +1845,7 @@ arc_make_sigtramp_frame_cache (frame_info_ptr this_frame)
    frames.  */
 
 static void
-arc_sigtramp_frame_this_id (frame_info_ptr this_frame,
+arc_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                            void **this_cache, struct frame_id *this_id)
 {
   arc_debug_printf ("called");
@@ -1864,7 +1864,7 @@ arc_sigtramp_frame_this_id (frame_info_ptr this_frame,
 /* Get a register from a signal handler frame.  */
 
 static struct value *
-arc_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+arc_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                  void **this_cache, int regnum)
 {
   arc_debug_printf ("regnum = %d", regnum);
@@ -1882,7 +1882,7 @@ arc_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 arc_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                           frame_info_ptr this_frame,
+                           const frame_info_ptr &this_frame,
                            void **this_cache)
 {
   arc_debug_printf ("called");
index 6fc1131a4352241ed8be2dda050880d8a9ee0d04..c59490dec004c857ec2bde2b6476e931089f26c8 100644 (file)
@@ -131,10 +131,10 @@ struct arc_gdbarch_tdep : gdbarch_tdep_base
   bool has_hw_loops = false;
 
   /* Detect sigtramp.  */
-  bool (*is_sigtramp) (frame_info_ptr) = nullptr;
+  bool (*is_sigtramp) (const frame_info_ptr &) = nullptr;
 
   /* Get address of sigcontext for sigtramp.  */
-  CORE_ADDR (*sigcontext_addr) (frame_info_ptr) = nullptr;
+  CORE_ADDR (*sigcontext_addr) (const frame_info_ptr &) = nullptr;
 
   /* Offset of registers in `struct sigcontext'.  */
   const int *sc_reg_offset = nullptr;
index 1faa013c16f0983821bb2c4997c02e11a680ba0c..ae3354f65799a8038dec4cc4dc0323259a505499 100644 (file)
@@ -140,7 +140,7 @@ default_get_memtag (struct gdbarch *gdbarch, struct value *address,
 }
 
 CORE_ADDR
-generic_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+generic_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   return 0;
 }
@@ -166,7 +166,7 @@ generic_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 int
 default_code_of_frame_writable (struct gdbarch *gdbarch,
-                               frame_info_ptr frame)
+                               const frame_info_ptr &frame)
 {
   return 1;
 }
@@ -1079,7 +1079,7 @@ default_type_align (struct gdbarch *gdbarch, struct type *type)
 /* See arch-utils.h.  */
 
 std::string
-default_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc)
+default_get_pc_address_flags (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   return "";
 }
@@ -1105,7 +1105,8 @@ default_use_target_description_from_corefile_notes (struct gdbarch *gdbarch,
 }
 
 CORE_ADDR
-default_get_return_buf_addr (struct type *val_type, frame_info_ptr cur_frame)
+default_get_return_buf_addr (struct type *val_type,
+                            const frame_info_ptr &cur_frame)
 {
   return 0;
 }
index 0f37aaf20f828e849a5dc529ebe12a74d55826e1..2dcd8f6dc53b407d927a81a0215b0c69651f8c19 100644 (file)
@@ -158,7 +158,7 @@ struct value *default_get_memtag (struct gdbarch *gdbarch,
                                  struct value *address,
                                  memtag_type tag_type);
 
-extern CORE_ADDR generic_skip_trampoline_code (frame_info_ptr frame,
+extern CORE_ADDR generic_skip_trampoline_code (const frame_info_ptr &frame,
                                               CORE_ADDR pc);
 
 extern CORE_ADDR generic_skip_solib_resolver (struct gdbarch *gdbarch,
@@ -171,7 +171,7 @@ extern int generic_stack_frame_destroyed_p (struct gdbarch *gdbarch,
                                            CORE_ADDR pc);
 
 extern int default_code_of_frame_writable (struct gdbarch *gdbarch,
-                                          frame_info_ptr frame);
+                                          const frame_info_ptr &frame);
 
 /* By default, registers are not convertible.  */
 extern int generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
@@ -295,7 +295,7 @@ extern ULONGEST default_type_align (struct gdbarch *gdbarch,
                                    struct type *type);
 
 /* Default implementation of gdbarch get_pc_address_flags method.  */
-extern std::string default_get_pc_address_flags (frame_info_ptr frame,
+extern std::string default_get_pc_address_flags (const frame_info_ptr &frame,
                                                 CORE_ADDR pc);
 
 /* Default implementation of gdbarch read_core_file_mappings method.  */
@@ -313,7 +313,7 @@ extern bool default_use_target_description_from_corefile_notes
 
 /* Default implementation of gdbarch default_get_return_buf_addr method.  */
 extern CORE_ADDR default_get_return_buf_addr (struct type *val_typegdbarch,
-                                             frame_info_ptr cur_frame);
+                                             const frame_info_ptr &cur_frame);
 
 /* Default implementation of gdbarch default_dwarf2_omit_typedef_p method.  */
 extern bool default_dwarf2_omit_typedef_p (struct type *target_type,
index 143aaf121b71c7388c42be11227308f685363874..b485951c37640a6e2a63051b94db3f297ef7ac5c 100644 (file)
@@ -105,7 +105,7 @@ static const struct regcache_map_entry arm_fbsd_tls_regmap[] =
 
 static void
 arm_fbsd_sigframe_init (const struct tramp_frame *self,
-                       frame_info_ptr this_frame,
+                       const frame_info_ptr &this_frame,
                        struct trad_frame_cache *this_cache,
                        CORE_ADDR func)
 {
index b559de0fb2d6b38ede6438512e5d06413a2b1582..cc79247aaf1292c6d43662502a0f8641a45bf377 100644 (file)
@@ -277,7 +277,7 @@ static struct arm_get_next_pcs_ops arm_linux_get_next_pcs_ops = {
 };
 
 static void
-arm_linux_sigtramp_cache (frame_info_ptr this_frame,
+arm_linux_sigtramp_cache (const frame_info_ptr &this_frame,
                          struct trad_frame_cache *this_cache,
                          CORE_ADDR func, int regs_offset)
 {
@@ -300,7 +300,7 @@ arm_linux_sigtramp_cache (frame_info_ptr this_frame,
 /* See arm-linux.h for stack layout details.  */
 static void
 arm_linux_sigreturn_init (const struct tramp_frame *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          struct trad_frame_cache *this_cache,
                          CORE_ADDR func)
 {
@@ -320,7 +320,7 @@ arm_linux_sigreturn_init (const struct tramp_frame *self,
 
 static void
 arm_linux_rt_sigreturn_init (const struct tramp_frame *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          struct trad_frame_cache *this_cache,
                          CORE_ADDR func)
 {
@@ -343,7 +343,7 @@ arm_linux_rt_sigreturn_init (const struct tramp_frame *self,
 
 static void
 arm_linux_restart_syscall_init (const struct tramp_frame *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                struct trad_frame_cache *this_cache,
                                CORE_ADDR func)
 {
@@ -756,7 +756,7 @@ arm_linux_core_read_description (struct gdbarch *gdbarch,
    will return to ARM or Thumb code.  Return 0 if it is not a
    rt_sigreturn/sigreturn syscall.  */
 static int
-arm_linux_sigreturn_return_addr (frame_info_ptr frame,
+arm_linux_sigreturn_return_addr (const frame_info_ptr &frame,
                                 unsigned long svc_number,
                                 CORE_ADDR *pc, int *is_thumb)
 {
@@ -1720,7 +1720,7 @@ arm_linux_syscall_record (struct regcache *regcache, unsigned long svc_number)
 /* Implement the skip_trampoline_code gdbarch method.  */
 
 static CORE_ADDR
-arm_linux_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+arm_linux_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   CORE_ADDR target_pc = arm_skip_stub (frame, pc);
 
index 9aa2408f36e3babf542d2ece06bb23ef0fb11407..0bdecec3b6fb8b95114f3c5187fa9f963b073486 100644 (file)
@@ -30,7 +30,7 @@
 
 static void
 armobsd_sigframe_init (const struct tramp_frame *self,
-                      frame_info_ptr this_frame,
+                      const frame_info_ptr &this_frame,
                       struct trad_frame_cache *cache,
                       CORE_ADDR func)
 {
index 081e934cf8625536d774a8a4ed6c7002fdfbb0a0..3b4ae15df07ebdd09a0d26111aaf01a27a13a693 100644 (file)
@@ -339,7 +339,7 @@ arm_cache_init (struct arm_prologue_cache *cache, struct gdbarch *gdbarch)
 /* Similar to the previous function, but extracts GDBARCH from FRAME.  */
 
 static void
-arm_cache_init (struct arm_prologue_cache *cache, frame_info_ptr frame)
+arm_cache_init (struct arm_prologue_cache *cache, const frame_info_ptr &frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
@@ -628,7 +628,7 @@ arm_is_thumb (struct regcache *regcache)
    frame.  */
 
 int
-arm_frame_is_thumb (frame_info_ptr frame)
+arm_frame_is_thumb (const frame_info_ptr &frame)
 {
   /* Check the architecture of FRAME.  */
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -2213,7 +2213,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
 }
 
 static void
-arm_scan_prologue (frame_info_ptr this_frame,
+arm_scan_prologue (const frame_info_ptr &this_frame,
                   struct arm_prologue_cache *cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2310,7 +2310,7 @@ arm_scan_prologue (frame_info_ptr this_frame,
 }
 
 static struct arm_prologue_cache *
-arm_make_prologue_cache (frame_info_ptr this_frame)
+arm_make_prologue_cache (const frame_info_ptr &this_frame)
 {
   int reg;
   struct arm_prologue_cache *cache;
@@ -2344,7 +2344,7 @@ arm_make_prologue_cache (frame_info_ptr this_frame)
 /* Implementation of the stop_reason hook for arm_prologue frames.  */
 
 static enum unwind_stop_reason
-arm_prologue_unwind_stop_reason (frame_info_ptr this_frame,
+arm_prologue_unwind_stop_reason (const frame_info_ptr &this_frame,
                                 void **this_cache)
 {
   struct arm_prologue_cache *cache;
@@ -2372,7 +2372,7 @@ arm_prologue_unwind_stop_reason (frame_info_ptr this_frame,
    and the caller's SP when we were called.  */
 
 static void
-arm_prologue_this_id (frame_info_ptr this_frame,
+arm_prologue_this_id (const frame_info_ptr &this_frame,
                      void **this_cache,
                      struct frame_id *this_id)
 {
@@ -2400,7 +2400,7 @@ arm_prologue_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-arm_prologue_prev_register (frame_info_ptr this_frame,
+arm_prologue_prev_register (const frame_info_ptr &this_frame,
                            void **this_cache,
                            int prev_regnum)
 {
@@ -2794,7 +2794,7 @@ arm_find_exidx_entry (CORE_ADDR memaddr, CORE_ADDR *start)
    for the ARM Architecture" document.  */
 
 static struct arm_prologue_cache *
-arm_exidx_fill_cache (frame_info_ptr this_frame, gdb_byte *entry)
+arm_exidx_fill_cache (const frame_info_ptr &this_frame, gdb_byte *entry)
 {
   CORE_ADDR vsp = 0;
   int vsp_valid = 0;
@@ -3092,7 +3092,7 @@ arm_exidx_fill_cache (frame_info_ptr this_frame, gdb_byte *entry)
 
 static int
 arm_exidx_unwind_sniffer (const struct frame_unwind *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -3199,7 +3199,7 @@ struct frame_unwind arm_exidx_unwind = {
 };
 
 static struct arm_prologue_cache *
-arm_make_epilogue_frame_cache (frame_info_ptr this_frame)
+arm_make_epilogue_frame_cache (const frame_info_ptr &this_frame)
 {
   struct arm_prologue_cache *cache;
   int reg;
@@ -3231,7 +3231,7 @@ arm_make_epilogue_frame_cache (frame_info_ptr this_frame)
    'struct frame_uwnind' for epilogue unwinder.  */
 
 static void
-arm_epilogue_frame_this_id (frame_info_ptr this_frame,
+arm_epilogue_frame_this_id (const frame_info_ptr &this_frame,
                            void **this_cache,
                            struct frame_id *this_id)
 {
@@ -3259,7 +3259,7 @@ arm_epilogue_frame_this_id (frame_info_ptr this_frame,
    'struct frame_uwnind' for epilogue unwinder.  */
 
 static struct value *
-arm_epilogue_frame_prev_register (frame_info_ptr this_frame,
+arm_epilogue_frame_prev_register (const frame_info_ptr &this_frame,
                                  void **this_cache, int regnum)
 {
   if (*this_cache == NULL)
@@ -3278,7 +3278,7 @@ static int thumb_stack_frame_destroyed_p (struct gdbarch *gdbarch,
 
 static int
 arm_epilogue_frame_sniffer (const struct frame_unwind *self,
-                           frame_info_ptr this_frame,
+                           const frame_info_ptr &this_frame,
                            void **this_prologue_cache)
 {
   if (frame_relative_level (this_frame) == 0)
@@ -3335,7 +3335,7 @@ static const struct frame_unwind arm_epilogue_frame_unwind =
    The trampoline 'bx r2' doesn't belong to main.  */
 
 static CORE_ADDR
-arm_skip_bx_reg (frame_info_ptr frame, CORE_ADDR pc)
+arm_skip_bx_reg (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   /* The heuristics of recognizing such trampoline is that FRAME is
      executing in Thumb mode and the instruction on PC is 'bx Rm'.  */
@@ -3367,7 +3367,7 @@ arm_skip_bx_reg (frame_info_ptr frame, CORE_ADDR pc)
 }
 
 static struct arm_prologue_cache *
-arm_make_stub_cache (frame_info_ptr this_frame)
+arm_make_stub_cache (const frame_info_ptr &this_frame)
 {
   struct arm_prologue_cache *cache;
 
@@ -3386,7 +3386,7 @@ arm_make_stub_cache (frame_info_ptr this_frame)
 /* Our frame ID for a stub frame is the current SP and LR.  */
 
 static void
-arm_stub_this_id (frame_info_ptr this_frame,
+arm_stub_this_id (const frame_info_ptr &this_frame,
                  void **this_cache,
                  struct frame_id *this_id)
 {
@@ -3404,7 +3404,7 @@ arm_stub_this_id (frame_info_ptr this_frame,
 
 static int
 arm_stub_unwind_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;
@@ -3442,7 +3442,7 @@ struct frame_unwind arm_stub_unwind = {
    returned.  */
 
 static struct arm_prologue_cache *
-arm_m_exception_cache (frame_info_ptr this_frame)
+arm_m_exception_cache (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
@@ -3828,7 +3828,7 @@ arm_m_exception_cache (frame_info_ptr this_frame)
 /* Implementation of the stop_reason hook for arm_m_exception frames.  */
 
 static enum unwind_stop_reason
-arm_m_exception_frame_unwind_stop_reason (frame_info_ptr this_frame,
+arm_m_exception_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                          void **this_cache)
 {
   struct arm_prologue_cache *cache;
@@ -3850,7 +3850,7 @@ arm_m_exception_frame_unwind_stop_reason (frame_info_ptr this_frame,
    'struct frame_uwnind'.  */
 
 static void
-arm_m_exception_this_id (frame_info_ptr this_frame,
+arm_m_exception_this_id (const frame_info_ptr &this_frame,
                         void **this_cache,
                         struct frame_id *this_id)
 {
@@ -3871,7 +3871,7 @@ arm_m_exception_this_id (frame_info_ptr this_frame,
    'struct frame_uwnind'.  */
 
 static struct value *
-arm_m_exception_prev_register (frame_info_ptr this_frame,
+arm_m_exception_prev_register (const frame_info_ptr &this_frame,
                               void **this_cache,
                               int prev_regnum)
 {
@@ -3936,7 +3936,7 @@ arm_m_exception_prev_register (frame_info_ptr this_frame,
 
 static int
 arm_m_exception_unwind_sniffer (const struct frame_unwind *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -3964,7 +3964,7 @@ struct frame_unwind arm_m_exception_unwind =
 };
 
 static CORE_ADDR
-arm_normal_frame_base (frame_info_ptr this_frame, void **this_cache)
+arm_normal_frame_base (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct arm_prologue_cache *cache;
 
@@ -3997,7 +3997,7 @@ struct arm_dwarf2_prev_register_cache
 };
 
 static struct value *
-arm_dwarf2_prev_register (frame_info_ptr this_frame, void **this_cache,
+arm_dwarf2_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                          int regnum)
 {
   struct gdbarch * gdbarch = get_frame_arch (this_frame);
@@ -4897,7 +4897,7 @@ print_fpu_flags (struct ui_file *file, int flags)
    (if present) or emulator.  */
 static void
 arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
-                     frame_info_ptr frame, const char *args)
+                     const frame_info_ptr &frame, const char *args)
 {
   unsigned long status = get_frame_register_unsigned (frame, ARM_FPS_REGNUM);
   int type;
@@ -5244,7 +5244,7 @@ static const unsigned char op_lit0 = DW_OP_lit0;
 static void
 arm_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)
 {
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
 
@@ -9343,7 +9343,7 @@ arm_return_value (struct gdbarch *gdbarch, struct value *function,
 
 
 static int
-arm_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+arm_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
@@ -9415,7 +9415,7 @@ arm_is_sgstubs_section (struct obj_section *sec)
    return the target PC.  Otherwise return 0.  */
 
 CORE_ADDR
-arm_skip_stub (frame_info_ptr frame, CORE_ADDR pc)
+arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   const char *name;
   int namelen;
@@ -9821,7 +9821,7 @@ arm_neon_quad_read (struct gdbarch *gdbarch, readable_regcache *regcache,
    register, in [0, 15].  */
 
 static value *
-arm_neon_quad_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
+arm_neon_quad_read_value (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                          int pseudo_reg_num, int quad_reg_index)
 {
   std::string raw_reg_name = string_printf ("d%d", quad_reg_index << 1);
@@ -9836,7 +9836,7 @@ arm_neon_quad_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
 /* Read the contents of the MVE pseudo register REGNUM and return it as a
    value.  */
 static value *
-arm_mve_pseudo_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
+arm_mve_pseudo_read_value (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                           int pseudo_reg_num)
 {
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
@@ -9847,7 +9847,7 @@ arm_mve_pseudo_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
 }
 
 static value *
-arm_pseudo_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
+arm_pseudo_read_value (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                       const int pseudo_reg_num)
 {
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
@@ -9909,7 +9909,7 @@ arm_neon_quad_write (struct gdbarch *gdbarch, struct regcache *regcache,
 }
 
 static void
-arm_neon_quad_write (gdbarch *gdbarch, frame_info_ptr next_frame,
+arm_neon_quad_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                     int quad_reg_index, gdb::array_view<const gdb_byte> buf)
 {
   std::string raw_reg_name = string_printf ("d%d", quad_reg_index << 1);
@@ -9923,7 +9923,7 @@ arm_neon_quad_write (gdbarch *gdbarch, frame_info_ptr next_frame,
 /* Store the contents of BUF to the MVE pseudo register REGNUM.  */
 
 static void
-arm_mve_pseudo_write (gdbarch *gdbarch, frame_info_ptr next_frame,
+arm_mve_pseudo_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                      int pseudo_reg_num, gdb::array_view<const gdb_byte> buf)
 {
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
@@ -9933,7 +9933,7 @@ arm_mve_pseudo_write (gdbarch *gdbarch, frame_info_ptr next_frame,
 }
 
 static void
-arm_pseudo_write (gdbarch *gdbarch, frame_info_ptr next_frame,
+arm_pseudo_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                  const int pseudo_reg_num,
                  gdb::array_view<const gdb_byte> buf)
 {
@@ -9973,7 +9973,7 @@ arm_pseudo_write (gdbarch *gdbarch, frame_info_ptr next_frame,
 }
 
 static struct value *
-value_of_arm_user_reg (frame_info_ptr frame, const void *baton)
+value_of_arm_user_reg (const frame_info_ptr &frame, const void *baton)
 {
   const int *reg_p = (const int *) baton;
   return value_of_register (*reg_p, get_next_frame_sentinel_okay (frame));
@@ -10067,7 +10067,7 @@ arm_register_g_packet_guesses (struct gdbarch *gdbarch)
 /* Implement the code_of_frame_writable gdbarch method.  */
 
 static int
-arm_code_of_frame_writable (struct gdbarch *gdbarch, frame_info_ptr frame)
+arm_code_of_frame_writable (struct gdbarch *gdbarch, const frame_info_ptr &frame)
 {
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
 
@@ -10095,7 +10095,7 @@ arm_gnu_triplet_regexp (struct gdbarch *gdbarch)
 /* Implement the "get_pc_address_flags" gdbarch method.  */
 
 static std::string
-arm_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc)
+arm_get_pc_address_flags (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   if (get_frame_pc_masked (frame))
     return "PAC";
index 506387b529defc8bf1ff7605af86a5b5227cc2f3..11839b0ff4d0fd6492e93b0897bac2d42eea4a0e 100644 (file)
@@ -279,7 +279,7 @@ extern void
                       arm_displaced_step_copy_insn_closure *dsc, int regno,
                       ULONGEST val, enum pc_write_style write_pc);
 
-CORE_ADDR arm_skip_stub (frame_info_ptr, CORE_ADDR);
+CORE_ADDR arm_skip_stub (const frame_info_ptr &, CORE_ADDR);
 
 ULONGEST arm_get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
                                                        int len,
@@ -292,7 +292,7 @@ int arm_get_next_pcs_is_thumb (struct arm_get_next_pcs *self);
 
 std::vector<CORE_ADDR> arm_software_single_step (struct regcache *);
 int arm_is_thumb (struct regcache *regcache);
-int arm_frame_is_thumb (frame_info_ptr frame);
+int arm_frame_is_thumb (const frame_info_ptr &frame);
 
 extern void arm_displaced_step_fixup (struct gdbarch *,
                                      displaced_step_copy_insn_closure *,
index a31da71de082806a7299549966fe1381d5499239..b722851e7e1a616ce7a9c97139f8c8682ab4af16 100644 (file)
@@ -36,7 +36,7 @@ static const gdb_byte arm_wince_thumb_le_breakpoint[] = { 0xfe, 0xdf };
 #define ARM_WINCE_JB_PC                        10
 
 static CORE_ADDR
-arm_pe_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+arm_pe_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 63b45be7563d709e1edef694e7242b1784609636..2d38f41cd7fa2b56bcbb1d233a132a20aaca5ff0 100644 (file)
@@ -979,7 +979,7 @@ avr_return_value (struct gdbarch *gdbarch, struct value *function,
    for it IS the sp for the next frame.  */
 
 static struct avr_unwind_cache *
-avr_frame_unwind_cache (frame_info_ptr this_frame,
+avr_frame_unwind_cache (const frame_info_ptr &this_frame,
                        void **this_prologue_cache)
 {
   CORE_ADDR start_pc, current_pc;
@@ -1059,7 +1059,7 @@ avr_frame_unwind_cache (frame_info_ptr this_frame,
 }
 
 static CORE_ADDR
-avr_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+avr_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   ULONGEST pc;
 
@@ -1069,7 +1069,7 @@ avr_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 }
 
 static CORE_ADDR
-avr_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+avr_unwind_sp (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   ULONGEST sp;
 
@@ -1082,7 +1082,7 @@ avr_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-avr_frame_this_id (frame_info_ptr this_frame,
+avr_frame_this_id (const frame_info_ptr &this_frame,
                   void **this_prologue_cache,
                   struct frame_id *this_id)
 {
@@ -1107,7 +1107,7 @@ avr_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-avr_frame_prev_register (frame_info_ptr this_frame,
+avr_frame_prev_register (const frame_info_ptr &this_frame,
                         void **this_prologue_cache, int regnum)
 {
   struct avr_unwind_cache *info
@@ -1166,7 +1166,7 @@ static const struct frame_unwind avr_frame_unwind = {
 };
 
 static CORE_ADDR
-avr_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+avr_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct avr_unwind_cache *info
     = avr_frame_unwind_cache (this_frame, this_cache);
@@ -1186,7 +1186,7 @@ static const struct frame_base avr_frame_base = {
    save_dummy_frame_tos(), and the PC match the dummy frame's breakpoint.  */
 
 static struct frame_id
-avr_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+avr_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   ULONGEST base;
 
index 35fdf3f2acb5ef6e4c5f23a4492b8e6c1715d4c4..31aa14765ae84ec8bfd19a0d16816dc54de7d2b2 100644 (file)
@@ -95,7 +95,7 @@ static const int bfin_linux_sigcontext_reg_offset[BFIN_NUM_REGS] =
 
 static void
 bfin_linux_sigframe_init (const struct tramp_frame *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          struct trad_frame_cache *this_cache,
                          CORE_ADDR func)
 {
index 877fd94d7df0953e948080e191ce4b46efb18fe5..357866ef95327581c5d03e3fe56235b7d2342376 100644 (file)
@@ -288,7 +288,7 @@ bfin_alloc_frame_cache (void)
 }
 
 static struct bfin_frame_cache *
-bfin_frame_cache (frame_info_ptr this_frame, void **this_cache)
+bfin_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct bfin_frame_cache *cache;
   int i;
@@ -340,7 +340,7 @@ bfin_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-bfin_frame_this_id (frame_info_ptr this_frame,
+bfin_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_cache,
                    struct frame_id *this_id)
 {
@@ -355,7 +355,7 @@ bfin_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-bfin_frame_prev_register (frame_info_ptr this_frame,
+bfin_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_cache,
                          int regnum)
 {
@@ -724,7 +724,7 @@ bfin_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
 }
 
 static CORE_ADDR
-bfin_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+bfin_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct bfin_frame_cache *cache = bfin_frame_cache (this_frame, this_cache);
 
@@ -732,7 +732,7 @@ bfin_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 }
 
 static CORE_ADDR
-bfin_frame_local_address (frame_info_ptr this_frame, void **this_cache)
+bfin_frame_local_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct bfin_frame_cache *cache = bfin_frame_cache (this_frame, this_cache);
 
@@ -740,7 +740,7 @@ bfin_frame_local_address (frame_info_ptr this_frame, void **this_cache)
 }
 
 static CORE_ADDR
-bfin_frame_args_address (frame_info_ptr this_frame, void **this_cache)
+bfin_frame_args_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct bfin_frame_cache *cache = bfin_frame_cache (this_frame, this_cache);
 
index 6076ad64a4a89229a701a5675107273e92641352..451818332de36b1d96e81f61638ed4b3f9e002e6 100644 (file)
@@ -52,7 +52,7 @@
    slot instruction.  */
 
 const struct block *
-get_frame_block (frame_info_ptr frame, CORE_ADDR *addr_in_block)
+get_frame_block (const frame_info_ptr &frame, CORE_ADDR *addr_in_block)
 {
   CORE_ADDR pc;
   const struct block *bl;
@@ -115,7 +115,7 @@ get_pc_function_start (CORE_ADDR pc)
 /* Return the symbol for the function executing in frame FRAME.  */
 
 struct symbol *
-get_frame_function (frame_info_ptr frame)
+get_frame_function (const frame_info_ptr &frame)
 {
   const struct block *bl = get_frame_block (frame, 0);
 
index 4409a1e696c9fba1382922c93ade9f968ce8b665..1b3f3e72c5b7b11b3aaac8030fd6991c01343a4c 100644 (file)
@@ -154,7 +154,7 @@ bpf_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 /* Given THIS_FRAME, return its ID.  */
 
 static void
-bpf_frame_this_id (frame_info_ptr this_frame,
+bpf_frame_this_id (const frame_info_ptr &this_frame,
                   void **this_prologue_cache,
                   struct frame_id *this_id)
 {
@@ -165,7 +165,7 @@ bpf_frame_this_id (frame_info_ptr this_frame,
 /* Return the reason why we can't unwind past THIS_FRAME.  */
 
 static enum unwind_stop_reason
-bpf_frame_unwind_stop_reason (frame_info_ptr this_frame,
+bpf_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                              void **this_cache)
 {
   return UNWIND_OUTERMOST;
@@ -174,7 +174,7 @@ bpf_frame_unwind_stop_reason (frame_info_ptr this_frame,
 /* Ask THIS_FRAME to unwind its register.  */
 
 static struct value *
-bpf_frame_prev_register (frame_info_ptr this_frame,
+bpf_frame_prev_register (const frame_info_ptr &this_frame,
                         void **this_prologue_cache, int regnum)
 {
   return frame_unwind_got_register (this_frame, regnum, regnum);
@@ -235,7 +235,7 @@ bpf_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 /* Assuming THIS_FRAME is a dummy frame, return its frame ID.  */
 
 static struct frame_id
-bpf_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+bpf_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR sp = get_frame_register_unsigned (this_frame,
                                              gdbarch_sp_regnum (gdbarch));
index a6de59bf292ace9cea8faa9862f43cf12b924bf6..882c1a03fe291573b72f9fab07033fd99ccc3475 100644 (file)
@@ -153,7 +153,7 @@ cplus_make_method_ptr (struct type *type, gdb_byte *contents,
 }
 
 CORE_ADDR
-cplus_skip_trampoline (frame_info_ptr frame,
+cplus_skip_trampoline (const frame_info_ptr &frame,
                       CORE_ADDR stop_pc)
 {
   if (current_cp_abi.skip_trampoline == NULL)
index a993e1dd18a0f654604fd6c70a0ed0f2ba650341..fdbe48431290dc73894f9a43e596a675d3b15670 100644 (file)
@@ -204,7 +204,7 @@ extern std::string cplus_typename_from_type_info (struct value *value);
    address of the routine we are thunking to and continue to there
    instead.  */
 
-CORE_ADDR cplus_skip_trampoline (frame_info_ptr frame,
+CORE_ADDR cplus_skip_trampoline (const frame_info_ptr &frame,
                                 CORE_ADDR stop_pc);
 
 /* Return a struct that provides pass-by-reference information
@@ -247,7 +247,7 @@ struct cp_abi_ops
   struct type *(*get_typeid_type) (struct gdbarch *gdbarch);
   struct type *(*get_type_from_type_info) (struct value *value);
   std::string (*get_typename_from_type_info) (struct value *value);
-  CORE_ADDR (*skip_trampoline) (frame_info_ptr, CORE_ADDR);
+  CORE_ADDR (*skip_trampoline) (const frame_info_ptr &, CORE_ADDR);
   struct language_pass_by_ref_info (*pass_by_reference) (struct type *type);
 };
 
index 1f108740ad21593442a36fe72df73561269109f0..02c35da723d45c79537505b76649a01826fe59f5 100644 (file)
@@ -193,7 +193,7 @@ static const unsigned short rt_sigtramp_code[] =
    the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-cris_sigtramp_start (frame_info_ptr this_frame)
+cris_sigtramp_start (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   gdb_byte buf[SIGTRAMP_LEN];
@@ -221,7 +221,7 @@ cris_sigtramp_start (frame_info_ptr this_frame)
    the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-cris_rt_sigtramp_start (frame_info_ptr this_frame)
+cris_rt_sigtramp_start (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   gdb_byte buf[SIGTRAMP_LEN];
@@ -249,7 +249,7 @@ cris_rt_sigtramp_start (frame_info_ptr this_frame)
    return the address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-cris_sigcontext_addr (frame_info_ptr this_frame)
+cris_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -309,7 +309,7 @@ struct cris_unwind_cache
 };
 
 static struct cris_unwind_cache *
-cris_sigtramp_frame_unwind_cache (frame_info_ptr this_frame,
+cris_sigtramp_frame_unwind_cache (const frame_info_ptr &this_frame,
                                  void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -402,7 +402,7 @@ cris_sigtramp_frame_unwind_cache (frame_info_ptr this_frame,
 }
 
 static void
-cris_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+cris_sigtramp_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                             struct frame_id *this_id)
 {
   struct cris_unwind_cache *cache =
@@ -412,10 +412,10 @@ cris_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 
 /* Forward declaration.  */
 
-static struct value *cris_frame_prev_register (frame_info_ptr this_frame,
+static struct value *cris_frame_prev_register (const frame_info_ptr &this_frame,
                                               void **this_cache, int regnum);
 static struct value *
-cris_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+cris_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache, int regnum)
 {
   /* Make sure we've initialized the cache.  */
@@ -425,7 +425,7 @@ cris_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 cris_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_cache)
 {
   if (cris_sigtramp_start (this_frame) 
@@ -448,7 +448,7 @@ static const struct frame_unwind cris_sigtramp_frame_unwind =
 
 static int
 crisv32_single_step_through_delay (struct gdbarch *gdbarch,
-                                  frame_info_ptr this_frame)
+                                  const frame_info_ptr &this_frame)
 {
   cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
   ULONGEST erp;
@@ -645,11 +645,11 @@ static void set_cris_dwarf2_cfi (const char *ignore_args, int from_tty,
                                 struct cmd_list_element *c);
 
 static CORE_ADDR cris_scan_prologue (CORE_ADDR pc, 
-                                    frame_info_ptr this_frame,
+                                    const frame_info_ptr &this_frame,
                                     struct cris_unwind_cache *info);
 
 static CORE_ADDR crisv32_scan_prologue (CORE_ADDR pc, 
-                                       frame_info_ptr this_frame,
+                                       const frame_info_ptr &this_frame,
                                        struct cris_unwind_cache *info);
 
 /* When arguments must be pushed onto the stack, they go on in reverse
@@ -692,7 +692,7 @@ pop_stack_item (struct cris_stack_item *si)
    for it IS the sp for the next frame.  */
 
 static struct cris_unwind_cache *
-cris_frame_unwind_cache (frame_info_ptr this_frame,
+cris_frame_unwind_cache (const frame_info_ptr &this_frame,
                         void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -729,7 +729,7 @@ cris_frame_unwind_cache (frame_info_ptr this_frame,
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-cris_frame_this_id (frame_info_ptr this_frame,
+cris_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_prologue_cache,
                    struct frame_id *this_id)
 {
@@ -755,7 +755,7 @@ cris_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-cris_frame_prev_register (frame_info_ptr this_frame,
+cris_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_prologue_cache, int regnum)
 {
   struct cris_unwind_cache *info
@@ -912,7 +912,7 @@ static const struct frame_unwind cris_frame_unwind =
 };
 
 static CORE_ADDR
-cris_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+cris_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct cris_unwind_cache *info
     = cris_frame_unwind_cache (this_frame, this_cache);
@@ -1004,7 +1004,7 @@ static const struct frame_base cris_frame_base =
    determine that it is a prologue (1).  */
 
 static CORE_ADDR 
-cris_scan_prologue (CORE_ADDR pc, frame_info_ptr this_frame,
+cris_scan_prologue (CORE_ADDR pc, const frame_info_ptr &this_frame,
                    struct cris_unwind_cache *info)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1287,7 +1287,7 @@ cris_scan_prologue (CORE_ADDR pc, frame_info_ptr this_frame,
 }
 
 static CORE_ADDR 
-crisv32_scan_prologue (CORE_ADDR pc, frame_info_ptr this_frame,
+crisv32_scan_prologue (CORE_ADDR pc, const frame_info_ptr &this_frame,
                    struct cris_unwind_cache *info)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1756,7 +1756,7 @@ cris_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 static void
 cris_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 return address column.  */
   if (regnum == gdbarch_pc_regnum (gdbarch))
index d3105dc5475350fa0b2f05204a64b14f72dd2c6c..d485f17631786275d92c133b545d6e0444235cb1 100644 (file)
@@ -310,7 +310,7 @@ csky_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
 
 static void
 csky_linux_rt_sigreturn_init (const struct tramp_frame *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              struct trad_frame_cache *this_cache,
                              CORE_ADDR func)
 {
@@ -355,7 +355,7 @@ csky_linux_rt_sigreturn_tramp_frame = {
 
 static void
 csky_linux_rt_sigreturn_init_pt_regs (const struct tramp_frame *self,
-                                     frame_info_ptr this_frame,
+                                     const frame_info_ptr &this_frame,
                                      struct trad_frame_cache *this_cache,
                                      CORE_ADDR func)
 {
index 2aa6c0abcb857dd6e65e02b8ec992539fec7af53..c1ce8a5b02cec3c05fa56246691c2a0ce95da099 100644 (file)
@@ -958,7 +958,7 @@ csky_analyze_prologue (struct gdbarch *gdbarch,
                       CORE_ADDR start_pc,
                       CORE_ADDR limit_pc,
                       CORE_ADDR end_pc,
-                      frame_info_ptr this_frame,
+                      const frame_info_ptr &this_frame,
                       struct csky_unwind_cache *this_cache,
                       lr_type_t lr_type)
 {
@@ -2063,7 +2063,7 @@ csky_analyze_lr_type (struct gdbarch *gdbarch,
 /* Heuristic unwinder.  */
 
 static struct csky_unwind_cache *
-csky_frame_unwind_cache (frame_info_ptr this_frame)
+csky_frame_unwind_cache (const frame_info_ptr &this_frame)
 {
   CORE_ADDR prologue_start, prologue_end, func_end, prev_pc, block_addr;
   struct csky_unwind_cache *cache;
@@ -2122,7 +2122,7 @@ csky_frame_unwind_cache (frame_info_ptr this_frame)
 /* Implement the this_id function for the normal unwinder.  */
 
 static void
-csky_frame_this_id (frame_info_ptr this_frame,
+csky_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_prologue_cache, struct frame_id *this_id)
 {
   struct csky_unwind_cache *cache;
@@ -2143,7 +2143,7 @@ csky_frame_this_id (frame_info_ptr this_frame,
 /* Implement the prev_register function for the normal unwinder.  */
 
 static struct value *
-csky_frame_prev_register (frame_info_ptr this_frame,
+csky_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_prologue_cache, int regnum)
 {
   struct csky_unwind_cache *cache;
@@ -2172,7 +2172,7 @@ static const struct frame_unwind csky_unwind_cache = {
 };
 
 static CORE_ADDR
-csky_check_long_branch (frame_info_ptr frame, CORE_ADDR pc)
+csky_check_long_branch (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   gdb_byte buf[8];
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -2209,7 +2209,7 @@ csky_check_long_branch (frame_info_ptr frame, CORE_ADDR pc)
 
 static int
 csky_stub_unwind_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, pc;
@@ -2240,7 +2240,7 @@ csky_stub_unwind_sniffer (const struct frame_unwind *self,
 }
 
 static struct csky_unwind_cache *
-csky_make_stub_cache (frame_info_ptr this_frame)
+csky_make_stub_cache (const frame_info_ptr &this_frame)
 {
   struct csky_unwind_cache *cache;
 
@@ -2252,7 +2252,7 @@ csky_make_stub_cache (frame_info_ptr this_frame)
 }
 
 static void
-csky_stub_this_id (frame_info_ptr this_frame,
+csky_stub_this_id (const frame_info_ptr &this_frame,
                  void **this_cache,
                  struct frame_id *this_id)
 {
@@ -2267,7 +2267,7 @@ csky_stub_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-csky_stub_prev_register (frame_info_ptr this_frame,
+csky_stub_prev_register (const frame_info_ptr &this_frame,
                            void **this_cache,
                            int prev_regnum)
 {
@@ -2307,7 +2307,7 @@ static frame_unwind csky_stub_unwind = {
    for the normal unwinder.  */
 
 static CORE_ADDR
-csky_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+csky_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct csky_unwind_cache *cache;
 
@@ -2330,7 +2330,7 @@ static const struct frame_base csky_frame_base = {
 static void
 csky_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)
 {
   if (regnum == gdbarch_pc_regnum (gdbarch))
     reg->how = DWARF2_FRAME_REG_RA;
index 8bde53ea8fd15f275a327f24b22b71666a7cc9c9..5757de1cf77d528fbd93a1efbce1465a42d7d7a7 100644 (file)
@@ -129,7 +129,7 @@ public:
 
   /* See probe.h.  */
   struct value *evaluate_argument (unsigned n,
-                                  frame_info_ptr frame) override;
+                                  const frame_info_ptr &frame) override;
 
   /* See probe.h.  */
   void compile_to_ax (struct agent_expr *aexpr,
@@ -708,7 +708,7 @@ dtrace_probe::can_evaluate_arguments () const
 
 struct value *
 dtrace_probe::evaluate_argument (unsigned n,
-                                frame_info_ptr frame)
+                                const frame_info_ptr &frame)
 {
   struct gdbarch *gdbarch = this->get_gdbarch ();
   struct dtrace_probe_arg *arg;
index 309483d95d418ab07c3ad0d60412539e25b07fd3..5969ef2cdadd8b1eb8435bebd7788b66ebfadbc5 100644 (file)
@@ -288,7 +288,7 @@ struct dummy_frame_cache
 
 static int
 dummy_frame_sniffer (const struct frame_unwind *self,
-                    frame_info_ptr this_frame,
+                    const frame_info_ptr &this_frame,
                     void **this_prologue_cache)
 {
   /* When unwinding a normal frame, the stack structure is determined
@@ -334,7 +334,7 @@ dummy_frame_sniffer (const struct frame_unwind *self,
    register value is taken from the local copy of the register buffer.  */
 
 static struct value *
-dummy_frame_prev_register (frame_info_ptr this_frame,
+dummy_frame_prev_register (const frame_info_ptr &this_frame,
                           void **this_prologue_cache,
                           int regnum)
 {
@@ -364,7 +364,7 @@ dummy_frame_prev_register (frame_info_ptr this_frame,
    dummy cache is located and saved in THIS_PROLOGUE_CACHE.  */
 
 static void
-dummy_frame_this_id (frame_info_ptr this_frame,
+dummy_frame_this_id (const frame_info_ptr &this_frame,
                     void **this_prologue_cache,
                     struct frame_id *this_id)
 {
@@ -390,7 +390,7 @@ const struct frame_unwind dummy_frame_unwind =
 /* See dummy-frame.h.  */
 
 struct frame_id
-default_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+default_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR sp, pc;
 
index 753be1aa54c46728ae0c25b76f2510a5b57e2b52..7d963ad9beb6b4ec1505e331ab10167e69bcb31c 100644 (file)
@@ -78,6 +78,6 @@ extern int find_dummy_frame_dtor (dummy_frame_dtor_ftype *dtor,
    for THIS_FRAME assuming that the frame is a dummy frame.  */
 
 extern struct frame_id default_dummy_id (struct gdbarch *gdbarch,
-                                        frame_info_ptr this_frame);
+                                        const frame_info_ptr &this_frame);
 
 #endif /* !defined (DUMMY_FRAME_H)  */
index 1a0bc1d528e2b59fe7f8ade829675eb1a5b02996..065e2b90a0f4b946fbd43f70ad2833e5790f1918 100644 (file)
@@ -32,7 +32,7 @@ get_imported_name (const struct symbol *sym)
 /* Implement the read_variable method from symbol_computed_ops.  */
 
 static struct value *
-ada_imported_read_variable (struct symbol *symbol, frame_info_ptr frame)
+ada_imported_read_variable (struct symbol *symbol, const frame_info_ptr &frame)
 {
   const char *name = get_imported_name (symbol);
   bound_minimal_symbol minsym = lookup_minimal_symbol_linkage (name, false);
index 5434c845260678dfdb2cfb5b68202becc3992ffa..0a0c7e83b8133586bd55bac628214441a205f5e7 100644 (file)
@@ -94,7 +94,7 @@ struct call_site_target
 
   void iterate_over_addresses (struct gdbarch *call_site_gdbarch,
                               const struct call_site *call_site,
-                              frame_info_ptr caller_frame,
+                              const frame_info_ptr &caller_frame,
                               iterate_ftype callback) const;
 
 private:
@@ -201,7 +201,7 @@ struct call_site
      throw NO_ENTRY_VALUE_ERROR.  */
 
   void iterate_over_addresses (struct gdbarch *call_site_gdbarch,
-                              frame_info_ptr caller_frame,
+                              const frame_info_ptr &caller_frame,
                               call_site_target::iterate_ftype callback)
     const
   {
index 9cfae104f31c398c6e6c8cc7d1ad8ce07274889e..d0256e7009d9c013e010c082cd9ba1c2ae95215e 100644 (file)
@@ -49,7 +49,7 @@ static const registry<gdbarch>::key<dwarf_gdbarch_types> dwarf_arch_cookie;
 /* Ensure that a FRAME is defined, throw an exception otherwise.  */
 
 static void
-ensure_have_frame (frame_info_ptr frame, const char *op_name)
+ensure_have_frame (const frame_info_ptr &frame, const char *op_name)
 {
   if (frame == nullptr)
     throw_error (GENERIC_ERROR,
@@ -78,7 +78,7 @@ bits_to_bytes (ULONGEST start, ULONGEST n_bits)
 /* See expr.h.  */
 
 CORE_ADDR
-read_addr_from_reg (frame_info_ptr frame, int reg)
+read_addr_from_reg (const frame_info_ptr &frame, int reg)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   int regnum = dwarf_reg_to_regnum_or_error (gdbarch, reg);
@@ -112,7 +112,7 @@ static piece_closure *
 allocate_piece_closure (dwarf2_per_cu_data *per_cu,
                        dwarf2_per_objfile *per_objfile,
                        std::vector<dwarf_expr_piece> &&pieces,
-                       frame_info_ptr frame)
+                       const frame_info_ptr &frame)
 {
   piece_closure *c = new piece_closure;
 
@@ -1076,7 +1076,7 @@ dwarf_expr_context::fetch_result (struct type *type, struct type *subobj_type,
 
 value *
 dwarf_expr_context::evaluate (const gdb_byte *addr, size_t len, bool as_lval,
-                             dwarf2_per_cu_data *per_cu, frame_info_ptr frame,
+                             dwarf2_per_cu_data *per_cu, const frame_info_ptr &frame,
                              const struct property_addr_info *addr_info,
                              struct type *type, struct type *subobj_type,
                              LONGEST subobj_offset)
index 6acd07811f85fa96bac12615c7005fbf0cd8c10a..b02cc53164065433d14d472b77a5a337125d10b9 100644 (file)
@@ -137,7 +137,7 @@ struct dwarf_expr_context
      The ADDR_INFO property can be specified to override the range of
      memory addresses with the passed in buffer.  */
   value *evaluate (const gdb_byte *addr, size_t len, bool as_lval,
-                  dwarf2_per_cu_data *per_cu, frame_info_ptr frame,
+                  dwarf2_per_cu_data *per_cu, const frame_info_ptr &frame,
                   const struct property_addr_info *addr_info = nullptr,
                   struct type *type = nullptr,
                   struct type *subobj_type = nullptr,
@@ -256,7 +256,7 @@ private:
 
 /* Return the value of register number REG (a DWARF register number),
    read as an address in a given FRAME.  */
-CORE_ADDR read_addr_from_reg (frame_info_ptr frame, int reg);
+CORE_ADDR read_addr_from_reg (const frame_info_ptr &frame, int reg);
 
 void dwarf_expr_require_composition (const gdb_byte *, const gdb_byte *,
                                     const char *);
index 27a820a6168f03e9e0ab4190d3720e0bf9bd2b9e..2f6400d62c388faab05351e9682e20493105163e 100644 (file)
@@ -90,7 +90,7 @@ cache_eq (const void *arg1, const void *arg2)
    tailcall_cache.  */
 
 static struct tailcall_cache *
-cache_new_ref1 (frame_info_ptr next_bottom_frame)
+cache_new_ref1 (const frame_info_ptr &next_bottom_frame)
 {
   struct tailcall_cache *cache = XCNEW (struct tailcall_cache);
   void **slot;
@@ -137,7 +137,7 @@ cache_unref (struct tailcall_cache *cache)
    return 0.  */
 
 static int
-frame_is_tailcall (frame_info_ptr fi)
+frame_is_tailcall (const frame_info_ptr &fi)
 {
   return frame_unwinder_is (fi, &dwarf2_tailcall_frame_unwind);
 }
@@ -146,12 +146,13 @@ frame_is_tailcall (frame_info_ptr fi)
    call chain.  Otherwise return NULL.  No new reference is created.  */
 
 static struct tailcall_cache *
-cache_find (frame_info_ptr fi)
+cache_find (const frame_info_ptr &initial_fi)
 {
   struct tailcall_cache *cache;
   struct tailcall_cache search;
   void **slot;
 
+  frame_info_ptr fi = initial_fi;
   while (frame_is_tailcall (fi))
     {
       fi = get_next_frame (fi);
@@ -173,7 +174,7 @@ cache_find (frame_info_ptr fi)
    If THIS_FRAME is CACHE-> NEXT_BOTTOM_FRAME return -1.  */
 
 static int
-existing_next_levels (frame_info_ptr this_frame,
+existing_next_levels (const frame_info_ptr &this_frame,
                      struct tailcall_cache *cache)
 {
   int retval = (frame_relative_level (this_frame)
@@ -210,7 +211,7 @@ pretended_chain_levels (struct call_site_chain *chain)
    Specific virtual tail call frames are tracked by INLINE_DEPTH.  */
 
 static void
-tailcall_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+tailcall_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                        struct frame_id *this_id)
 {
   struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
@@ -232,7 +233,7 @@ tailcall_frame_this_id (frame_info_ptr this_frame, void **this_cache,
    CACHE.  */
 
 static CORE_ADDR
-pretend_pc (frame_info_ptr this_frame, struct tailcall_cache *cache)
+pretend_pc (const frame_info_ptr &this_frame, struct tailcall_cache *cache)
 {
   int next_levels = existing_next_levels (this_frame, cache);
   struct call_site_chain *chain = cache->chain;
@@ -264,7 +265,7 @@ pretend_pc (frame_info_ptr this_frame, struct tailcall_cache *cache)
    frames unwind the NULL case differently.  */
 
 struct value *
-dwarf2_tailcall_prev_register_first (frame_info_ptr this_frame,
+dwarf2_tailcall_prev_register_first (const frame_info_ptr &this_frame,
                                     void **tailcall_cachep, int regnum)
 {
   struct gdbarch *this_gdbarch = get_frame_arch (this_frame);
@@ -294,7 +295,7 @@ dwarf2_tailcall_prev_register_first (frame_info_ptr this_frame,
    dwarf2_tailcall_prev_register_first.  */
 
 static struct value *
-tailcall_frame_prev_register (frame_info_ptr this_frame,
+tailcall_frame_prev_register (const frame_info_ptr &this_frame,
                               void **this_cache, int regnum)
 {
   struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
@@ -316,7 +317,7 @@ tailcall_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 tailcall_frame_sniffer (const struct frame_unwind *self,
-                        frame_info_ptr this_frame, void **this_cache)
+                        const frame_info_ptr &this_frame, void **this_cache)
 {
   frame_info_ptr next_frame;
   int next_levels;
@@ -363,7 +364,7 @@ tailcall_frame_sniffer (const struct frame_unwind *self,
    address pushed on the stack.  */
 
 void
-dwarf2_tailcall_sniffer_first (frame_info_ptr this_frame,
+dwarf2_tailcall_sniffer_first (const frame_info_ptr &this_frame,
                               void **tailcall_cachep,
                               const LONGEST *entry_cfa_sp_offsetp)
 {
@@ -458,7 +459,7 @@ tailcall_frame_dealloc_cache (frame_info *self, void *this_cache)
    call frames have gdbarch of the bottom (callee) frame.  */
 
 static struct gdbarch *
-tailcall_frame_prev_arch (frame_info_ptr this_frame,
+tailcall_frame_prev_arch (const frame_info_ptr &this_frame,
                          void **this_prologue_cache)
 {
   struct tailcall_cache *cache = (struct tailcall_cache *) *this_prologue_cache;
index b0809c8b71317705aefc2884b1e761ab134ccd5a..3f49487ac2a710bd1a5f2fc7a10033e7fd55b5cd 100644 (file)
@@ -26,12 +26,12 @@ struct frame_unwind;
 /* The tail call frame unwinder.  */
 
 extern void
-  dwarf2_tailcall_sniffer_first (frame_info_ptr this_frame,
+  dwarf2_tailcall_sniffer_first (const frame_info_ptr &this_frame,
                                 void **tailcall_cachep,
                                 const LONGEST *entry_cfa_sp_offsetp);
 
 extern struct value *
-  dwarf2_tailcall_prev_register_first (frame_info_ptr this_frame,
+  dwarf2_tailcall_prev_register_first (const frame_info_ptr &this_frame,
                                       void **tailcall_cachep, int regnum);
 
 extern const struct frame_unwind dwarf2_tailcall_frame_unwind;
index fc6704f434ee5f805ce05927ebf6c3d4ccf7d342..530513c2684e217fb0a1362f2d06a5cd2116a103 100644 (file)
@@ -233,7 +233,7 @@ register %s (#%d) at %s"),
 
 static CORE_ADDR
 execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size,
-                 frame_info_ptr this_frame, CORE_ADDR initial,
+                 const frame_info_ptr &this_frame, CORE_ADDR initial,
                  int initial_in_stack_memory, dwarf2_per_objfile *per_objfile)
 {
   dwarf_expr_context ctx (per_objfile, addr_size);
@@ -589,17 +589,17 @@ execute_cfa_program_test (struct gdbarch *gdbarch)
 static void dwarf2_frame_default_init_reg (struct gdbarch *gdbarch,
                                           int regnum,
                                           struct dwarf2_frame_state_reg *reg,
-                                          frame_info_ptr this_frame);
+                                          const frame_info_ptr &this_frame);
 
 struct dwarf2_frame_ops
 {
   /* Pre-initialize the register state REG for register REGNUM.  */
   void (*init_reg) (struct gdbarch *, int, struct dwarf2_frame_state_reg *,
-                   frame_info_ptr)
+                   const frame_info_ptr &)
     = dwarf2_frame_default_init_reg;
 
   /* Check whether the THIS_FRAME is a signal trampoline.  */
-  int (*signal_frame_p) (struct gdbarch *, frame_info_ptr) = nullptr;
+  int (*signal_frame_p) (struct gdbarch *, const frame_info_ptr &) = nullptr;
 
   /* Convert .eh_frame register number to DWARF register number, or
      adjust .debug_frame register number.  */
@@ -625,7 +625,7 @@ get_frame_ops (struct gdbarch *gdbarch)
 static void
 dwarf2_frame_default_init_reg (struct gdbarch *gdbarch, int regnum,
                               struct dwarf2_frame_state_reg *reg,
-                              frame_info_ptr this_frame)
+                              const frame_info_ptr &this_frame)
 {
   /* If we have a register that acts as a program counter, mark it as
      a destination for the return address.  If we have a register that
@@ -666,7 +666,7 @@ void
 dwarf2_frame_set_init_reg (struct gdbarch *gdbarch,
                           void (*init_reg) (struct gdbarch *, int,
                                             struct dwarf2_frame_state_reg *,
-                                            frame_info_ptr))
+                                            const frame_info_ptr &))
 {
   struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch);
 
@@ -678,7 +678,7 @@ dwarf2_frame_set_init_reg (struct gdbarch *gdbarch,
 static void
 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)
 {
   struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch);
 
@@ -691,7 +691,7 @@ dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
 void
 dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
                                 int (*signal_frame_p) (struct gdbarch *,
-                                                       frame_info_ptr))
+                                                       const frame_info_ptr &))
 {
   struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch);
 
@@ -703,7 +703,7 @@ dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
 
 static int
 dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch,
-                            frame_info_ptr this_frame)
+                            const frame_info_ptr &this_frame)
 {
   struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch);
 
@@ -890,7 +890,7 @@ struct dwarf2_frame_cache
 };
 
 static struct dwarf2_frame_cache *
-dwarf2_frame_cache (frame_info_ptr this_frame, void **this_cache)
+dwarf2_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   const int num_regs = gdbarch_num_cooked_regs (gdbarch);
@@ -1120,7 +1120,7 @@ incomplete CFI data; unspecified registers (e.g., %s) at %s"),
 }
 
 static enum unwind_stop_reason
-dwarf2_frame_unwind_stop_reason (frame_info_ptr this_frame,
+dwarf2_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                 void **this_cache)
 {
   struct dwarf2_frame_cache *cache
@@ -1136,7 +1136,7 @@ dwarf2_frame_unwind_stop_reason (frame_info_ptr this_frame,
 }
 
 static void
-dwarf2_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+dwarf2_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                      struct frame_id *this_id)
 {
   struct dwarf2_frame_cache *cache =
@@ -1151,7 +1151,7 @@ dwarf2_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-dwarf2_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+dwarf2_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                            int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1253,7 +1253,7 @@ dwarf2_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
 /* See frame.h.  */
 
 void *
-dwarf2_frame_get_fn_data (frame_info_ptr this_frame, void **this_cache,
+dwarf2_frame_get_fn_data (const frame_info_ptr &this_frame, void **this_cache,
                          fn_prev_register cookie)
 {
   struct dwarf2_frame_fn_data *fn_data = nullptr;
@@ -1271,7 +1271,7 @@ dwarf2_frame_get_fn_data (frame_info_ptr this_frame, void **this_cache,
 /* See frame.h.  */
 
 void *
-dwarf2_frame_allocate_fn_data (frame_info_ptr this_frame, void **this_cache,
+dwarf2_frame_allocate_fn_data (const frame_info_ptr &this_frame, void **this_cache,
                               fn_prev_register cookie, unsigned long size)
 {
   struct dwarf2_frame_fn_data *fn_data = nullptr;
@@ -1307,7 +1307,7 @@ dwarf2_frame_dealloc_cache (frame_info *self, void *this_cache)
 
 static int
 dwarf2_frame_sniffer (const struct frame_unwind *self,
-                     frame_info_ptr this_frame, void **this_cache)
+                     const frame_info_ptr &this_frame, void **this_cache)
 {
   if (!dwarf2_frame_unwinders_enabled_p)
     return 0;
@@ -1383,7 +1383,7 @@ dwarf2_append_unwinders (struct gdbarch *gdbarch)
    response to the "info frame" command.  */
 
 static CORE_ADDR
-dwarf2_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+dwarf2_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct dwarf2_frame_cache *cache =
     dwarf2_frame_cache (this_frame, this_cache);
@@ -1400,7 +1400,7 @@ static const struct frame_base dwarf2_frame_base =
 };
 
 const struct frame_base *
-dwarf2_frame_base_sniffer (frame_info_ptr this_frame)
+dwarf2_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
 
@@ -1415,8 +1415,10 @@ dwarf2_frame_base_sniffer (frame_info_ptr this_frame)
    DW_OP_call_frame_cfa.  */
 
 CORE_ADDR
-dwarf2_frame_cfa (frame_info_ptr this_frame)
+dwarf2_frame_cfa (const frame_info_ptr &initial_this_frame)
 {
+  frame_info_ptr this_frame = initial_this_frame;
+
   if (frame_unwinder_is (this_frame, &record_btrace_tailcall_frame_unwind)
       || frame_unwinder_is (this_frame, &record_btrace_frame_unwind))
     throw_error (NOT_AVAILABLE_ERROR,
index 1ef35ee29482ae9822fb7d025a66770b2f896be0..2167310fbdf09b4339f70dcc159f5fee41b7d2e6 100644 (file)
@@ -66,7 +66,7 @@ enum dwarf2_frame_reg_rule
 
 /* Register state.  */
 
-typedef struct value *(*fn_prev_register) (frame_info_ptr this_frame,
+typedef struct value *(*fn_prev_register) (const frame_info_ptr &this_frame,
                                           void **this_cache, int regnum);
 
 struct dwarf2_frame_state_reg
@@ -207,18 +207,17 @@ extern bool dwarf2_frame_unwinders_enabled_p;
 /* Set the architecture-specific register state initialization
    function for GDBARCH to INIT_REG.  */
 
-extern void dwarf2_frame_set_init_reg (struct gdbarch *gdbarch,
-                                      void (*init_reg) (struct gdbarch *, int,
-                                            struct dwarf2_frame_state_reg *,
-                                            frame_info_ptr));
+extern void dwarf2_frame_set_init_reg (
+  gdbarch *gdbarch, void (*init_reg) (struct gdbarch *, int,
+                                     dwarf2_frame_state_reg *,
+                                     const frame_info_ptr &));
 
 /* Set the architecture-specific signal trampoline recognition
    function for GDBARCH to SIGNAL_FRAME_P.  */
 
-extern void
-  dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
-                                  int (*signal_frame_p) (struct gdbarch *,
-                                                         frame_info_ptr));
+extern void dwarf2_frame_set_signal_frame_p
+  (gdbarch *gdbarch, int (*signal_frame_p) (struct gdbarch *,
+                         const frame_info_ptr &));
 
 /* Set the architecture-specific adjustment of .eh_frame and .debug_frame
    register numbers.  */
@@ -236,11 +235,11 @@ void dwarf2_append_unwinders (struct gdbarch *gdbarch);
    NULL if it can't be handled by the DWARF CFI frame unwinder.  */
 
 extern const struct frame_base *
-  dwarf2_frame_base_sniffer (frame_info_ptr this_frame);
+  dwarf2_frame_base_sniffer (const frame_info_ptr &this_frame);
 
 /* Compute the DWARF CFA for a frame.  */
 
-CORE_ADDR dwarf2_frame_cfa (frame_info_ptr this_frame);
+CORE_ADDR dwarf2_frame_cfa (const frame_info_ptr &this_frame);
 
 /* Find the CFA information for PC.
 
@@ -276,7 +275,7 @@ extern int dwarf2_fetch_cfa_info (struct gdbarch *gdbarch, CORE_ADDR pc,
    COOKIE is the key for the prev_function implementation.
    SIZE is the size of the custom data object to allocate.  */
 
-extern void *dwarf2_frame_allocate_fn_data (frame_info_ptr this_frame,
+extern void *dwarf2_frame_allocate_fn_data (const frame_info_ptr &this_frame,
                                            void **this_cache,
                                            fn_prev_register cookie,
                                            unsigned long size);
@@ -291,7 +290,7 @@ extern void *dwarf2_frame_allocate_fn_data (frame_info_ptr this_frame,
    THIS_CACHE is the dwarf2 cache object to store the pointer on.
    COOKIE is the key for the prev_function implementation.  */
 
-extern void *dwarf2_frame_get_fn_data (frame_info_ptr this_frame,
+extern void *dwarf2_frame_get_fn_data (const frame_info_ptr &this_frame,
                                       void **this_cache,
                                       fn_prev_register cookie);
 
index 0f0d14fad3ff100e9f5e5d758d4a8a71170f9b61..203ad536162a52275d12de6bb1419b93b89d0759 100644 (file)
@@ -48,7 +48,7 @@
 #include "gdbsupport/byte-vector.h"
 
 static struct value *dwarf2_evaluate_loc_desc_full
-  (struct type *type, frame_info_ptr frame, const gdb_byte *data,
+  (struct type *type, const frame_info_ptr &frame, const gdb_byte *data,
    size_t size, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile,
    struct type *subobj_type, LONGEST subobj_byte_offset, bool as_lval = true);
 
@@ -503,7 +503,7 @@ locexpr_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
    LOC_BLOCK functions using a DWARF expression as its DW_AT_frame_base.  */
 
 static CORE_ADDR
-locexpr_get_frame_base (struct symbol *framefunc, frame_info_ptr frame)
+locexpr_get_frame_base (struct symbol *framefunc, const frame_info_ptr &frame)
 {
   struct gdbarch *gdbarch;
   struct type *type;
@@ -561,7 +561,7 @@ loclist_find_frame_base_location (struct symbol *framefunc, CORE_ADDR pc,
    LOC_BLOCK functions using a DWARF location list as its DW_AT_frame_base.  */
 
 static CORE_ADDR
-loclist_get_frame_base (struct symbol *framefunc, frame_info_ptr frame)
+loclist_get_frame_base (struct symbol *framefunc, const frame_info_ptr &frame)
 {
   struct gdbarch *gdbarch;
   struct type *type;
@@ -649,11 +649,10 @@ show_entry_values_debug (struct ui_file *file, int from_tty,
 /* See gdbtypes.h.  */
 
 void
-call_site_target::iterate_over_addresses
-     (struct gdbarch *call_site_gdbarch,
-      const struct call_site *call_site,
-      frame_info_ptr caller_frame,
-      iterate_ftype callback) const
+call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
+                                         const call_site *call_site,
+                                         const frame_info_ptr &caller_frame,
+                                         iterate_ftype callback) const
 {
   switch (m_loc_kind)
     {
@@ -1138,9 +1137,9 @@ call_site_parameter_matches (struct call_site_parameter *parameter,
 /* See loc.h.  */
 
 struct call_site_parameter *
-dwarf_expr_reg_to_entry_parameter (frame_info_ptr frame,
-                                  enum call_site_parameter_kind kind,
-                                  union call_site_parameter_u kind_u,
+dwarf_expr_reg_to_entry_parameter (const frame_info_ptr &initial_frame,
+                                  call_site_parameter_kind kind,
+                                  call_site_parameter_u kind_u,
                                   dwarf2_per_cu_data **per_cu_return,
                                   dwarf2_per_objfile **per_objfile_return)
 {
@@ -1152,6 +1151,7 @@ dwarf_expr_reg_to_entry_parameter (frame_info_ptr frame,
   /* Initialize it just to avoid a GCC false warning.  */
   struct call_site_parameter *parameter = NULL;
   CORE_ADDR target_addr;
+  frame_info_ptr frame = initial_frame;
 
   while (get_frame_type (frame) == INLINE_FRAME)
     {
@@ -1263,7 +1263,7 @@ dwarf_expr_reg_to_entry_parameter (frame_info_ptr frame,
 static struct value *
 dwarf_entry_parameter_to_value (struct call_site_parameter *parameter,
                                CORE_ADDR deref_size, struct type *type,
-                               frame_info_ptr caller_frame,
+                               const frame_info_ptr &caller_frame,
                                dwarf2_per_cu_data *per_cu,
                                dwarf2_per_objfile *per_objfile)
 {
@@ -1339,7 +1339,7 @@ static const struct lval_funcs entry_data_value_funcs =
 
 /* See dwarf2/loc.h.  */
 struct value *
-value_of_dwarf_reg_entry (struct type *type, frame_info_ptr frame,
+value_of_dwarf_reg_entry (struct type *type, const frame_info_ptr &frame,
                          enum call_site_parameter_kind kind,
                          union call_site_parameter_u kind_u)
 {
@@ -1395,7 +1395,7 @@ value_of_dwarf_reg_entry (struct type *type, frame_info_ptr frame,
    cannot resolve the parameter for any reason.  */
 
 static struct value *
-value_of_dwarf_block_entry (struct type *type, frame_info_ptr frame,
+value_of_dwarf_block_entry (struct type *type, const frame_info_ptr &frame,
                            const gdb_byte *block, size_t block_len)
 {
   union call_site_parameter_u kind_u;
@@ -1456,7 +1456,7 @@ struct value *
 indirect_synthetic_pointer (sect_offset die, LONGEST byte_offset,
                            dwarf2_per_cu_data *per_cu,
                            dwarf2_per_objfile *per_objfile,
-                           frame_info_ptr frame, struct type *type,
+                           const frame_info_ptr &frame, struct type *type,
                            bool resolve_abstract_p)
 {
   /* Fetch the location expression of the DIE we're pointing to.  */
@@ -1496,7 +1496,7 @@ indirect_synthetic_pointer (sect_offset die, LONGEST byte_offset,
    SUBOBJ_BYTE_OFFSET within the variable of type TYPE.  */
 
 static struct value *
-dwarf2_evaluate_loc_desc_full (struct type *type, frame_info_ptr frame,
+dwarf2_evaluate_loc_desc_full (struct type *type, const frame_info_ptr &frame,
                               const gdb_byte *data, size_t size,
                               dwarf2_per_cu_data *per_cu,
                               dwarf2_per_objfile *per_objfile,
@@ -1561,7 +1561,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, frame_info_ptr frame,
    passes 0 as the byte_offset.  */
 
 struct value *
-dwarf2_evaluate_loc_desc (struct type *type, frame_info_ptr frame,
+dwarf2_evaluate_loc_desc (struct type *type, const frame_info_ptr &frame,
                          const gdb_byte *data, size_t size,
                          dwarf2_per_cu_data *per_cu,
                          dwarf2_per_objfile *per_objfile, bool as_lval)
@@ -1584,7 +1584,7 @@ dwarf2_evaluate_loc_desc (struct type *type, frame_info_ptr frame,
 
 static int
 dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
-                          frame_info_ptr frame,
+                          const frame_info_ptr &frame,
                           const struct property_addr_info *addr_stack,
                           CORE_ADDR *valp,
                           gdb::array_view<CORE_ADDR> push_values,
@@ -1644,9 +1644,9 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
 /* See dwarf2/loc.h.  */
 
 bool
-dwarf2_evaluate_property (const struct dynamic_prop *prop,
-                         frame_info_ptr frame,
-                         const struct property_addr_info *addr_stack,
+dwarf2_evaluate_property (const dynamic_prop *prop,
+                         const frame_info_ptr &initial_frame,
+                         const property_addr_info *addr_stack,
                          CORE_ADDR *value,
                          gdb::array_view<CORE_ADDR> push_values)
 {
@@ -1657,6 +1657,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
      Without this here this could happen if the code below selects a
      frame.  */
   scoped_restore_current_language save_language;
+  frame_info_ptr frame = initial_frame;
 
   if (frame == NULL && has_stack_frames ())
     frame = get_selected_frame (NULL);
@@ -3051,7 +3052,7 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
 /* Return the value of SYMBOL in FRAME using the DWARF-2 expression
    evaluator to calculate the location.  */
 static struct value *
-locexpr_read_variable (struct symbol *symbol, frame_info_ptr frame)
+locexpr_read_variable (struct symbol *symbol, const frame_info_ptr &frame)
 {
   struct dwarf2_locexpr_baton *dlbaton
     = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
@@ -3069,7 +3070,7 @@ locexpr_read_variable (struct symbol *symbol, frame_info_ptr frame)
    will be thrown.  */
 
 static struct value *
-locexpr_read_variable_at_entry (struct symbol *symbol, frame_info_ptr frame)
+locexpr_read_variable_at_entry (struct symbol *symbol, const frame_info_ptr &frame)
 {
   struct dwarf2_locexpr_baton *dlbaton
     = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
@@ -3884,7 +3885,7 @@ const struct symbol_computed_ops dwarf2_locexpr_funcs = {
 /* Return the value of SYMBOL in FRAME using the DWARF-2 expression
    evaluator to calculate the location.  */
 static struct value *
-loclist_read_variable (struct symbol *symbol, frame_info_ptr frame)
+loclist_read_variable (struct symbol *symbol, const frame_info_ptr &frame)
 {
   struct dwarf2_loclist_baton *dlbaton
     = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
@@ -3909,7 +3910,7 @@ loclist_read_variable (struct symbol *symbol, frame_info_ptr frame)
    if it cannot resolve the parameter for any reason.  */
 
 static struct value *
-loclist_read_variable_at_entry (struct symbol *symbol, frame_info_ptr frame)
+loclist_read_variable_at_entry (struct symbol *symbol, const frame_info_ptr &frame)
 {
   struct dwarf2_loclist_baton *dlbaton
     = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol);
index fb98e26b72db4346a4de07907ff4b909a4f37b1b..4fb743618e7cb0b4d419709cd18b7751045eada1 100644 (file)
@@ -65,9 +65,9 @@ value *compute_var_value (const char *name);
    Function always returns non-NULL, it throws NO_ENTRY_VALUE_ERROR
    otherwise.  */
 
-struct call_site_parameter *dwarf_expr_reg_to_entry_parameter
-  (frame_info_ptr frame, enum call_site_parameter_kind kind,
-   union call_site_parameter_u kind_u, dwarf2_per_cu_data **per_cu_return,
+call_site_parameter *dwarf_expr_reg_to_entry_parameter
+  (const frame_info_ptr &frame, call_site_parameter_kind kind,
+   call_site_parameter_u kind_u, dwarf2_per_cu_data **per_cu_return,
    dwarf2_per_objfile **per_objfile_return);
 
 
@@ -76,13 +76,11 @@ struct call_site_parameter *dwarf_expr_reg_to_entry_parameter
    of FRAME.  AS_LVAL defines if the resulting struct value is expected to
    be a value or a location description.  */
 
-struct value *dwarf2_evaluate_loc_desc (struct type *type,
-                                       frame_info_ptr frame,
-                                       const gdb_byte *data,
-                                       size_t size,
-                                       dwarf2_per_cu_data *per_cu,
-                                       dwarf2_per_objfile *per_objfile,
-                                       bool as_lval = true);
+value *dwarf2_evaluate_loc_desc (type *type, const frame_info_ptr &frame,
+                                const gdb_byte *data, size_t size,
+                                dwarf2_per_cu_data *per_cu,
+                                dwarf2_per_objfile *per_objfile,
+                                bool as_lval = true);
 
 /* A chain of addresses that might be needed to resolve a dynamic
    property.  */
@@ -121,8 +119,8 @@ struct property_addr_info
    bottom of the stack.  */
 
 bool dwarf2_evaluate_property (const struct dynamic_prop *prop,
-                              frame_info_ptr frame,
-                              const struct property_addr_info *addr_stack,
+                              const frame_info_ptr &frame,
+                              const property_addr_info *addr_stack,
                               CORE_ADDR *value,
                               gdb::array_view<CORE_ADDR> push_values = {});
 
@@ -296,7 +294,7 @@ extern void invalid_synthetic_pointer ();
 
 extern struct value *indirect_synthetic_pointer
   (sect_offset die, LONGEST byte_offset, dwarf2_per_cu_data *per_cu,
-   dwarf2_per_objfile *per_objfile, frame_info_ptr frame,
+   dwarf2_per_objfile *per_objfile, const frame_info_ptr &frame,
    struct type *type, bool resolve_abstract_p = false);
 
 /* Read parameter of TYPE at (callee) FRAME's function entry.  KIND and KIND_U
@@ -307,7 +305,7 @@ extern struct value *indirect_synthetic_pointer
    it cannot resolve the parameter for any reason.  */
 
 extern struct value *value_of_dwarf_reg_entry (struct type *type,
-                                              struct frame_info_ptr frame,
+                                              const frame_info_ptr &frame,
                                               enum call_site_parameter_kind kind,
                                               union call_site_parameter_u kind_u);
 #endif /* DWARF2LOC_H */
index 4eece07ac12fff5e96263b2001140a58b94fd92f..b709494927d4870c482cec0938a445a4e23fba4f 100644 (file)
@@ -180,7 +180,7 @@ struct extension_language_ops
      or SCR_BT_COMPLETED on success.  */
   enum ext_lang_bt_status (*apply_frame_filter)
     (const struct extension_language_defn *,
-     frame_info_ptr frame, frame_filter_flags flags,
+     const frame_info_ptr &frame, frame_filter_flags flags,
      enum ext_lang_frame_args args_type,
      struct ui_out *out, int frame_low, int frame_high);
 
index 2555161c2a794dbe40f76876096389053096a470..42e05199d2c88719d2c853c628abee4c06f94c0f 100644 (file)
@@ -525,7 +525,7 @@ apply_ext_lang_val_pretty_printer (struct value *val,
    rather than trying filters in other extension languages.  */
 
 enum ext_lang_bt_status
-apply_ext_lang_frame_filter (frame_info_ptr frame,
+apply_ext_lang_frame_filter (const frame_info_ptr &frame,
                             frame_filter_flags flags,
                             enum ext_lang_frame_args args_type,
                             struct ui_out *out,
index 6dc19c36fc2ada48ef099ce64bb6b8fb2efb238b..0514d7930a22c378dc849c71001dbb795c6c1c5a 100644 (file)
@@ -295,7 +295,7 @@ extern int apply_ext_lang_val_pretty_printer
    const struct language_defn *language);
 
 extern enum ext_lang_bt_status apply_ext_lang_frame_filter
-  (frame_info_ptr frame, frame_filter_flags flags,
+  (const frame_info_ptr &frame, frame_filter_flags flags,
    enum ext_lang_frame_args args_type,
    struct ui_out *out, int frame_low, int frame_high);
 
index 2fcfccda1c7a6486fd1d94b6a274a85eedbf1aaa..516a2ca044cc29cc3bb7bc6fdc8870269ce2b475 100644 (file)
@@ -246,7 +246,7 @@ copy_integer_to_size (gdb_byte *dest, int dest_size, const gdb_byte *source,
 /* See value.h.  */
 
 value *
-value_of_register (int regnum, frame_info_ptr next_frame)
+value_of_register (int regnum, const frame_info_ptr &next_frame)
 {
   gdbarch *gdbarch = frame_unwind_arch (next_frame);
 
@@ -263,7 +263,7 @@ value_of_register (int regnum, frame_info_ptr next_frame)
 /* See value.h.  */
 
 value *
-value_of_register_lazy (frame_info_ptr next_frame, int regnum)
+value_of_register_lazy (const frame_info_ptr &next_frame, int regnum)
 {
   gdbarch *gdbarch = frame_unwind_arch (next_frame);
 
@@ -377,7 +377,7 @@ symbol_read_needs_frame (struct symbol *sym)
 
 static frame_info_ptr
 get_hosting_frame (struct symbol *var, const struct block *var_block,
-                  frame_info_ptr frame)
+                  const frame_info_ptr &initial_frame)
 {
   const struct block *frame_block = NULL;
 
@@ -389,7 +389,7 @@ get_hosting_frame (struct symbol *var, const struct block *var_block,
      synthetic symbols.  Without block information, we must assume they are
      local to FRAME. In this case, there is nothing to do.  */
   else if (var_block == NULL)
-    return frame;
+    return initial_frame;
 
   /* We currently assume that all symbols with a location list need a frame.
      This is true in practice because selecting the location description
@@ -398,15 +398,16 @@ get_hosting_frame (struct symbol *var, const struct block *var_block,
      We want to get <optimized out> instead of <frame required> when evaluating
      them so return a frame instead of raising an error.  */
   else if (var_block->is_global_block () || var_block->is_static_block ())
-    return frame;
+    return initial_frame;
 
   /* We have to handle the "my_func::my_local_var" notation.  This requires us
      to look for upper frames when we find no block for the current frame: here
      and below, handle when frame_block == NULL.  */
-  if (frame != NULL)
-    frame_block = get_frame_block (frame, NULL);
+  if (initial_frame != nullptr)
+    frame_block = get_frame_block (initial_frame, NULL);
 
   /* Climb up the call stack until reaching the frame we are looking for.  */
+  frame_info_ptr frame = initial_frame;
   while (frame != NULL && frame_block != var_block)
     {
       /* Stacks can be quite deep: give the user a chance to stop this.  */
@@ -476,12 +477,13 @@ get_hosting_frame (struct symbol *var, const struct block *var_block,
 struct value *
 language_defn::read_var_value (struct symbol *var,
                               const struct block *var_block,
-                              frame_info_ptr frame) const
+                              const frame_info_ptr &frame_param) const
 {
   struct value *v;
   struct type *type = var->type ();
   CORE_ADDR addr;
   enum symbol_needs_kind sym_need;
+  frame_info_ptr frame = frame_param;
 
   /* Call check_typedef on our type to make sure that, if TYPE is
      a TYPE_CODE_TYPEDEF, its length is set to the length of the target type
@@ -704,7 +706,7 @@ language_defn::read_var_value (struct symbol *var,
 
 struct value *
 read_var_value (struct symbol *var, const struct block *var_block,
-               frame_info_ptr frame)
+               const frame_info_ptr &frame)
 {
   const struct language_defn *lang = language_def (var->language ());
 
@@ -789,7 +791,7 @@ read_frame_register_value (value *value)
 /* Return a value of type TYPE, stored in register REGNUM, in frame FRAME.  */
 
 struct value *
-value_from_register (struct type *type, int regnum, frame_info_ptr frame)
+value_from_register (struct type *type, int regnum, const frame_info_ptr &frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   struct type *type1 = check_typedef (type);
@@ -836,7 +838,7 @@ value_from_register (struct type *type, int regnum, frame_info_ptr frame)
    Will abort if register value is not available.  */
 
 CORE_ADDR
-address_from_register (int regnum, frame_info_ptr frame)
+address_from_register (int regnum, const frame_info_ptr &frame)
 {
   type *type = builtin_type (get_frame_arch (frame))->builtin_data_ptr;
   value_ref_ptr v = release_value (value_from_register (type, regnum, frame));
index 9dd04eefa5b31a791c0ec9d4b5d79b0ffb137f9a..fda19b57bacb57545c5d81e9c7f8a087c0238ab8 100644 (file)
    really need to override this.  */
 
 static CORE_ADDR
-default_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+default_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   return get_frame_base (this_frame); /* sigh! */
 }
 
 static CORE_ADDR
-default_frame_locals_address (frame_info_ptr this_frame, void **this_cache)
+default_frame_locals_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   return default_frame_base_address (this_frame, this_cache);
 }
 
 static CORE_ADDR
-default_frame_args_address (frame_info_ptr this_frame, void **this_cache)
+default_frame_args_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   return default_frame_base_address (this_frame, this_cache);
 }
@@ -99,7 +99,7 @@ frame_base_set_default (struct gdbarch *gdbarch,
 }
 
 const struct frame_base *
-frame_base_find_by_frame (frame_info_ptr this_frame)
+frame_base_find_by_frame (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct frame_base_table *table = get_frame_base_table (gdbarch);
index 9ca948114665eb877ff535e5ade3e47dfa84b716..ae22431d5ef174a599308e922cdf8fb03b22a69b 100644 (file)
@@ -42,17 +42,17 @@ struct regcache;
 
 /* A generic base address.  */
 
-typedef CORE_ADDR (frame_this_base_ftype) (frame_info_ptr this_frame,
+typedef CORE_ADDR (frame_this_base_ftype) (const frame_info_ptr &this_frame,
                                           void **this_base_cache);
 
 /* The base address of the frame's local variables.  */
 
-typedef CORE_ADDR (frame_this_locals_ftype) (frame_info_ptr this_frame,
+typedef CORE_ADDR (frame_this_locals_ftype) (const frame_info_ptr &this_frame,
                                             void **this_base_cache);
 
 /* The base address of the frame's arguments / parameters.  */
 
-typedef CORE_ADDR (frame_this_args_ftype) (frame_info_ptr this_frame,
+typedef CORE_ADDR (frame_this_args_ftype) (const frame_info_ptr &this_frame,
                                           void **this_base_cache);
 
 struct frame_base
@@ -68,7 +68,7 @@ struct frame_base
 /* Given THIS frame, return the frame base methods for THIS frame,
    or NULL if it can't handle THIS frame.  */
 
-typedef const struct frame_base *(frame_base_sniffer_ftype) (frame_info_ptr this_frame);
+typedef const struct frame_base *(frame_base_sniffer_ftype) (const frame_info_ptr &this_frame);
 
 /* Append a frame base sniffer to the list.  The sniffers are polled
    in the order that they are appended.  */
@@ -86,6 +86,6 @@ extern void frame_base_set_default (struct gdbarch *gdbarch,
 /* Iterate through the list of frame base handlers until one returns
    an implementation.  */
 
-extern const struct frame_base *frame_base_find_by_frame (frame_info_ptr this_frame);
+extern const struct frame_base *frame_base_find_by_frame (const frame_info_ptr &this_frame);
 
 #endif
index 27aa9e10677dd9ea4fb83014c459a8eed4320167..e9983a9fd74fa531bf9b9f41dd48877798309d7a 100644 (file)
@@ -123,7 +123,7 @@ frame_unwind_append_unwinder (struct gdbarch *gdbarch,
    unchanged and returns 0.  */
 
 static int
-frame_unwind_try_unwinder (frame_info_ptr this_frame, void **this_cache,
+frame_unwind_try_unwinder (const frame_info_ptr &this_frame, void **this_cache,
                          const struct frame_unwind *unwinder)
 {
   int res = 0;
@@ -183,7 +183,7 @@ frame_unwind_try_unwinder (frame_info_ptr this_frame, void **this_cache,
    by this function.  Possibly initialize THIS_CACHE.  */
 
 void
-frame_unwind_find_by_frame (frame_info_ptr this_frame, void **this_cache)
+frame_unwind_find_by_frame (const frame_info_ptr &this_frame, void **this_cache)
 {
   FRAME_SCOPED_DEBUG_ENTER_EXIT;
   frame_debug_printf ("this_frame=%d", frame_relative_level (this_frame));
@@ -217,7 +217,7 @@ frame_unwind_find_by_frame (frame_info_ptr this_frame, void **this_cache)
 
 int
 default_frame_sniffer (const struct frame_unwind *self,
-                      frame_info_ptr this_frame,
+                      const frame_info_ptr &this_frame,
                       void **this_prologue_cache)
 {
   return 1;
@@ -226,7 +226,7 @@ default_frame_sniffer (const struct frame_unwind *self,
 /* The default frame unwinder stop_reason callback.  */
 
 enum unwind_stop_reason
-default_frame_unwind_stop_reason (frame_info_ptr this_frame,
+default_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                  void **this_cache)
 {
   struct frame_id this_id = get_frame_id (this_frame);
@@ -240,7 +240,7 @@ default_frame_unwind_stop_reason (frame_info_ptr this_frame,
 /* See frame-unwind.h.  */
 
 CORE_ADDR
-default_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+default_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   int pc_regnum = gdbarch_pc_regnum (gdbarch);
   CORE_ADDR pc = frame_unwind_register_unsigned (next_frame, pc_regnum);
@@ -251,7 +251,7 @@ default_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* See frame-unwind.h.  */
 
 CORE_ADDR
-default_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+default_unwind_sp (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   int sp_regnum = gdbarch_sp_regnum (gdbarch);
   return frame_unwind_register_unsigned (next_frame, sp_regnum);
@@ -263,7 +263,7 @@ default_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* Return a value which indicates that FRAME did not save REGNUM.  */
 
 struct value *
-frame_unwind_got_optimized (frame_info_ptr frame, int regnum)
+frame_unwind_got_optimized (const frame_info_ptr &frame, int regnum)
 {
   struct gdbarch *gdbarch = frame_unwind_arch (frame);
   struct type *type = register_type (gdbarch, regnum);
@@ -275,7 +275,7 @@ frame_unwind_got_optimized (frame_info_ptr frame, int regnum)
    register NEW_REGNUM.  */
 
 struct value *
-frame_unwind_got_register (frame_info_ptr frame,
+frame_unwind_got_register (const frame_info_ptr &frame,
                           int regnum, int new_regnum)
 {
   return value_of_register_lazy (get_next_frame_sentinel_okay (frame),
@@ -286,7 +286,7 @@ frame_unwind_got_register (frame_info_ptr frame,
    ADDR.  */
 
 struct value *
-frame_unwind_got_memory (frame_info_ptr frame, int regnum, CORE_ADDR addr)
+frame_unwind_got_memory (const frame_info_ptr &frame, int regnum, CORE_ADDR addr)
 {
   struct gdbarch *gdbarch = frame_unwind_arch (frame);
   struct value *v = value_at_lazy (register_type (gdbarch, regnum), addr);
@@ -299,7 +299,7 @@ frame_unwind_got_memory (frame_info_ptr frame, int regnum, CORE_ADDR addr)
    REGNUM has a known constant (computed) value of VAL.  */
 
 struct value *
-frame_unwind_got_constant (frame_info_ptr frame, int regnum,
+frame_unwind_got_constant (const frame_info_ptr &frame, int regnum,
                           ULONGEST val)
 {
   struct gdbarch *gdbarch = frame_unwind_arch (frame);
@@ -313,7 +313,7 @@ frame_unwind_got_constant (frame_info_ptr frame, int regnum,
 }
 
 struct value *
-frame_unwind_got_bytes (frame_info_ptr frame, int regnum, const gdb_byte *buf)
+frame_unwind_got_bytes (const frame_info_ptr &frame, int regnum, const gdb_byte *buf)
 {
   struct gdbarch *gdbarch = frame_unwind_arch (frame);
   struct value *reg_val;
@@ -329,7 +329,7 @@ frame_unwind_got_bytes (frame_info_ptr frame, int regnum, const gdb_byte *buf)
    CORE_ADDR to a target address if necessary.  */
 
 struct value *
-frame_unwind_got_address (frame_info_ptr frame, int regnum,
+frame_unwind_got_address (const frame_info_ptr &frame, int regnum,
                          CORE_ADDR addr)
 {
   struct gdbarch *gdbarch = frame_unwind_arch (frame);
index 9e978890e8432a32974447d86c8a5bb48f76c4d9..53fcd6869e95eaaf806bfb0cd982317c098424f3 100644 (file)
@@ -50,37 +50,37 @@ struct value;
    to set *THIS_PROLOGUE_CACHE to NULL.  */
 
 typedef int (frame_sniffer_ftype) (const struct frame_unwind *self,
-                                  frame_info_ptr this_frame,
+                                  const frame_info_ptr &this_frame,
                                   void **this_prologue_cache);
 
-typedef enum unwind_stop_reason (frame_unwind_stop_reason_ftype)
-  (frame_info_ptr this_frame, void **this_prologue_cache);
+typedef unwind_stop_reason (frame_unwind_stop_reason_ftype)
+  (const frame_info_ptr &this_frame, void **this_prologue_cache);
 
 /* A default frame sniffer which always accepts the frame.  Used by
    fallback prologue unwinders.  */
 
 int default_frame_sniffer (const struct frame_unwind *self,
-                          frame_info_ptr this_frame,
+                          const frame_info_ptr &this_frame,
                           void **this_prologue_cache);
 
 /* A default stop_reason callback which always claims the frame is
    unwindable.  */
 
 enum unwind_stop_reason
-  default_frame_unwind_stop_reason (frame_info_ptr this_frame,
+  default_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                    void **this_cache);
 
 /* A default unwind_pc callback that simply unwinds the register identified
    by GDBARCH_PC_REGNUM.  */
 
 extern CORE_ADDR default_unwind_pc (struct gdbarch *gdbarch,
-                                   frame_info_ptr next_frame);
+                                   const frame_info_ptr &next_frame);
 
 /* A default unwind_sp callback that simply unwinds the register identified
    by GDBARCH_SP_REGNUM.  */
 
 extern CORE_ADDR default_unwind_sp (struct gdbarch *gdbarch,
-                                   frame_info_ptr next_frame);
+                                   const frame_info_ptr &next_frame);
 
 /* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
    use THIS frame, and through it the NEXT frame's register unwind
@@ -105,7 +105,7 @@ extern CORE_ADDR default_unwind_sp (struct gdbarch *gdbarch,
    with the other unwind methods.  Memory for that cache should be
    allocated using FRAME_OBSTACK_ZALLOC().  */
 
-typedef void (frame_this_id_ftype) (frame_info_ptr this_frame,
+typedef void (frame_this_id_ftype) (const frame_info_ptr &this_frame,
                                    void **this_prologue_cache,
                                    struct frame_id *this_id);
 
@@ -140,9 +140,9 @@ typedef void (frame_this_id_ftype) (frame_info_ptr this_frame,
    with the other unwind methods.  Memory for that cache should be
    allocated using FRAME_OBSTACK_ZALLOC().  */
 
-typedef struct value * (frame_prev_register_ftype)
-  (frame_info_ptr this_frame, void **this_prologue_cache,
-   int regnum);
+typedef value *(frame_prev_register_ftype) (const frame_info_ptr &this_frame,
+                                           void **this_prologue_cache,
+                                           int regnum);
 
 /* Deallocate extra memory associated with the frame cache if any.  */
 
@@ -153,8 +153,8 @@ typedef void (frame_dealloc_cache_ftype) (frame_info *self,
    use THIS frame, and implicitly the NEXT frame's register unwind
    method, return PREV frame's architecture.  */
 
-typedef struct gdbarch *(frame_prev_arch_ftype) (frame_info_ptr this_frame,
-                                                void **this_prologue_cache);
+typedef gdbarch *(frame_prev_arch_ftype) (const frame_info_ptr &this_frame,
+                                         void **this_prologue_cache);
 
 struct frame_unwind
 {
@@ -193,7 +193,7 @@ extern void frame_unwind_append_unwinder (struct gdbarch *gdbarch,
    unwinder implementation.  THIS_FRAME->UNWIND must be NULL, it will get set
    by this function.  Possibly initialize THIS_CACHE.  */
 
-extern void frame_unwind_find_by_frame (frame_info_ptr this_frame,
+extern void frame_unwind_find_by_frame (const frame_info_ptr &this_frame,
                                        void **this_cache);
 
 /* Helper functions for value-based register unwinding.  These return
@@ -201,39 +201,38 @@ extern void frame_unwind_find_by_frame (frame_info_ptr this_frame,
 
 /* Return a value which indicates that FRAME did not save REGNUM.  */
 
-struct value *frame_unwind_got_optimized (frame_info_ptr frame,
-                                         int regnum);
+value *frame_unwind_got_optimized (const frame_info_ptr &frame, int regnum);
 
 /* Return a value which indicates that FRAME copied REGNUM into
    register NEW_REGNUM.  */
 
-struct value *frame_unwind_got_register (frame_info_ptr frame, int regnum,
-                                        int new_regnum);
+value *frame_unwind_got_register (const frame_info_ptr &frame, int regnum,
+                                 int new_regnum);
 
 /* Return a value which indicates that FRAME saved REGNUM in memory at
    ADDR.  */
 
-struct value *frame_unwind_got_memory (frame_info_ptr frame, int regnum,
-                                      CORE_ADDR addr);
+value *frame_unwind_got_memory (const frame_info_ptr &frame, int regnum,
+                               CORE_ADDR addr);
 
 /* Return a value which indicates that FRAME's saved version of
    REGNUM has a known constant (computed) value of VAL.  */
 
-struct value *frame_unwind_got_constant (frame_info_ptr frame, int regnum,
-                                        ULONGEST val);
+value *frame_unwind_got_constant (const frame_info_ptr &frame, int regnum,
+                                 ULONGEST val);
 
 /* Return a value which indicates that FRAME's saved version of
    REGNUM has a known constant (computed) value which is stored
    inside BUF.  */
 
-struct value *frame_unwind_got_bytes (frame_info_ptr frame, int regnum,
-                                     const gdb_byte *buf);
+value *frame_unwind_got_bytes (const frame_info_ptr &frame, int regnum,
+                              const gdb_byte *buf);
 
 /* Return a value which indicates that FRAME's saved version of REGNUM
    has a known constant (computed) value of ADDR.  Convert the
    CORE_ADDR to a target address if necessary.  */
 
-struct value *frame_unwind_got_address (frame_info_ptr frame, int regnum,
-                                       CORE_ADDR addr);
+value *frame_unwind_got_address (const frame_info_ptr &frame, int regnum,
+                                CORE_ADDR addr);
 
 #endif
index 72a34fcfedca5d395b23880dcc33e4227890a412..9c3f0dfd4f2dc882265e8dd7beaaa944e4a84abb 100644 (file)
@@ -71,7 +71,7 @@ get_frame_cache_generation ()
 /* The values behind the global "set backtrace ..." settings.  */
 set_backtrace_options user_set_backtrace_options;
 
-static frame_info_ptr get_prev_frame_raw (frame_info_ptr this_frame);
+static frame_info_ptr get_prev_frame_raw (const frame_info_ptr &this_frame);
 static const char *frame_stop_reason_symbol_string (enum unwind_stop_reason reason);
 static frame_info_ptr create_new_frame (frame_id id);
 
@@ -197,7 +197,7 @@ struct frame_info
 /* See frame.h.  */
 
 void
-set_frame_previous_pc_masked (frame_info_ptr frame)
+set_frame_previous_pc_masked (const frame_info_ptr &frame)
 {
   frame->prev_pc.masked = true;
 }
@@ -205,7 +205,7 @@ set_frame_previous_pc_masked (frame_info_ptr frame)
 /* See frame.h.  */
 
 bool
-get_frame_pc_masked (frame_info_ptr frame)
+get_frame_pc_masked (const frame_info_ptr &frame)
 {
   gdb_assert (frame->next != nullptr);
   gdb_assert (frame->next->prev_pc.status == CC_VALUE);
@@ -528,7 +528,7 @@ frame_info::to_string () const
    Return NULL if FRAME is the start of an artificial-only chain.  */
 
 static frame_info_ptr
-skip_artificial_frames (frame_info_ptr frame)
+skip_artificial_frames (const frame_info_ptr &initial_frame)
 {
   /* Note we use get_prev_frame_always, and not get_prev_frame.  The
      latter will truncate the frame chain, leading to this function
@@ -537,6 +537,7 @@ skip_artificial_frames (frame_info_ptr frame)
 
      Note that for record targets we may get a frame chain that consists
      of artificial frames only.  */
+  frame_info_ptr frame = initial_frame;
   while (get_frame_type (frame) == INLINE_FRAME
         || get_frame_type (frame) == TAILCALL_FRAME)
     {
@@ -549,8 +550,9 @@ skip_artificial_frames (frame_info_ptr frame)
 }
 
 frame_info_ptr
-skip_unwritable_frames (frame_info_ptr frame)
+skip_unwritable_frames (const frame_info_ptr &initial_frame)
 {
+  frame_info_ptr frame = initial_frame;
   while (gdbarch_code_of_frame_writable (get_frame_arch (frame), frame) == 0)
     {
       frame = get_prev_frame (frame);
@@ -564,8 +566,9 @@ skip_unwritable_frames (frame_info_ptr frame)
 /* See frame.h.  */
 
 frame_info_ptr
-skip_tailcall_frames (frame_info_ptr frame)
+skip_tailcall_frames (const frame_info_ptr &initial_frame)
 {
+  frame_info_ptr frame = initial_frame;
   while (get_frame_type (frame) == TAILCALL_FRAME)
     {
       /* Note that for record targets we may get a frame chain that consists of
@@ -582,7 +585,7 @@ skip_tailcall_frames (frame_info_ptr frame)
    frame.  */
 
 static void
-compute_frame_id (frame_info_ptr fi)
+compute_frame_id (const frame_info_ptr &fi)
 {
   FRAME_SCOPED_DEBUG_ENTER_EXIT;
 
@@ -628,7 +631,7 @@ compute_frame_id (frame_info_ptr fi)
    frame.  */
 
 struct frame_id
-get_frame_id (frame_info_ptr fi)
+get_frame_id (const frame_info_ptr &fi)
 {
   if (fi == NULL)
     return null_frame_id;
@@ -659,26 +662,24 @@ get_frame_id (frame_info_ptr fi)
 }
 
 struct frame_id
-get_stack_frame_id (frame_info_ptr next_frame)
+get_stack_frame_id (const frame_info_ptr &next_frame)
 {
   return get_frame_id (skip_artificial_frames (next_frame));
 }
 
 struct frame_id
-frame_unwind_caller_id (frame_info_ptr next_frame)
+frame_unwind_caller_id (const frame_info_ptr &initial_next_frame)
 {
-  frame_info_ptr this_frame;
-
   /* Use get_prev_frame_always, and not get_prev_frame.  The latter
      will truncate the frame chain, leading to this function
      unintentionally returning a null_frame_id (e.g., when a caller
      requests the frame ID of "main()"s caller.  */
 
-  next_frame = skip_artificial_frames (next_frame);
+  frame_info_ptr next_frame = skip_artificial_frames (initial_next_frame);
   if (next_frame == NULL)
     return null_frame_id;
 
-  this_frame = get_prev_frame_always (next_frame);
+  frame_info_ptr this_frame = get_prev_frame_always (next_frame);
   if (this_frame)
     return get_frame_id (skip_artificial_frames (this_frame));
   else
@@ -965,7 +966,7 @@ frame_find_by_id (struct frame_id id)
 }
 
 static CORE_ADDR
-frame_unwind_pc (frame_info_ptr this_frame)
+frame_unwind_pc (const frame_info_ptr &this_frame)
 {
   if (this_frame->prev_pc.status == CC_UNKNOWN)
     {
@@ -1039,20 +1040,20 @@ frame_unwind_pc (frame_info_ptr this_frame)
 }
 
 CORE_ADDR
-frame_unwind_caller_pc (frame_info_ptr this_frame)
+frame_unwind_caller_pc (const frame_info_ptr &initial_this_frame)
 {
-  this_frame = skip_artificial_frames (this_frame);
+  frame_info_ptr this_frame = skip_artificial_frames (initial_this_frame);
 
   /* We must have a non-artificial frame.  The caller is supposed to check
      the result of frame_unwind_caller_id (), which returns NULL_FRAME_ID
      in this case.  */
-  gdb_assert (this_frame != NULL);
+  gdb_assert (this_frame != nullptr);
 
   return frame_unwind_pc (this_frame);
 }
 
 bool
-get_frame_func_if_available (frame_info_ptr this_frame, CORE_ADDR *pc)
+get_frame_func_if_available (const frame_info_ptr &this_frame, CORE_ADDR *pc)
 {
   frame_info *next_frame = this_frame->next;
 
@@ -1095,7 +1096,7 @@ get_frame_func_if_available (frame_info_ptr this_frame, CORE_ADDR *pc)
 }
 
 CORE_ADDR
-get_frame_func (frame_info_ptr this_frame)
+get_frame_func (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc;
 
@@ -1106,7 +1107,7 @@ get_frame_func (frame_info_ptr this_frame)
 }
 
 std::unique_ptr<readonly_detached_regcache>
-frame_save_as_regcache (frame_info_ptr this_frame)
+frame_save_as_regcache (const frame_info_ptr &this_frame)
 {
   auto cooked_read = [this_frame] (int regnum, gdb::array_view<gdb_byte> buf)
     {
@@ -1123,7 +1124,7 @@ frame_save_as_regcache (frame_info_ptr this_frame)
 }
 
 void
-frame_pop (frame_info_ptr this_frame)
+frame_pop (const frame_info_ptr &this_frame)
 {
   frame_info_ptr prev_frame;
 
@@ -1172,7 +1173,7 @@ frame_pop (frame_info_ptr this_frame)
 }
 
 void
-frame_register_unwind (frame_info_ptr next_frame, int regnum,
+frame_register_unwind (const frame_info_ptr &next_frame, int regnum,
                       int *optimizedp, int *unavailablep,
                       enum lval_type *lvalp, CORE_ADDR *addrp,
                       int *realnump, gdb_byte *bufferp)
@@ -1215,7 +1216,7 @@ frame_register_unwind (frame_info_ptr next_frame, int regnum,
 }
 
 void
-frame_unwind_register (frame_info_ptr next_frame, int regnum, gdb_byte *buf)
+frame_unwind_register (const frame_info_ptr &next_frame, int regnum, gdb_byte *buf)
 {
   int optimized;
   int unavailable;
@@ -1235,14 +1236,14 @@ frame_unwind_register (frame_info_ptr next_frame, int regnum, gdb_byte *buf)
 }
 
 void
-get_frame_register (frame_info_ptr frame,
+get_frame_register (const frame_info_ptr &frame,
                    int regnum, gdb_byte *buf)
 {
   frame_unwind_register (frame_info_ptr (frame->next), regnum, buf);
 }
 
 struct value *
-frame_unwind_register_value (frame_info_ptr next_frame, int regnum)
+frame_unwind_register_value (const frame_info_ptr &next_frame, int regnum)
 {
   FRAME_SCOPED_DEBUG_ENTER_EXIT;
 
@@ -1334,13 +1335,13 @@ frame_unwind_register_value (frame_info_ptr next_frame, int regnum)
 }
 
 struct value *
-get_frame_register_value (frame_info_ptr frame, int regnum)
+get_frame_register_value (const frame_info_ptr &frame, int regnum)
 {
   return frame_unwind_register_value (frame_info_ptr (frame->next), regnum);
 }
 
 LONGEST
-frame_unwind_register_signed (frame_info_ptr next_frame, int regnum)
+frame_unwind_register_signed (const frame_info_ptr &next_frame, int regnum)
 {
   struct gdbarch *gdbarch = frame_unwind_arch (next_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1366,13 +1367,13 @@ frame_unwind_register_signed (frame_info_ptr next_frame, int regnum)
 }
 
 LONGEST
-get_frame_register_signed (frame_info_ptr frame, int regnum)
+get_frame_register_signed (const frame_info_ptr &frame, int regnum)
 {
   return frame_unwind_register_signed (frame_info_ptr (frame->next), regnum);
 }
 
 ULONGEST
-frame_unwind_register_unsigned (frame_info_ptr next_frame, int regnum)
+frame_unwind_register_unsigned (const frame_info_ptr &next_frame, int regnum)
 {
   struct gdbarch *gdbarch = frame_unwind_arch (next_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1400,13 +1401,13 @@ frame_unwind_register_unsigned (frame_info_ptr next_frame, int regnum)
 }
 
 ULONGEST
-get_frame_register_unsigned (frame_info_ptr frame, int regnum)
+get_frame_register_unsigned (const frame_info_ptr &frame, int regnum)
 {
   return frame_unwind_register_unsigned (frame_info_ptr (frame->next), regnum);
 }
 
 bool
-read_frame_register_unsigned (frame_info_ptr frame, int regnum,
+read_frame_register_unsigned (const frame_info_ptr &frame, int regnum,
                              ULONGEST *val)
 {
   struct value *regval = get_frame_register_value (frame, regnum);
@@ -1427,7 +1428,7 @@ read_frame_register_unsigned (frame_info_ptr frame, int regnum,
 }
 
 void
-put_frame_register (frame_info_ptr next_frame, int regnum,
+put_frame_register (const frame_info_ptr &next_frame, int regnum,
                     gdb::array_view<const gdb_byte> buf)
 {
   gdbarch *gdbarch = frame_unwind_arch (next_frame);
@@ -1475,7 +1476,7 @@ put_frame_register (frame_info_ptr next_frame, int regnum,
    Returns 0 if the register value could not be found.  */
 
 bool
-deprecated_frame_register_read (frame_info_ptr frame, int regnum,
+deprecated_frame_register_read (const frame_info_ptr &frame, int regnum,
                                gdb_byte *myaddr)
 {
   int optimized;
@@ -1492,7 +1493,7 @@ deprecated_frame_register_read (frame_info_ptr frame, int regnum,
 }
 
 bool
-get_frame_register_bytes (frame_info_ptr next_frame, int regnum,
+get_frame_register_bytes (const frame_info_ptr &next_frame, int regnum,
                          CORE_ADDR offset, gdb::array_view<gdb_byte> buffer,
                          int *optimizedp, int *unavailablep)
 {
@@ -1569,7 +1570,7 @@ get_frame_register_bytes (frame_info_ptr next_frame, int regnum,
 }
 
 void
-put_frame_register_bytes (frame_info_ptr next_frame, int regnum,
+put_frame_register_bytes (const frame_info_ptr &next_frame, int regnum,
                          CORE_ADDR offset,
                          gdb::array_view<const gdb_byte> buffer)
 {
@@ -1658,7 +1659,7 @@ frame_obstack_zalloc (unsigned long size)
   return data;
 }
 
-static frame_info_ptr get_prev_frame_always_1 (frame_info_ptr this_frame);
+static frame_info_ptr get_prev_frame_always_1 (const frame_info_ptr &this_frame);
 
 frame_info_ptr
 get_current_frame (void)
@@ -1920,7 +1921,7 @@ invalidate_selected_frame ()
 /* See frame.h.  */
 
 void
-select_frame (frame_info_ptr fi)
+select_frame (const frame_info_ptr &fi)
 {
   gdb_assert (fi != nullptr);
 
@@ -2062,7 +2063,7 @@ create_new_frame (CORE_ADDR stack, CORE_ADDR pc)
    frame chain and onto the sentinel frame.  */
 
 frame_info_ptr
-get_next_frame (frame_info_ptr this_frame)
+get_next_frame (const frame_info_ptr &this_frame)
 {
   if (this_frame->level > 0)
     return frame_info_ptr (this_frame->next);
@@ -2075,7 +2076,7 @@ get_next_frame (frame_info_ptr this_frame)
    unlike get_next_frame(), NULL will never be returned.  */
 
 frame_info_ptr
-get_next_frame_sentinel_okay (frame_info_ptr this_frame)
+get_next_frame_sentinel_okay (const frame_info_ptr &this_frame)
 {
   gdb_assert (this_frame != NULL);
 
@@ -2141,12 +2142,13 @@ reinit_frame_cache (void)
    relative to this particular frame.  */
 
 static void
-frame_register_unwind_location (frame_info_ptr this_frame, int regnum,
-                               int *optimizedp, enum lval_type *lvalp,
+frame_register_unwind_location (const frame_info_ptr &initial_this_frame,
+                               int regnum, int *optimizedp, lval_type *lvalp,
                                CORE_ADDR *addrp, int *realnump)
 {
-  gdb_assert (this_frame == NULL || this_frame->level >= 0);
+  gdb_assert (initial_this_frame == nullptr || initial_this_frame->level >= 0);
 
+  frame_info_ptr this_frame = initial_this_frame;
   while (this_frame != NULL)
     {
       int unavailable;
@@ -2185,7 +2187,7 @@ frame_register_unwind_location (frame_info_ptr this_frame, int regnum,
    of the previous frame, should also be a duplicate.  */
 
 static frame_info_ptr
-get_prev_frame_maybe_check_cycle (frame_info_ptr this_frame)
+get_prev_frame_maybe_check_cycle (const frame_info_ptr &this_frame)
 {
   frame_info_ptr prev_frame = get_prev_frame_raw (this_frame);
 
@@ -2273,7 +2275,7 @@ get_prev_frame_maybe_check_cycle (frame_info_ptr this_frame)
    there is no such frame.  This may throw an exception.  */
 
 static frame_info_ptr
-get_prev_frame_always_1 (frame_info_ptr this_frame)
+get_prev_frame_always_1 (const frame_info_ptr &this_frame)
 {
   FRAME_SCOPED_DEBUG_ENTER_EXIT;
 
@@ -2429,7 +2431,7 @@ get_prev_frame_always_1 (frame_info_ptr this_frame)
    frame.  */
 
 frame_info_ptr
-get_prev_frame_always (frame_info_ptr this_frame)
+get_prev_frame_always (const frame_info_ptr &this_frame)
 {
   frame_info_ptr prev_frame = NULL;
 
@@ -2469,7 +2471,7 @@ get_prev_frame_always (frame_info_ptr this_frame)
    this_frame.  */
 
 static frame_info_ptr
-get_prev_frame_raw (frame_info_ptr this_frame)
+get_prev_frame_raw (const frame_info_ptr &this_frame)
 {
   frame_info *prev_frame;
 
@@ -2522,7 +2524,7 @@ get_prev_frame_raw (frame_info_ptr this_frame)
 /* Debug routine to print a NULL frame being returned.  */
 
 static void
-frame_debug_got_null_frame (frame_info_ptr this_frame,
+frame_debug_got_null_frame (const frame_info_ptr &this_frame,
                            const char *reason)
 {
   if (frame_debug)
@@ -2537,7 +2539,7 @@ frame_debug_got_null_frame (frame_info_ptr this_frame,
 /* Is this (non-sentinel) frame in the "main"() function?  */
 
 static bool
-inside_main_func (frame_info_ptr this_frame)
+inside_main_func (const frame_info_ptr &this_frame)
 {
   if (current_program_space->symfile_object_file == nullptr)
     return false;
@@ -2585,7 +2587,7 @@ inside_main_func (frame_info_ptr this_frame)
 /* Test whether THIS_FRAME is inside the process entry point function.  */
 
 static bool
-inside_entry_func (frame_info_ptr this_frame)
+inside_entry_func (const frame_info_ptr &this_frame)
 {
   CORE_ADDR entry_point;
 
@@ -2605,7 +2607,7 @@ inside_entry_func (frame_info_ptr this_frame)
    checking whether the program-counter is zero.  */
 
 frame_info_ptr
-get_prev_frame (frame_info_ptr this_frame)
+get_prev_frame (const frame_info_ptr &this_frame)
 {
   FRAME_SCOPED_DEBUG_ENTER_EXIT;
 
@@ -2703,14 +2705,14 @@ get_prev_frame (frame_info_ptr this_frame)
 }
 
 CORE_ADDR
-get_frame_pc (frame_info_ptr frame)
+get_frame_pc (const frame_info_ptr &frame)
 {
   gdb_assert (frame->next != NULL);
   return frame_unwind_pc (frame_info_ptr (frame->next));
 }
 
 bool
-get_frame_pc_if_available (frame_info_ptr frame, CORE_ADDR *pc)
+get_frame_pc_if_available (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
 
   gdb_assert (frame->next != NULL);
@@ -2733,7 +2735,7 @@ get_frame_pc_if_available (frame_info_ptr frame, CORE_ADDR *pc)
 /* Return an address that falls within THIS_FRAME's code block.  */
 
 CORE_ADDR
-get_frame_address_in_block (frame_info_ptr this_frame)
+get_frame_address_in_block (const frame_info_ptr &this_frame)
 {
   /* A draft address.  */
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -2793,7 +2795,7 @@ get_frame_address_in_block (frame_info_ptr this_frame)
 }
 
 bool
-get_frame_address_in_block_if_available (frame_info_ptr this_frame,
+get_frame_address_in_block_if_available (const frame_info_ptr &this_frame,
                                         CORE_ADDR *pc)
 {
 
@@ -2812,7 +2814,7 @@ get_frame_address_in_block_if_available (frame_info_ptr this_frame,
 }
 
 symtab_and_line
-find_frame_sal (frame_info_ptr frame)
+find_frame_sal (const frame_info_ptr &frame)
 {
   frame_info_ptr next_frame;
   int notcurrent;
@@ -2870,7 +2872,7 @@ find_frame_sal (frame_info_ptr frame)
 /* Per "frame.h", return the ``address'' of the frame.  Code should
    really be using get_frame_id().  */
 CORE_ADDR
-get_frame_base (frame_info_ptr fi)
+get_frame_base (const frame_info_ptr &fi)
 {
   return get_frame_id (fi).stack_addr;
 }
@@ -2878,7 +2880,7 @@ get_frame_base (frame_info_ptr fi)
 /* High-level offsets into the frame.  Used by the debug info.  */
 
 CORE_ADDR
-get_frame_base_address (frame_info_ptr fi)
+get_frame_base_address (const frame_info_ptr &fi)
 {
   if (get_frame_type (fi) != NORMAL_FRAME)
     return 0;
@@ -2892,7 +2894,7 @@ get_frame_base_address (frame_info_ptr fi)
 }
 
 CORE_ADDR
-get_frame_locals_address (frame_info_ptr fi)
+get_frame_locals_address (const frame_info_ptr &fi)
 {
   if (get_frame_type (fi) != NORMAL_FRAME)
     return 0;
@@ -2907,7 +2909,7 @@ get_frame_locals_address (frame_info_ptr fi)
 }
 
 CORE_ADDR
-get_frame_args_address (frame_info_ptr fi)
+get_frame_args_address (const frame_info_ptr &fi)
 {
   if (get_frame_type (fi) != NORMAL_FRAME)
     return 0;
@@ -2925,7 +2927,7 @@ get_frame_args_address (frame_info_ptr fi)
    otherwise.  */
 
 bool
-frame_unwinder_is (frame_info_ptr fi, const frame_unwind *unwinder)
+frame_unwinder_is (const frame_info_ptr &fi, const frame_unwind *unwinder)
 {
   if (fi->unwind == nullptr)
     frame_unwind_find_by_frame (fi, &fi->prologue_cache);
@@ -2937,7 +2939,7 @@ frame_unwinder_is (frame_info_ptr fi, const frame_unwind *unwinder)
    or -1 for a NULL frame.  */
 
 int
-frame_relative_level (frame_info_ptr fi)
+frame_relative_level (const frame_info_ptr &fi)
 {
   if (fi == NULL)
     return -1;
@@ -2946,7 +2948,7 @@ frame_relative_level (frame_info_ptr fi)
 }
 
 enum frame_type
-get_frame_type (frame_info_ptr frame)
+get_frame_type (const frame_info_ptr &frame)
 {
   if (frame->unwind == NULL)
     /* Initialize the frame's unwinder because that's what
@@ -2956,13 +2958,13 @@ get_frame_type (frame_info_ptr frame)
 }
 
 struct program_space *
-get_frame_program_space (frame_info_ptr frame)
+get_frame_program_space (const frame_info_ptr &frame)
 {
   return frame->pspace;
 }
 
 struct program_space *
-frame_unwind_program_space (frame_info_ptr this_frame)
+frame_unwind_program_space (const frame_info_ptr &this_frame)
 {
   gdb_assert (this_frame);
 
@@ -2973,7 +2975,7 @@ frame_unwind_program_space (frame_info_ptr this_frame)
 }
 
 const address_space *
-get_frame_address_space (frame_info_ptr frame)
+get_frame_address_space (const frame_info_ptr &frame)
 {
   return frame->aspace;
 }
@@ -2981,14 +2983,14 @@ get_frame_address_space (frame_info_ptr frame)
 /* Memory access methods.  */
 
 void
-get_frame_memory (frame_info_ptr this_frame, CORE_ADDR addr,
+get_frame_memory (const frame_info_ptr &this_frame, CORE_ADDR addr,
                  gdb::array_view<gdb_byte> buffer)
 {
   read_memory (addr, buffer.data (), buffer.size ());
 }
 
 LONGEST
-get_frame_memory_signed (frame_info_ptr this_frame, CORE_ADDR addr,
+get_frame_memory_signed (const frame_info_ptr &this_frame, CORE_ADDR addr,
                         int len)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2998,7 +3000,7 @@ get_frame_memory_signed (frame_info_ptr this_frame, CORE_ADDR addr,
 }
 
 ULONGEST
-get_frame_memory_unsigned (frame_info_ptr this_frame, CORE_ADDR addr,
+get_frame_memory_unsigned (const frame_info_ptr &this_frame, CORE_ADDR addr,
                           int len)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -3008,7 +3010,7 @@ get_frame_memory_unsigned (frame_info_ptr this_frame, CORE_ADDR addr,
 }
 
 bool
-safe_frame_unwind_memory (frame_info_ptr this_frame,
+safe_frame_unwind_memory (const frame_info_ptr &this_frame,
                          CORE_ADDR addr, gdb::array_view<gdb_byte> buffer)
 {
   /* NOTE: target_read_memory returns zero on success!  */
@@ -3018,13 +3020,13 @@ safe_frame_unwind_memory (frame_info_ptr this_frame,
 /* Architecture methods.  */
 
 struct gdbarch *
-get_frame_arch (frame_info_ptr this_frame)
+get_frame_arch (const frame_info_ptr &this_frame)
 {
   return frame_unwind_arch (frame_info_ptr (this_frame->next));
 }
 
 struct gdbarch *
-frame_unwind_arch (frame_info_ptr next_frame)
+frame_unwind_arch (const frame_info_ptr &next_frame)
 {
   if (!next_frame->prev_arch.p)
     {
@@ -3050,14 +3052,14 @@ frame_unwind_arch (frame_info_ptr next_frame)
 }
 
 struct gdbarch *
-frame_unwind_caller_arch (frame_info_ptr next_frame)
+frame_unwind_caller_arch (const frame_info_ptr &initial_next_frame)
 {
-  next_frame = skip_artificial_frames (next_frame);
+  frame_info_ptr next_frame = skip_artificial_frames (initial_next_frame);
 
   /* We must have a non-artificial frame.  The caller is supposed to check
      the result of frame_unwind_caller_id (), which returns NULL_FRAME_ID
      in this case.  */
-  gdb_assert (next_frame != NULL);
+  gdb_assert (next_frame != nullptr);
 
   return frame_unwind_arch (next_frame);
 }
@@ -3065,7 +3067,7 @@ frame_unwind_caller_arch (frame_info_ptr next_frame)
 /* Gets the language of FRAME.  */
 
 enum language
-get_frame_language (frame_info_ptr frame)
+get_frame_language (const frame_info_ptr &frame)
 {
   CORE_ADDR pc = 0;
   bool pc_p = false;
@@ -3106,7 +3108,7 @@ get_frame_language (frame_info_ptr frame)
 /* Stack pointer methods.  */
 
 CORE_ADDR
-get_frame_sp (frame_info_ptr this_frame)
+get_frame_sp (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
 
@@ -3118,9 +3120,9 @@ get_frame_sp (frame_info_ptr this_frame)
 /* See frame.h.  */
 
 frame_info_ptr
-frame_follow_static_link (frame_info_ptr frame)
+frame_follow_static_link (const frame_info_ptr &initial_frame)
 {
-  const block *frame_block = get_frame_block (frame, nullptr);
+  const block *frame_block = get_frame_block (initial_frame, nullptr);
   if (frame_block == nullptr)
     return {};
 
@@ -3132,11 +3134,12 @@ frame_follow_static_link (frame_info_ptr frame)
 
   CORE_ADDR upper_frame_base;
 
-  if (!dwarf2_evaluate_property (static_link, frame, NULL, &upper_frame_base))
+  if (!dwarf2_evaluate_property (static_link, initial_frame, NULL, &upper_frame_base))
     return {};
 
   /* Now climb up the stack frame until we reach the frame we are interested
      in.  */
+  frame_info_ptr frame = initial_frame;
   for (; frame != nullptr; frame = get_prev_frame (frame))
     {
       struct symbol *framefunc = get_frame_function (frame);
@@ -3163,7 +3166,7 @@ frame_follow_static_link (frame_info_ptr frame)
 /* Return the reason why we can't unwind past FRAME.  */
 
 enum unwind_stop_reason
-get_frame_unwind_stop_reason (frame_info_ptr frame)
+get_frame_unwind_stop_reason (const frame_info_ptr &frame)
 {
   /* Fill-in STOP_REASON.  */
   get_prev_frame_always (frame);
@@ -3190,7 +3193,7 @@ unwind_stop_reason_to_string (enum unwind_stop_reason reason)
 }
 
 const char *
-frame_stop_reason_string (frame_info_ptr fi)
+frame_stop_reason_string (const frame_info_ptr &fi)
 {
   gdb_assert (fi->prev_p);
   gdb_assert (fi->prev == NULL);
@@ -3225,7 +3228,7 @@ frame_stop_reason_symbol_string (enum unwind_stop_reason reason)
    FRAME.  */
 
 void
-frame_cleanup_after_sniffer (frame_info_ptr frame)
+frame_cleanup_after_sniffer (const frame_info_ptr &frame)
 {
   /* The sniffer should not allocate a prologue cache if it did not
      match this frame.  */
@@ -3255,7 +3258,7 @@ frame_cleanup_after_sniffer (frame_info_ptr frame)
    frame_cleanup_after_sniffer.  */
 
 void
-frame_prepare_for_sniffer (frame_info_ptr frame,
+frame_prepare_for_sniffer (const frame_info_ptr &frame,
                           const struct frame_unwind *unwind)
 {
   gdb_assert (frame->unwind == NULL);
index c3787d4649cf2723d9b4a0b59a9e4f56b41922d9..e784c17b48071fab7c09733869ea17b0b150ba87 100644 (file)
@@ -450,7 +450,7 @@ extern void reinit_frame_cache (void);
 extern frame_info_ptr get_selected_frame (const char *message = nullptr);
 
 /* Select a specific frame.  */
-extern void select_frame (frame_info_ptr);
+extern void select_frame (const frame_info_ptr &);
 
 /* Save the frame ID and frame level of the selected frame in FRAME_ID
    and FRAME_LEVEL, to be restored later with restore_selected_frame.
@@ -475,19 +475,19 @@ extern void restore_selected_frame (frame_id frame_id, int frame_level)
 
 /* Given a FRAME, return the next (more inner, younger) or previous
    (more outer, older) frame.  */
-extern frame_info_ptr get_prev_frame (frame_info_ptr);
-extern frame_info_ptr get_next_frame (frame_info_ptr);
+extern frame_info_ptr get_prev_frame (const frame_info_ptr &);
+extern frame_info_ptr get_next_frame (const frame_info_ptr &);
 
 /* Like get_next_frame(), but allows return of the sentinel frame.  NULL
    is never returned.  */
-extern frame_info_ptr get_next_frame_sentinel_okay (frame_info_ptr);
+extern frame_info_ptr get_next_frame_sentinel_okay (const frame_info_ptr &);
 
 /* Return a "struct frame_info" corresponding to the frame that called
    THIS_FRAME.  Returns NULL if there is no such frame.
 
    Unlike get_prev_frame, this function always tries to unwind the
    frame.  */
-extern frame_info_ptr get_prev_frame_always (frame_info_ptr);
+extern frame_info_ptr get_prev_frame_always (const frame_info_ptr &);
 
 /* Given a frame's ID, relocate the frame.  Returns NULL if the frame
    is not found.  */
@@ -499,12 +499,12 @@ extern frame_info_ptr frame_find_by_id (frame_id id);
    this frame.
 
    This replaced: frame->pc; */
-extern CORE_ADDR get_frame_pc (frame_info_ptr);
+extern CORE_ADDR get_frame_pc (const frame_info_ptr &);
 
 /* Same as get_frame_pc, but return a boolean indication of whether
    the PC is actually available, instead of throwing an error.  */
 
-extern bool get_frame_pc_if_available (frame_info_ptr frame, CORE_ADDR *pc);
+extern bool get_frame_pc_if_available (const frame_info_ptr &frame, CORE_ADDR *pc);
 
 /* An address (not necessarily aligned to an instruction boundary)
    that falls within THIS frame's code block.
@@ -519,32 +519,32 @@ extern bool get_frame_pc_if_available (frame_info_ptr frame, CORE_ADDR *pc);
    function returns the frame's PC-1 which "should" be an address in
    the frame's block.  */
 
-extern CORE_ADDR get_frame_address_in_block (frame_info_ptr this_frame);
+extern CORE_ADDR get_frame_address_in_block (const frame_info_ptr &this_frame);
 
 /* Same as get_frame_address_in_block, but returns a boolean
    indication of whether the frame address is determinable (when the
    PC is unavailable, it will not be), instead of possibly throwing an
    error trying to read an unavailable PC.  */
 
-extern bool get_frame_address_in_block_if_available (frame_info_ptr this_frame,
+extern bool get_frame_address_in_block_if_available (const frame_info_ptr &this_frame,
                                                     CORE_ADDR *pc);
 
 /* The frame's inner-most bound.  AKA the stack-pointer.  Confusingly
    known as top-of-stack.  */
 
-extern CORE_ADDR get_frame_sp (frame_info_ptr);
+extern CORE_ADDR get_frame_sp (const frame_info_ptr &);
 
 /* Following on from the `resume' address.  Return the entry point
    address of the function containing that resume address, or zero if
    that function isn't known.  */
-extern CORE_ADDR get_frame_func (frame_info_ptr fi);
+extern CORE_ADDR get_frame_func (const frame_info_ptr &fi);
 
 /* Same as get_frame_func, but returns a boolean indication of whether
    the frame function is determinable (when the PC is unavailable, it
    will not be), instead of possibly throwing an error trying to read
    an unavailable PC.  */
 
-extern bool get_frame_func_if_available (frame_info_ptr fi, CORE_ADDR *);
+extern bool get_frame_func_if_available (const frame_info_ptr &fi, CORE_ADDR *);
 
 /* Closely related to the resume address, various symbol table
    attributes that are determined by the PC.  Note that for a normal
@@ -564,12 +564,12 @@ extern bool get_frame_func_if_available (frame_info_ptr fi, CORE_ADDR *);
    find_frame_symtab(), find_frame_function().  Each will need to be
    carefully considered to determine if the real intent was for it to
    apply to the PC or the adjusted PC.  */
-extern symtab_and_line find_frame_sal (frame_info_ptr frame);
+extern symtab_and_line find_frame_sal (const frame_info_ptr &frame);
 
 /* Set the current source and line to the location given by frame
    FRAME, if possible.  */
 
-void set_current_sal_from_frame (frame_info_ptr);
+void set_current_sal_from_frame (const frame_info_ptr &);
 
 /* Return the frame base (what ever that is) (DEPRECATED).
 
@@ -593,59 +593,59 @@ void set_current_sal_from_frame (frame_info_ptr);
 
    This replaced: frame->frame; */
 
-extern CORE_ADDR get_frame_base (frame_info_ptr);
+extern CORE_ADDR get_frame_base (const frame_info_ptr &);
 
 /* Return the per-frame unique identifier.  Can be used to relocate a
    frame after a frame cache flush (and other similar operations).  If
    FI is NULL, return the null_frame_id.  */
-extern struct frame_id get_frame_id (frame_info_ptr fi);
-extern struct frame_id get_stack_frame_id (frame_info_ptr fi);
-extern struct frame_id frame_unwind_caller_id (frame_info_ptr next_frame);
+extern frame_id get_frame_id (const frame_info_ptr &fi);
+extern frame_id get_stack_frame_id (const frame_info_ptr &fi);
+extern frame_id frame_unwind_caller_id (const frame_info_ptr &next_frame);
 
 /* Assuming that a frame is `normal', return its base-address, or 0 if
    the information isn't available.  NOTE: This address is really only
    meaningful to the frame's high-level debug info.  */
-extern CORE_ADDR get_frame_base_address (frame_info_ptr);
+extern CORE_ADDR get_frame_base_address (const frame_info_ptr &);
 
 /* Assuming that a frame is `normal', return the base-address of the
    local variables, or 0 if the information isn't available.  NOTE:
    This address is really only meaningful to the frame's high-level
    debug info.  Typically, the argument and locals share a single
    base-address.  */
-extern CORE_ADDR get_frame_locals_address (frame_info_ptr);
+extern CORE_ADDR get_frame_locals_address (const frame_info_ptr &);
 
 /* Assuming that a frame is `normal', return the base-address of the
    parameter list, or 0 if that information isn't available.  NOTE:
    This address is really only meaningful to the frame's high-level
    debug info.  Typically, the argument and locals share a single
    base-address.  */
-extern CORE_ADDR get_frame_args_address (frame_info_ptr);
+extern CORE_ADDR get_frame_args_address (const frame_info_ptr &);
 
 /* The frame's level: 0 for innermost, 1 for its caller, ...; or -1
    for an invalid frame).  */
-extern int frame_relative_level (frame_info_ptr fi);
+extern int frame_relative_level (const frame_info_ptr &fi);
 
 /* Return the frame's type.  */
 
-extern enum frame_type get_frame_type (frame_info_ptr);
+extern enum frame_type get_frame_type (const frame_info_ptr &);
 
 /* Return the frame's program space.  */
-extern struct program_space *get_frame_program_space (frame_info_ptr);
+extern struct program_space *get_frame_program_space (const frame_info_ptr &);
 
 /* Unwind THIS frame's program space from the NEXT frame.  */
-extern struct program_space *frame_unwind_program_space (frame_info_ptr);
+extern struct program_space *frame_unwind_program_space (const frame_info_ptr &);
 
 class address_space;
 
 /* Return the frame's address space.  */
-extern const address_space *get_frame_address_space (frame_info_ptr);
+extern const address_space *get_frame_address_space (const frame_info_ptr &);
 
 /* A frame may have a "static link".  That is, in some languages, a
    nested function may have access to variables from the enclosing
    block and frame.  This function looks for a frame's static link.
    If found, returns the corresponding frame; otherwise, returns a
    null frame_info_ptr.  */
-extern frame_info_ptr frame_follow_static_link (frame_info_ptr frame);
+extern frame_info_ptr frame_follow_static_link (const frame_info_ptr &frame);
 
 /* For frames where we can not unwind further, describe why.  */
 
@@ -665,7 +665,7 @@ enum unwind_stop_reason
 
 /* Return the reason why we can't unwind past this frame.  */
 
-enum unwind_stop_reason get_frame_unwind_stop_reason (frame_info_ptr);
+enum unwind_stop_reason get_frame_unwind_stop_reason (const frame_info_ptr &);
 
 /* Translate a reason code to an informative string.  This converts the
    generic stop reason codes into a generic string describing the code.
@@ -682,13 +682,13 @@ const char *unwind_stop_reason_to_string (enum unwind_stop_reason);
 
    Should only be called for frames that don't have a previous frame.  */
 
-const char *frame_stop_reason_string (frame_info_ptr);
+const char *frame_stop_reason_string (const frame_info_ptr &);
 
 /* Unwind the stack frame so that the value of REGNUM, in the previous
    (up, older) frame is returned.  If VALUEP is NULL, don't
    fetch/compute the value.  Instead just return the location of the
    value.  */
-extern void frame_register_unwind (frame_info_ptr frame, int regnum,
+extern void frame_register_unwind (const frame_info_ptr &frame, int regnum,
                                   int *optimizedp, int *unavailablep,
                                   enum lval_type *lvalp,
                                   CORE_ADDR *addrp, int *realnump,
@@ -700,23 +700,23 @@ extern void frame_register_unwind (frame_info_ptr frame, int regnum,
    fetch fails.  The value methods never return NULL, but usually
    do return a lazy value.  */
 
-extern void frame_unwind_register (frame_info_ptr next_frame,
+extern void frame_unwind_register (const frame_info_ptr &next_frame,
                                   int regnum, gdb_byte *buf);
-extern void get_frame_register (frame_info_ptr frame,
+extern void get_frame_register (const frame_info_ptr &frame,
                                int regnum, gdb_byte *buf);
 
-struct value *frame_unwind_register_value (frame_info_ptr next_frame,
+struct value *frame_unwind_register_value (const frame_info_ptr &next_frame,
                                           int regnum);
-struct value *get_frame_register_value (frame_info_ptr frame,
+struct value *get_frame_register_value (const frame_info_ptr &frame,
                                        int regnum);
 
-extern LONGEST frame_unwind_register_signed (frame_info_ptr next_frame,
+extern LONGEST frame_unwind_register_signed (const frame_info_ptr &next_frame,
                                             int regnum);
-extern LONGEST get_frame_register_signed (frame_info_ptr frame,
+extern LONGEST get_frame_register_signed (const frame_info_ptr &frame,
                                          int regnum);
-extern ULONGEST frame_unwind_register_unsigned (frame_info_ptr next_frame,
-                                               int regnum);
-extern ULONGEST get_frame_register_unsigned (frame_info_ptr frame,
+extern ULONGEST frame_unwind_register_unsigned
+  (const frame_info_ptr &next_frame, int regnum);
+extern ULONGEST get_frame_register_unsigned (const frame_info_ptr &frame,
                                             int regnum);
 
 /* Read a register from this, or unwind a register from the next
@@ -724,39 +724,39 @@ extern ULONGEST get_frame_register_unsigned (frame_info_ptr frame,
    get_frame_register_value, that do not throw if the result is
    optimized out or unavailable.  */
 
-extern bool read_frame_register_unsigned (frame_info_ptr frame,
+extern bool read_frame_register_unsigned (const frame_info_ptr &frame,
                                          int regnum, ULONGEST *val);
 
 /* The reverse.  Store a register value relative to NEXT_FRAME's previous frame.
    Note: this call makes the frame's state undefined.  The register and frame
    caches must be flushed.  */
-extern void put_frame_register (frame_info_ptr next_frame, int regnum,
+extern void put_frame_register (const frame_info_ptr &next_frame, int regnum,
                                gdb::array_view<const gdb_byte> buf);
 
 /* Read LEN bytes from one or multiple registers starting with REGNUM in
    NEXT_FRAME's previous frame, starting at OFFSET, into BUF.  If the register
    contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP
    accordingly.  */
-extern bool get_frame_register_bytes (frame_info_ptr next_frame, int regnum,
-                                     CORE_ADDR offset,
+extern bool get_frame_register_bytes (const frame_info_ptr &next_frame,
+                                     int regnum, CORE_ADDR offset,
                                      gdb::array_view<gdb_byte> buffer,
                                      int *optimizedp, int *unavailablep);
 
 /* Write bytes from BUFFER to one or multiple registers starting with REGNUM
    in NEXT_FRAME's previous frame, starting at OFFSET.  */
-extern void put_frame_register_bytes (frame_info_ptr next_frame, int regnum,
-                                     CORE_ADDR offset,
+extern void put_frame_register_bytes (const frame_info_ptr &next_frame,
+                                     int regnum, CORE_ADDR offset,
                                      gdb::array_view<const gdb_byte> buffer);
 
 /* Unwind the PC.  Strictly speaking return the resume address of the
    calling frame.  For GDB, `pc' is the resume address and not a
    specific register.  */
 
-extern CORE_ADDR frame_unwind_caller_pc (frame_info_ptr frame);
+extern CORE_ADDR frame_unwind_caller_pc (const frame_info_ptr &next_frame);
 
 /* Discard the specified frame.  Restoring the registers to the state
    of the caller.  */
-extern void frame_pop (frame_info_ptr frame);
+extern void frame_pop (const frame_info_ptr &frame);
 
 /* Return memory from the specified frame.  A frame knows its thread /
    LWP and hence can find its way down to a target.  The assumption
@@ -771,26 +771,26 @@ extern void frame_pop (frame_info_ptr frame);
    If architecture / memory changes are always separated by special
    adaptor frames this should be ok.  */
 
-extern void get_frame_memory (frame_info_ptr this_frame, CORE_ADDR addr,
+extern void get_frame_memory (const frame_info_ptr &this_frame, CORE_ADDR addr,
                              gdb::array_view<gdb_byte> buffer);
-extern LONGEST get_frame_memory_signed (frame_info_ptr this_frame,
+extern LONGEST get_frame_memory_signed (const frame_info_ptr &this_frame,
                                        CORE_ADDR memaddr, int len);
-extern ULONGEST get_frame_memory_unsigned (frame_info_ptr this_frame,
+extern ULONGEST get_frame_memory_unsigned (const frame_info_ptr &this_frame,
                                           CORE_ADDR memaddr, int len);
 
 /* Same as above, but return true zero when the entire memory read
    succeeds, false otherwise.  */
-extern bool safe_frame_unwind_memory (frame_info_ptr this_frame, CORE_ADDR addr,
+extern bool safe_frame_unwind_memory (const frame_info_ptr &this_frame, CORE_ADDR addr,
                                      gdb::array_view<gdb_byte> buffer);
 
 /* Return this frame's architecture.  */
-extern struct gdbarch *get_frame_arch (frame_info_ptr this_frame);
+extern gdbarch *get_frame_arch (const frame_info_ptr &this_frame);
 
 /* Return the previous frame's architecture.  */
-extern struct gdbarch *frame_unwind_arch (frame_info_ptr next_frame);
+extern gdbarch *frame_unwind_arch (const frame_info_ptr &next_frame);
 
 /* Return the previous frame's architecture, skipping inline functions.  */
-extern struct gdbarch *frame_unwind_caller_arch (frame_info_ptr frame);
+extern gdbarch *frame_unwind_caller_arch (const frame_info_ptr &next_frame);
 
 
 /* Values for the source flag to be used in print_frame_info ().
@@ -830,9 +830,9 @@ extern void *frame_obstack_zalloc (unsigned long size);
 class readonly_detached_regcache;
 /* Create a regcache, and copy the frame's registers into it.  */
 std::unique_ptr<readonly_detached_regcache> frame_save_as_regcache
-    (frame_info_ptr this_frame);
+    (const frame_info_ptr &this_frame);
 
-extern const struct block *get_frame_block (frame_info_ptr,
+extern const struct block *get_frame_block (const frame_info_ptr &,
                                            CORE_ADDR *addr_in_block);
 
 /* Return the `struct block' that belongs to the selected thread's
@@ -863,7 +863,7 @@ extern const struct block *get_frame_block (frame_info_ptr,
 
 extern const struct block *get_selected_block (CORE_ADDR *addr_in_block);
 
-extern struct symbol *get_frame_function (frame_info_ptr);
+extern struct symbol *get_frame_function (const frame_info_ptr &);
 
 extern CORE_ADDR get_pc_function_start (CORE_ADDR);
 
@@ -873,22 +873,22 @@ extern frame_info_ptr find_relative_frame (frame_info_ptr, int *);
    the function call.  */
 
 extern void print_stack_frame_to_uiout (struct ui_out *uiout,
-                                       frame_info_ptr, int print_level,
+                                       const frame_info_ptr &, int print_level,
                                        enum print_what print_what,
                                        int set_current_sal);
 
-extern void print_stack_frame (frame_info_ptr, int print_level,
+extern void print_stack_frame (const frame_info_ptr &, int print_level,
                               enum print_what print_what,
                               int set_current_sal);
 
 extern void print_frame_info (const frame_print_options &fp_opts,
-                             frame_info_ptr, int print_level,
+                             const frame_info_ptr &, int print_level,
                              enum print_what print_what, int args,
                              int set_current_sal);
 
 extern frame_info_ptr block_innermost_frame (const struct block *);
 
-extern bool deprecated_frame_register_read (frame_info_ptr frame, int regnum,
+extern bool deprecated_frame_register_read (const frame_info_ptr &frame, int regnum,
                                            gdb_byte *buf);
 
 /* From stack.c.  */
@@ -960,10 +960,10 @@ struct frame_arg
 };
 
 extern void read_frame_arg (const frame_print_options &fp_opts,
-                           symbol *sym, frame_info_ptr frame,
+                           symbol *sym, const frame_info_ptr &frame,
                            struct frame_arg *argp,
                            struct frame_arg *entryargp);
-extern void read_frame_local (struct symbol *sym, frame_info_ptr frame,
+extern void read_frame_local (struct symbol *sym, const frame_info_ptr &frame,
                              struct frame_arg *argp);
 
 extern void info_args_command (const char *, int);
@@ -976,13 +976,13 @@ extern void return_command (const char *, int);
    If sniffing fails, the caller should be sure to call
    frame_cleanup_after_sniffer.  */
 
-extern void frame_prepare_for_sniffer (frame_info_ptr frame,
+extern void frame_prepare_for_sniffer (const frame_info_ptr &frame,
                                       const struct frame_unwind *unwind);
 
 /* Clean up after a failed (wrong unwinder) attempt to unwind past
    FRAME.  */
 
-extern void frame_cleanup_after_sniffer (frame_info_ptr frame);
+extern void frame_cleanup_after_sniffer (const frame_info_ptr &frame);
 
 /* Notes (cagney/2002-11-27, drow/2003-09-06):
 
@@ -1023,22 +1023,22 @@ extern frame_info_ptr create_new_frame (CORE_ADDR base, CORE_ADDR pc);
 /* Return true if the frame unwinder for frame FI is UNWINDER; false
    otherwise.  */
 
-extern bool frame_unwinder_is (frame_info_ptr fi, const frame_unwind *unwinder);
+extern bool frame_unwinder_is (const frame_info_ptr &fi, const frame_unwind *unwinder);
 
 /* Return the language of FRAME.  */
 
-extern enum language get_frame_language (frame_info_ptr frame);
+extern enum language get_frame_language (const frame_info_ptr &frame);
 
 /* Return the first non-tailcall frame above FRAME or FRAME if it is not a
    tailcall frame.  Return NULL if FRAME is the start of a tailcall-only
    chain.  */
 
-extern frame_info_ptr skip_tailcall_frames (frame_info_ptr frame);
+extern frame_info_ptr skip_tailcall_frames (const frame_info_ptr &frame);
 
 /* Return the first frame above FRAME or FRAME of which the code is
    writable.  */
 
-extern frame_info_ptr skip_unwritable_frames (frame_info_ptr frame);
+extern frame_info_ptr skip_unwritable_frames (const frame_info_ptr &frame);
 
 /* Data for the "set backtrace" settings.  */
 
@@ -1070,11 +1070,11 @@ unsigned int get_frame_cache_generation ();
 
 /* Mark that the PC value is masked for the previous frame.  */
 
-extern void set_frame_previous_pc_masked (frame_info_ptr frame);
+extern void set_frame_previous_pc_masked (const frame_info_ptr &frame);
 
 /* Get whether the PC value is masked for the given frame.  */
 
-extern bool get_frame_pc_masked (frame_info_ptr frame);
+extern bool get_frame_pc_masked (const frame_info_ptr &frame);
 
 
 #endif /* !defined (FRAME_H)  */
index e02d3390a33d98aa60a4480c474dd3653955aa7f..5160c3b0c1d6e6080eecf170f724810d815ec202 100644 (file)
@@ -168,7 +168,7 @@ frv_linux_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc,
       } __attribute__((aligned(8)));  */
 
 static LONGEST
-frv_linux_sigcontext_reg_addr (frame_info_ptr this_frame, int regno,
+frv_linux_sigcontext_reg_addr (const frame_info_ptr &this_frame, int regno,
                               CORE_ADDR *sc_addr_cache_ptr)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -258,7 +258,7 @@ frv_linux_sigcontext_reg_addr (frame_info_ptr this_frame, int regno,
 /* Signal trampolines.  */
 
 static struct trad_frame_cache *
-frv_linux_sigtramp_frame_cache (frame_info_ptr this_frame,
+frv_linux_sigtramp_frame_cache (const frame_info_ptr &this_frame,
                                void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -297,7 +297,7 @@ frv_linux_sigtramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-frv_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
+frv_linux_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                  void **this_cache,
                                  struct frame_id *this_id)
 {
@@ -307,7 +307,7 @@ frv_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-frv_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+frv_linux_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                        void **this_cache, int regnum)
 {
   /* Make sure we've initialized the cache.  */
@@ -318,7 +318,7 @@ frv_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 frv_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                 frame_info_ptr this_frame,
+                                 const frame_info_ptr &this_frame,
                                  void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
index 1994dd782ad569855bbd1380eb5fff72a84eef4b..bcb2c621945bc85aa76f7b36ecf37bbb3d0c0726 100644 (file)
@@ -510,7 +510,7 @@ is_argument_reg (int reg)
    prologue analysis.  */
 static CORE_ADDR
 frv_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
-                     frame_info_ptr this_frame,
+                     const frame_info_ptr &this_frame,
                      struct frv_unwind_cache *info)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1084,7 +1084,7 @@ frv_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 
 static struct frv_unwind_cache *
-frv_frame_unwind_cache (frame_info_ptr this_frame,
+frv_frame_unwind_cache (const frame_info_ptr &this_frame,
                         void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1367,7 +1367,7 @@ frv_return_value (struct gdbarch *gdbarch, struct value *function,
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-frv_frame_this_id (frame_info_ptr this_frame,
+frv_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_prologue_cache, struct frame_id *this_id)
 {
   struct frv_unwind_cache *info
@@ -1397,7 +1397,7 @@ frv_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-frv_frame_prev_register (frame_info_ptr this_frame,
+frv_frame_prev_register (const frame_info_ptr &this_frame,
                         void **this_prologue_cache, int regnum)
 {
   struct frv_unwind_cache *info
@@ -1416,7 +1416,7 @@ static const struct frame_unwind frv_frame_unwind = {
 };
 
 static CORE_ADDR
-frv_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+frv_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct frv_unwind_cache *info
     = frv_frame_unwind_cache (this_frame, this_cache);
index 069d40f56fb200d94eebdcc001a913f99f497da0..60cd2c974a1222cb4fea583fae8a521de8667d07 100644 (file)
@@ -450,7 +450,7 @@ ft32_alloc_frame_cache (void)
 /* Populate a ft32_frame_cache object for this_frame.  */
 
 static struct ft32_frame_cache *
-ft32_frame_cache (frame_info_ptr this_frame, void **this_cache)
+ft32_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct ft32_frame_cache *cache;
   CORE_ADDR current_pc;
@@ -490,7 +490,7 @@ ft32_frame_cache (frame_info_ptr this_frame, void **this_cache)
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-ft32_frame_this_id (frame_info_ptr this_frame,
+ft32_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_prologue_cache, struct frame_id *this_id)
 {
   struct ft32_frame_cache *cache = ft32_frame_cache (this_frame,
@@ -506,7 +506,7 @@ ft32_frame_this_id (frame_info_ptr this_frame,
 /* Get the value of register regnum in the previous stack frame.  */
 
 static struct value *
-ft32_frame_prev_register (frame_info_ptr this_frame,
+ft32_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_prologue_cache, int regnum)
 {
   struct ft32_frame_cache *cache = ft32_frame_cache (this_frame,
@@ -538,7 +538,7 @@ static const struct frame_unwind ft32_frame_unwind =
 /* Return the base address of this_frame.  */
 
 static CORE_ADDR
-ft32_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+ft32_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct ft32_frame_cache *cache = ft32_frame_cache (this_frame,
                                                     this_cache);
index 7a57bdcebe2331494e9e7fc81d87e389e404c8ae..13dd0ed5d5e143e1fe016f3b08cd8eae24208cf7 100644 (file)
@@ -196,8 +196,8 @@ extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_p
 
 extern bool gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch);
 
-typedef struct value * (gdbarch_pseudo_register_read_value_ftype) (struct gdbarch *gdbarch, frame_info_ptr next_frame, int cookednum);
-extern struct value * gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, frame_info_ptr next_frame, int cookednum);
+typedef struct value * (gdbarch_pseudo_register_read_value_ftype) (struct gdbarch *gdbarch, const frame_info_ptr &next_frame, int cookednum);
+extern struct value * gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, const frame_info_ptr &next_frame, int cookednum);
 extern void set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value);
 
 /* Write bytes in BUF to pseudo register with number PSEUDO_REG_NUM.
@@ -207,8 +207,8 @@ extern void set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, gdb
 
 extern bool gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
 
-typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, frame_info_ptr next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf);
-extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, frame_info_ptr next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf);
+typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, const frame_info_ptr &next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf);
+extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, const frame_info_ptr &next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf);
 extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
 
 /* Write bytes to a pseudo register.
@@ -335,8 +335,8 @@ extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register
    should match the address at which the breakpoint was set in the dummy
    frame. */
 
-typedef struct frame_id (gdbarch_dummy_id_ftype) (struct gdbarch *gdbarch, frame_info_ptr this_frame);
-extern struct frame_id gdbarch_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame);
+typedef struct frame_id (gdbarch_dummy_id_ftype) (struct gdbarch *gdbarch, const frame_info_ptr &this_frame);
+extern struct frame_id gdbarch_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame);
 extern void set_gdbarch_dummy_id (struct gdbarch *gdbarch, gdbarch_dummy_id_ftype *dummy_id);
 
 /* Implement DUMMY_ID and PUSH_DUMMY_CALL, then delete
@@ -362,22 +362,22 @@ extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_d
 
 /* Return true if the code of FRAME is writable. */
 
-typedef int (gdbarch_code_of_frame_writable_ftype) (struct gdbarch *gdbarch, frame_info_ptr frame);
-extern int gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, frame_info_ptr frame);
+typedef int (gdbarch_code_of_frame_writable_ftype) (struct gdbarch *gdbarch, const frame_info_ptr &frame);
+extern int gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, const frame_info_ptr &frame);
 extern void set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, gdbarch_code_of_frame_writable_ftype *code_of_frame_writable);
 
-typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, int regnum, int all);
-extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, int regnum, int all);
+typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, int regnum, int all);
+extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, int regnum, int all);
 extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
 
-typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args);
-extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args);
+typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args);
+extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args);
 extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
 
 extern bool gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
 
-typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args);
-extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args);
+typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args);
+extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args);
 extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
 
 /* MAP a GDB RAW register number onto a simulator register number.  See
@@ -402,8 +402,8 @@ extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_
 
 extern bool gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
 
-typedef int (gdbarch_get_longjmp_target_ftype) (frame_info_ptr frame, CORE_ADDR *pc);
-extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR *pc);
+typedef int (gdbarch_get_longjmp_target_ftype) (const frame_info_ptr &frame, CORE_ADDR *pc);
+extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, const frame_info_ptr &frame, CORE_ADDR *pc);
 extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
 
 extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
@@ -413,12 +413,12 @@ typedef int (gdbarch_convert_register_p_ftype) (struct gdbarch *gdbarch, int reg
 extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type);
 extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
 
-typedef int (gdbarch_register_to_value_ftype) (frame_info_ptr frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep);
-extern int gdbarch_register_to_value (struct gdbarch *gdbarch, frame_info_ptr frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep);
+typedef int (gdbarch_register_to_value_ftype) (const frame_info_ptr &frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep);
+extern int gdbarch_register_to_value (struct gdbarch *gdbarch, const frame_info_ptr &frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep);
 extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
 
-typedef void (gdbarch_value_to_register_ftype) (frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *buf);
-extern void gdbarch_value_to_register (struct gdbarch *gdbarch, frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *buf);
+typedef void (gdbarch_value_to_register_ftype) (const frame_info_ptr &frame, int regnum, struct type *type, const gdb_byte *buf);
+extern void gdbarch_value_to_register (struct gdbarch *gdbarch, const frame_info_ptr &frame, int regnum, struct type *type, const gdb_byte *buf);
 extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
 
 /* Construct a value representing the contents of register REGNUM in
@@ -484,8 +484,8 @@ extern void set_gdbarch_return_value_as_value (struct gdbarch *gdbarch, gdbarch_
 
    May return 0 when unable to determine that address. */
 
-typedef CORE_ADDR (gdbarch_get_return_buf_addr_ftype) (struct type *val_type, frame_info_ptr cur_frame);
-extern CORE_ADDR gdbarch_get_return_buf_addr (struct gdbarch *gdbarch, struct type *val_type, frame_info_ptr cur_frame);
+typedef CORE_ADDR (gdbarch_get_return_buf_addr_ftype) (struct type *val_type, const frame_info_ptr &cur_frame);
+extern CORE_ADDR gdbarch_get_return_buf_addr (struct gdbarch *gdbarch, struct type *val_type, const frame_info_ptr &cur_frame);
 extern void set_gdbarch_get_return_buf_addr (struct gdbarch *gdbarch, gdbarch_get_return_buf_addr_ftype *get_return_buf_addr);
 
 /* Return true if the typedef record needs to be replaced.".
@@ -635,12 +635,12 @@ extern void set_gdbarch_get_thread_local_address (struct gdbarch *gdbarch, gdbar
 extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
 extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
 
-typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, frame_info_ptr next_frame);
-extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame);
+typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, const frame_info_ptr &next_frame);
+extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame);
 extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
 
-typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, frame_info_ptr next_frame);
-extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame);
+typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, const frame_info_ptr &next_frame);
+extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, const frame_info_ptr &next_frame);
 extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
 
 /* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
@@ -648,8 +648,8 @@ extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ft
 
 extern bool gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
 
-typedef int (gdbarch_frame_num_args_ftype) (frame_info_ptr frame);
-extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, frame_info_ptr frame);
+typedef int (gdbarch_frame_num_args_ftype) (const frame_info_ptr &frame);
+extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, const frame_info_ptr &frame);
 extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
 
 extern bool gdbarch_frame_align_p (struct gdbarch *gdbarch);
@@ -768,8 +768,8 @@ extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_s
 
 extern bool gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch);
 
-typedef int (gdbarch_single_step_through_delay_ftype) (struct gdbarch *gdbarch, frame_info_ptr frame);
-extern int gdbarch_single_step_through_delay (struct gdbarch *gdbarch, frame_info_ptr frame);
+typedef int (gdbarch_single_step_through_delay_ftype) (struct gdbarch *gdbarch, const frame_info_ptr &frame);
+extern int gdbarch_single_step_through_delay (struct gdbarch *gdbarch, const frame_info_ptr &frame);
 extern void set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch, gdbarch_single_step_through_delay_ftype *single_step_through_delay);
 
 /* FIXME: cagney/2003-08-28: Need to find a better way of selecting the
@@ -779,8 +779,8 @@ typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, struct disassemble_info *in
 extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info);
 extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
 
-typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (frame_info_ptr frame, CORE_ADDR pc);
-extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc);
+typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (const frame_info_ptr &frame, CORE_ADDR pc);
+extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, const frame_info_ptr &frame, CORE_ADDR pc);
 extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
 
 /* Vtable of solib operations functions. */
@@ -927,8 +927,8 @@ extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_re
 
 extern bool gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
 
-typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (frame_info_ptr frame, int argi, struct type *type);
-extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, frame_info_ptr frame, int argi, struct type *type);
+typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (const frame_info_ptr &frame, int argi, struct type *type);
+extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, const frame_info_ptr &frame, int argi, struct type *type);
 extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
 
 /* Iterate over all supported register notes in a core file.  For each
@@ -1732,8 +1732,8 @@ extern void set_gdbarch_type_align (struct gdbarch *gdbarch, gdbarch_type_align_
 
 /* Return a string containing any flags for the given PC in the given FRAME. */
 
-typedef std::string (gdbarch_get_pc_address_flags_ftype) (frame_info_ptr frame, CORE_ADDR pc);
-extern std::string gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc);
+typedef std::string (gdbarch_get_pc_address_flags_ftype) (const frame_info_ptr &frame, CORE_ADDR pc);
+extern std::string gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, const frame_info_ptr &frame, CORE_ADDR pc);
 extern void set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, gdbarch_get_pc_address_flags_ftype *get_pc_address_flags);
 
 /* Read core file mappings */
index b9be3948d1eeed8c32efe7f970fa64933420a06d..80a04bf0caf8738ce14db3a5fb6994968fdf67df 100644 (file)
@@ -1894,7 +1894,7 @@ gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
 }
 
 struct value *
-gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, frame_info_ptr next_frame, int cookednum)
+gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, const frame_info_ptr &next_frame, int cookednum)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->pseudo_register_read_value != NULL);
@@ -1918,7 +1918,7 @@ gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
 }
 
 void
-gdbarch_pseudo_register_write (struct gdbarch *gdbarch, frame_info_ptr next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf)
+gdbarch_pseudo_register_write (struct gdbarch *gdbarch, const frame_info_ptr &next_frame, int pseudo_reg_num, gdb::array_view<const gdb_byte> buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->pseudo_register_write != NULL);
@@ -2240,7 +2240,7 @@ set_gdbarch_register_type (struct gdbarch *gdbarch,
 }
 
 struct frame_id
-gdbarch_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+gdbarch_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->dummy_id != NULL);
@@ -2339,7 +2339,7 @@ set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
 }
 
 int
-gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, frame_info_ptr frame)
+gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, const frame_info_ptr &frame)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->code_of_frame_writable != NULL);
@@ -2356,7 +2356,7 @@ set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, int regnum, int all)
+gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, int regnum, int all)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->print_registers_info != NULL);
@@ -2373,7 +2373,7 @@ set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args)
+gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->print_float_info != NULL);
@@ -2397,7 +2397,7 @@ gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
 }
 
 void
-gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args)
+gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, const frame_info_ptr &frame, const char *args)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->print_vector_info != NULL);
@@ -2472,7 +2472,7 @@ gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
 }
 
 int
-gdbarch_get_longjmp_target (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR *pc)
+gdbarch_get_longjmp_target (struct gdbarch *gdbarch, const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->get_longjmp_target != NULL);
@@ -2523,7 +2523,7 @@ set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
 }
 
 int
-gdbarch_register_to_value (struct gdbarch *gdbarch, frame_info_ptr frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
+gdbarch_register_to_value (struct gdbarch *gdbarch, const frame_info_ptr &frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->register_to_value != NULL);
@@ -2540,7 +2540,7 @@ set_gdbarch_register_to_value (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_value_to_register (struct gdbarch *gdbarch, frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *buf)
+gdbarch_value_to_register (struct gdbarch *gdbarch, const frame_info_ptr &frame, int regnum, struct type *type, const gdb_byte *buf)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->value_to_register != NULL);
@@ -2656,7 +2656,7 @@ set_gdbarch_return_value_as_value (struct gdbarch *gdbarch,
 }
 
 CORE_ADDR
-gdbarch_get_return_buf_addr (struct gdbarch *gdbarch, struct type *val_type, frame_info_ptr cur_frame)
+gdbarch_get_return_buf_addr (struct gdbarch *gdbarch, struct type *val_type, const frame_info_ptr &cur_frame)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->get_return_buf_addr != NULL);
@@ -3048,7 +3048,7 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
 }
 
 CORE_ADDR
-gdbarch_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+gdbarch_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->unwind_pc != NULL);
@@ -3065,7 +3065,7 @@ set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
 }
 
 CORE_ADDR
-gdbarch_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+gdbarch_unwind_sp (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->unwind_sp != NULL);
@@ -3089,7 +3089,7 @@ gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
 }
 
 int
-gdbarch_frame_num_args (struct gdbarch *gdbarch, frame_info_ptr frame)
+gdbarch_frame_num_args (struct gdbarch *gdbarch, const frame_info_ptr &frame)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->frame_num_args != NULL);
@@ -3348,7 +3348,7 @@ gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
 }
 
 int
-gdbarch_single_step_through_delay (struct gdbarch *gdbarch, frame_info_ptr frame)
+gdbarch_single_step_through_delay (struct gdbarch *gdbarch, const frame_info_ptr &frame)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->single_step_through_delay != NULL);
@@ -3382,7 +3382,7 @@ set_gdbarch_print_insn (struct gdbarch *gdbarch,
 }
 
 CORE_ADDR
-gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc)
+gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, const frame_info_ptr &frame, CORE_ADDR pc)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->skip_trampoline_code != NULL);
@@ -3723,7 +3723,7 @@ gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
 }
 
 CORE_ADDR
-gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, frame_info_ptr frame, int argi, struct type *type)
+gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, const frame_info_ptr &frame, int argi, struct type *type)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->fetch_pointer_argument != NULL);
@@ -5414,7 +5414,7 @@ set_gdbarch_type_align (struct gdbarch *gdbarch,
 }
 
 std::string
-gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc)
+gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, const frame_info_ptr &frame, CORE_ADDR pc)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->get_pc_address_flags != NULL);
index d76b820c1b557545a6f0e9d778ef3ed6653602ff..762d48a0187f8216fe689d40e64d3b749cf4bfa1 100644 (file)
@@ -414,7 +414,7 @@ never be called.
 """,
     type="struct value *",
     name="pseudo_register_read_value",
-    params=[("frame_info_ptr", "next_frame"), ("int", "cookednum")],
+    params=[("const frame_info_ptr &", "next_frame"), ("int", "cookednum")],
     predicate=True,
 )
 
@@ -428,7 +428,7 @@ NEXT_FRAME.
     type="void",
     name="pseudo_register_write",
     params=[
-        ("frame_info_ptr", "next_frame"),
+        ("const frame_info_ptr &", "next_frame"),
         ("int", "pseudo_reg_num"),
         ("gdb::array_view<const gdb_byte>", "buf"),
     ],
@@ -628,7 +628,7 @@ frame.
 """,
     type="struct frame_id",
     name="dummy_id",
-    params=[("frame_info_ptr", "this_frame")],
+    params=[("const frame_info_ptr &", "this_frame")],
     predefault="default_dummy_id",
     invalid=False,
 )
@@ -689,7 +689,7 @@ Return true if the code of FRAME is writable.
 """,
     type="int",
     name="code_of_frame_writable",
-    params=[("frame_info_ptr", "frame")],
+    params=[("const frame_info_ptr &", "frame")],
     predefault="default_code_of_frame_writable",
     invalid=False,
 )
@@ -699,7 +699,7 @@ Method(
     name="print_registers_info",
     params=[
         ("struct ui_file *", "file"),
-        ("frame_info_ptr", "frame"),
+        ("const frame_info_ptr &", "frame"),
         ("int", "regnum"),
         ("int", "all"),
     ],
@@ -712,7 +712,7 @@ Method(
     name="print_float_info",
     params=[
         ("struct ui_file *", "file"),
-        ("frame_info_ptr", "frame"),
+        ("const frame_info_ptr &", "frame"),
         ("const char *", "args"),
     ],
     predefault="default_print_float_info",
@@ -724,7 +724,7 @@ Method(
     name="print_vector_info",
     params=[
         ("struct ui_file *", "file"),
-        ("frame_info_ptr", "frame"),
+        ("const frame_info_ptr &", "frame"),
         ("const char *", "args"),
     ],
     predicate=True,
@@ -767,7 +767,7 @@ FRAME corresponds to the longjmp frame.
 """,
     type="int",
     name="get_longjmp_target",
-    params=[("frame_info_ptr", "frame"), ("CORE_ADDR *", "pc")],
+    params=[("const frame_info_ptr &", "frame"), ("CORE_ADDR *", "pc")],
     predicate=True,
 )
 
@@ -789,7 +789,7 @@ Function(
     type="int",
     name="register_to_value",
     params=[
-        ("frame_info_ptr", "frame"),
+        ("const frame_info_ptr &", "frame"),
         ("int", "regnum"),
         ("struct type *", "type"),
         ("gdb_byte *", "buf"),
@@ -803,7 +803,7 @@ Function(
     type="void",
     name="value_to_register",
     params=[
-        ("frame_info_ptr", "frame"),
+        ("const frame_info_ptr &", "frame"),
         ("int", "regnum"),
         ("struct type *", "type"),
         ("const gdb_byte *", "buf"),
@@ -923,7 +923,7 @@ convention".
 May return 0 when unable to determine that address.""",
     type="CORE_ADDR",
     name="get_return_buf_addr",
-    params=[("struct type *", "val_type"), ("frame_info_ptr", "cur_frame")],
+    params=[("struct type *", "val_type"), ("const frame_info_ptr &", "cur_frame")],
     predefault="default_get_return_buf_addr",
     invalid=False,
 )
@@ -1157,7 +1157,7 @@ Value(
 Method(
     type="CORE_ADDR",
     name="unwind_pc",
-    params=[("frame_info_ptr", "next_frame")],
+    params=[("const frame_info_ptr &", "next_frame")],
     predefault="default_unwind_pc",
     invalid=False,
 )
@@ -1165,7 +1165,7 @@ Method(
 Method(
     type="CORE_ADDR",
     name="unwind_sp",
-    params=[("frame_info_ptr", "next_frame")],
+    params=[("const frame_info_ptr &", "next_frame")],
     predefault="default_unwind_sp",
     invalid=False,
 )
@@ -1177,7 +1177,7 @@ frame-base.  Enable frame-base before frame-unwind.
 """,
     type="int",
     name="frame_num_args",
-    params=[("frame_info_ptr", "frame")],
+    params=[("const frame_info_ptr &", "frame")],
     predicate=True,
 )
 
@@ -1357,7 +1357,7 @@ further single-step is needed before the instruction finishes.
 """,
     type="int",
     name="single_step_through_delay",
-    params=[("frame_info_ptr", "frame")],
+    params=[("const frame_info_ptr &", "frame")],
     predicate=True,
 )
 
@@ -1376,7 +1376,7 @@ disassembler.  Perhaps objdump can handle it?
 Function(
     type="CORE_ADDR",
     name="skip_trampoline_code",
-    params=[("frame_info_ptr", "frame"), ("CORE_ADDR", "pc")],
+    params=[("const frame_info_ptr &", "frame"), ("CORE_ADDR", "pc")],
     predefault="generic_skip_trampoline_code",
     invalid=False,
 )
@@ -1596,7 +1596,7 @@ Fetch the pointer to the ith function argument.
     type="CORE_ADDR",
     name="fetch_pointer_argument",
     params=[
-        ("frame_info_ptr", "frame"),
+        ("const frame_info_ptr &", "frame"),
         ("int", "argi"),
         ("struct type *", "type"),
     ],
@@ -2744,7 +2744,7 @@ Return a string containing any flags for the given PC in the given FRAME.
 """,
     type="std::string",
     name="get_pc_address_flags",
-    params=[("frame_info_ptr", "frame"), ("CORE_ADDR", "pc")],
+    params=[("const frame_info_ptr &", "frame"), ("CORE_ADDR", "pc")],
     predefault="default_get_pc_address_flags",
     invalid=False,
 )
index faefe92594364aa4e087e6447e592a228f38a340..133bf28f6487181d17df3a2b3b68c01c62f06dbf 100644 (file)
@@ -1225,7 +1225,7 @@ gnuv3_get_type_from_type_info (struct value *type_info_ptr)
    of the routine we are thunking to and continue to there instead.  */
 
 static CORE_ADDR 
-gnuv3_skip_trampoline (frame_info_ptr frame, CORE_ADDR stop_pc)
+gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
 {
   CORE_ADDR real_stop_pc, method_stop_pc, func_addr;
   struct gdbarch *gdbarch = get_frame_arch (frame);
index da5b10517ada310dc375ec1c481d8c4f6a138397..36cbd9d4aa60aef723e124060217b8423609e131 100644 (file)
@@ -404,7 +404,7 @@ h8300_analyze_prologue (struct gdbarch *gdbarch,
 }
 
 static struct h8300_frame_cache *
-h8300_frame_cache (frame_info_ptr this_frame, void **this_cache)
+h8300_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct h8300_frame_cache *cache;
@@ -466,7 +466,7 @@ h8300_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-h8300_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+h8300_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                     struct frame_id *this_id)
 {
   struct h8300_frame_cache *cache =
@@ -480,7 +480,7 @@ h8300_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-h8300_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+h8300_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                           int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -511,7 +511,7 @@ static const struct frame_unwind h8300_frame_unwind = {
 };
 
 static CORE_ADDR
-h8300_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+h8300_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct h8300_frame_cache *cache = h8300_frame_cache (this_frame, this_cache);
   return cache->base;
@@ -991,7 +991,7 @@ h8300sx_register_name (struct gdbarch *gdbarch, int regno)
 
 static void
 h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
-                     frame_info_ptr frame, int regno)
+                     const frame_info_ptr &frame, int regno)
 {
   LONGEST rval;
   const char *name = gdbarch_register_name (gdbarch, regno);
@@ -1068,7 +1068,7 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
 
 static void
 h8300_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
-                           frame_info_ptr frame, int regno, int cpregs)
+                           const frame_info_ptr &frame, int regno, int cpregs)
 {
   if (regno < 0)
     {
index 78e3f3eb6727acf5ec92bd64185adcb9a5f48cb5..b1df3d17aa4d13bac6db00626066d857f42fc0a0 100644 (file)
@@ -104,7 +104,7 @@ hppabsd_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
 static void
 hppabsd_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)
 {
   if (regnum == HPPA_PCOQ_HEAD_REGNUM)
     reg->how = DWARF2_FRAME_REG_RA;
index 4f94b4168107d041a4b3ca5aa97061849fb83380..db0c36801316b3c3baf5c9cda2ce57b61e7368d0 100644 (file)
@@ -193,7 +193,7 @@ struct hppa_linux_sigtramp_unwind_cache
 };
 
 static struct hppa_linux_sigtramp_unwind_cache *
-hppa_linux_sigtramp_frame_unwind_cache (frame_info_ptr this_frame,
+hppa_linux_sigtramp_frame_unwind_cache (const frame_info_ptr &this_frame,
                                        void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -268,7 +268,7 @@ hppa_linux_sigtramp_frame_unwind_cache (frame_info_ptr this_frame,
 }
 
 static void
-hppa_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
+hppa_linux_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                   void **this_prologue_cache,
                                   struct frame_id *this_id)
 {
@@ -278,7 +278,7 @@ hppa_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-hppa_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+hppa_linux_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                         void **this_prologue_cache,
                                         int regnum)
 {
@@ -296,7 +296,7 @@ hppa_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
    we can find the beginning of the struct rt_sigframe.  */
 static int
 hppa_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                  frame_info_ptr this_frame,
+                                  const frame_info_ptr &this_frame,
                                   void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
index f6995e77b2afc75b26c5ec2b489a6479d5286aa9..ccf32c790906106214f1b657f4cf3c00707c5997 100644 (file)
@@ -64,7 +64,7 @@ static int hppanbsd_mc_reg_offset[] =
 };
 
 static void hppanbsd_sigtramp_cache_init (const struct tramp_frame *,
-                                        frame_info_ptr,
+                                        const frame_info_ptr &,
                                         struct trad_frame_cache *,
                                         CORE_ADDR);
 
@@ -99,7 +99,7 @@ static const struct tramp_frame hppanbsd_sigtramp_si4 =
 
 static void
 hppanbsd_sigtramp_cache_init (const struct tramp_frame *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             struct trad_frame_cache *this_cache,
                             CORE_ADDR func)
 {
index 32e46b831cbc55217e99ccb06362f32c9ce72995..30128bafac48ce7ed157d0ee680a7ec5f79a4f5b 100644 (file)
@@ -1829,7 +1829,7 @@ hppa_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* Return an unwind entry that falls within the frame's code block.  */
 
 static struct unwind_table_entry *
-hppa_find_unwind_entry_in_block (frame_info_ptr this_frame)
+hppa_find_unwind_entry_in_block (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
 
@@ -1850,7 +1850,7 @@ struct hppa_frame_cache
 };
 
 static struct hppa_frame_cache *
-hppa_frame_cache (frame_info_ptr this_frame, void **this_cache)
+hppa_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -2251,7 +2251,7 @@ hppa_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-hppa_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+hppa_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                    struct frame_id *this_id)
 {
   struct hppa_frame_cache *info;
@@ -2264,7 +2264,7 @@ hppa_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-hppa_frame_prev_register (frame_info_ptr this_frame,
+hppa_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_cache, int regnum)
 {
   struct hppa_frame_cache *info = hppa_frame_cache (this_frame, this_cache);
@@ -2275,7 +2275,7 @@ hppa_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 hppa_frame_unwind_sniffer (const struct frame_unwind *self,
-                          frame_info_ptr this_frame, void **this_cache)
+                          const frame_info_ptr &this_frame, void **this_cache)
 {
   if (hppa_find_unwind_entry_in_block (this_frame))
     return 1;
@@ -2303,7 +2303,7 @@ static const struct frame_unwind hppa_frame_unwind =
    identify the stack and pc for the frame.  */
 
 static struct hppa_frame_cache *
-hppa_fallback_frame_cache (frame_info_ptr this_frame, void **this_cache)
+hppa_fallback_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -2376,7 +2376,7 @@ hppa_fallback_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-hppa_fallback_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+hppa_fallback_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                             struct frame_id *this_id)
 {
   struct hppa_frame_cache *info = 
@@ -2386,7 +2386,7 @@ hppa_fallback_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-hppa_fallback_frame_prev_register (frame_info_ptr this_frame,
+hppa_fallback_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache, int regnum)
 {
   struct hppa_frame_cache *info
@@ -2415,7 +2415,7 @@ struct hppa_stub_unwind_cache
 };
 
 static struct hppa_stub_unwind_cache *
-hppa_stub_frame_unwind_cache (frame_info_ptr this_frame,
+hppa_stub_frame_unwind_cache (const frame_info_ptr &this_frame,
                              void **this_cache)
 {
   struct hppa_stub_unwind_cache *info;
@@ -2436,7 +2436,7 @@ hppa_stub_frame_unwind_cache (frame_info_ptr this_frame,
 }
 
 static void
-hppa_stub_frame_this_id (frame_info_ptr this_frame,
+hppa_stub_frame_this_id (const frame_info_ptr &this_frame,
                         void **this_prologue_cache,
                         struct frame_id *this_id)
 {
@@ -2448,7 +2448,7 @@ hppa_stub_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-hppa_stub_frame_prev_register (frame_info_ptr this_frame,
+hppa_stub_frame_prev_register (const frame_info_ptr &this_frame,
                               void **this_prologue_cache, int regnum)
 {
   struct hppa_stub_unwind_cache *info
@@ -2463,7 +2463,7 @@ hppa_stub_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 hppa_stub_unwind_sniffer (const struct frame_unwind *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          void **this_cache)
 {
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
@@ -2489,7 +2489,7 @@ static const struct frame_unwind hppa_stub_frame_unwind = {
 };
 
 CORE_ADDR
-hppa_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+hppa_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   ULONGEST ipsw;
   CORE_ADDR pc;
@@ -2675,7 +2675,7 @@ hppa_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
 /* Get the ARGIth function argument for the current function.  */
 
 static CORE_ADDR
-hppa_fetch_pointer_argument (frame_info_ptr frame, int argi, 
+hppa_fetch_pointer_argument (const frame_info_ptr &frame, int argi,
                             struct type *type)
 {
   return get_frame_register_unsigned (frame, HPPA_R0_REGNUM + 26 - argi);
@@ -2706,7 +2706,7 @@ hppa_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
 }
 
 struct value *
-hppa_frame_prev_register_helper (frame_info_ptr this_frame,
+hppa_frame_prev_register_helper (const frame_info_ptr &this_frame,
                                 trad_frame_saved_reg saved_regs[],
                                 int regnum)
 {
@@ -2884,7 +2884,7 @@ hppa_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc)
    systems: $$dyncall, import stubs and PLT stubs.  */
 
 CORE_ADDR
-hppa_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+hppa_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   struct type *func_ptr_type = builtin_type (gdbarch)->builtin_func_ptr;
index 2372dd6dd12d5660b7103827381597b645f432f0..0f706536cc9d2d67488542e92c77f072d706113d 100644 (file)
@@ -109,7 +109,7 @@ struct hppa_gdbarch_tdep : gdbarch_tdep_base
      not interested in them.  If we detect that we are returning to a stub,
      adjust the pc to the real caller.  This improves the behavior of commands
      that traverse frames such as "up" and "finish".  */
-  void (*unwind_adjust_stub) (frame_info_ptr this_frame, CORE_ADDR base,
+  void (*unwind_adjust_stub) (const frame_info_ptr &this_frame, CORE_ADDR base,
                              trad_frame_saved_reg *saved_regs) = nullptr;
 
   /* These are solib-dependent methods.  They are really HPUX only, but
@@ -201,17 +201,17 @@ int hppa_extract_14 (unsigned);
 CORE_ADDR hppa_symbol_address(const char *sym);
 
 extern struct value *
-  hppa_frame_prev_register_helper (frame_info_ptr this_frame,
+  hppa_frame_prev_register_helper (const frame_info_ptr &this_frame,
                                   trad_frame_saved_reg *saved_regs,
                                   int regnum);
 
 extern CORE_ADDR hppa_read_pc (struct regcache *regcache);
 extern void hppa_write_pc (struct regcache *regcache, CORE_ADDR pc);
 extern CORE_ADDR hppa_unwind_pc (struct gdbarch *gdbarch,
-                                frame_info_ptr next_frame);
+                                const frame_info_ptr &next_frame);
 
 extern int hppa_in_solib_call_trampoline (struct gdbarch *gdbarch,
                                          CORE_ADDR pc);
-extern CORE_ADDR hppa_skip_trampoline_code (frame_info_ptr, CORE_ADDR pc);
+extern CORE_ADDR hppa_skip_trampoline_code (const frame_info_ptr &, CORE_ADDR pc);
 
 #endif  /* hppa-tdep.h */
index eb20bc6e2b542de2599c066b70f898e3d33ddce8..8470f2b6d2f99a7d229804342d7a55a6abce5ba9 100644 (file)
@@ -32,7 +32,7 @@
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-i386bsd_sigcontext_addr (frame_info_ptr this_frame)
+i386bsd_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 8da6b4df2b78d58be420be5aa4c28e691c4a1ee6..fc0a3dd3909e6ece5c44cd8c5f9e6d98d62f6814 100644 (file)
@@ -66,7 +66,7 @@ const int i386_darwin_thread_state_num_regs =
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-i386_darwin_sigcontext_addr (frame_info_ptr this_frame)
+i386_darwin_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -99,7 +99,7 @@ i386_darwin_sigcontext_addr (frame_info_ptr this_frame)
 
 int
 darwin_dwarf_signal_frame_p (struct gdbarch *gdbarch,
-                            frame_info_ptr this_frame)
+                            const frame_info_ptr &this_frame)
 {
   return i386_sigtramp_p (this_frame);
 }
index 8f955f6828b750769fd6dcf0fbe7806af9a613c0..0b867fab94c15a2e11ec217e5b7e92d564cbd683 100644 (file)
@@ -27,6 +27,6 @@
 extern int i386_darwin_thread_state_reg_offset[];
 extern const int i386_darwin_thread_state_num_regs;
 
-int darwin_dwarf_signal_frame_p (struct gdbarch *, frame_info_ptr);
+int darwin_dwarf_signal_frame_p (struct gdbarch *, const frame_info_ptr &);
 
 #endif /* I386_DARWIN_TDEP_H */
index ea1db3abd6bae005ba232662f2fb8aa0f5877d6b..2b9ef77e5e6d0643cba551f9822ec933bffd2d89 100644 (file)
@@ -156,7 +156,7 @@ const struct regset i386_fbsd_segbases_regset =
 
 static void
 i386_fbsd_sigframe_init (const struct tramp_frame *self,
-                        frame_info_ptr this_frame,
+                        const frame_info_ptr &this_frame,
                         struct trad_frame_cache *this_cache,
                         CORE_ADDR func)
 {
index 9ff4714751319ea3666dfb404655189ba545a9b2..aa1898693b61cceec68bf0c3bdba861c61a99eea 100644 (file)
@@ -56,7 +56,7 @@ static const gdb_byte gnu_sigtramp_code[] =
    start of the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-i386_gnu_sigtramp_start (frame_info_ptr this_frame)
+i386_gnu_sigtramp_start (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   gdb_byte buf[GNU_SIGTRAMP_LEN];
@@ -76,7 +76,7 @@ i386_gnu_sigtramp_start (frame_info_ptr this_frame)
    routine.  */
 
 static int
-i386_gnu_sigtramp_p (frame_info_ptr this_frame)
+i386_gnu_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -97,7 +97,7 @@ i386_gnu_sigtramp_p (frame_info_ptr this_frame)
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-i386_gnu_sigcontext_addr (frame_info_ptr this_frame)
+i386_gnu_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 996dda0077f84f3413673714fd95caf1b16e1f2c..a2f937690c2e0d8dfa9e1ae30d6dd97216a5b26a 100644 (file)
@@ -122,7 +122,7 @@ static const gdb_byte linux_sigtramp_code[] =
    start of the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-i386_linux_sigtramp_start (frame_info_ptr this_frame)
+i386_linux_sigtramp_start (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   gdb_byte buf[LINUX_SIGTRAMP_LEN];
@@ -190,7 +190,7 @@ static const gdb_byte linux_rt_sigtramp_code[] =
    start of the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-i386_linux_rt_sigtramp_start (frame_info_ptr this_frame)
+i386_linux_rt_sigtramp_start (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   gdb_byte buf[LINUX_RT_SIGTRAMP_LEN];
@@ -227,7 +227,7 @@ i386_linux_rt_sigtramp_start (frame_info_ptr this_frame)
    routine.  */
 
 static int
-i386_linux_sigtramp_p (frame_info_ptr this_frame)
+i386_linux_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -252,7 +252,7 @@ i386_linux_sigtramp_p (frame_info_ptr this_frame)
 
 static int
 i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch,
-                                frame_info_ptr this_frame)
+                                const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -275,7 +275,7 @@ i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch,
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-i386_linux_sigcontext_addr (frame_info_ptr this_frame)
+i386_linux_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 270413e59d8772a5ddf24604e76787b993e00b63..9596435e9d104ba29025fbea7951bdb0d4994777 100644 (file)
@@ -97,7 +97,7 @@ static int i386nbsd_mc_reg_offset[] =
 };
 
 static void i386nbsd_sigtramp_cache_init (const struct tramp_frame *,
-                                         frame_info_ptr,
+                                         const frame_info_ptr &,
                                          struct trad_frame_cache *,
                                          CORE_ADDR);
 
@@ -329,7 +329,7 @@ static const struct tramp_frame i386nbsd_sigtramp_si4 =
 
 static void
 i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              struct trad_frame_cache *this_cache,
                              CORE_ADDR func)
 {
index 5e959df4df36d43f14522bff18f6883510b987e0..f4bb70cc5a08814ee5e13f8972d9e99841e06144 100644 (file)
@@ -270,7 +270,7 @@ i386nto_regset_fill (const struct regcache *regcache, int regset, char *data)
    routine.  */
 
 static int
-i386nto_sigtramp_p (frame_info_ptr this_frame)
+i386nto_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -283,7 +283,7 @@ i386nto_sigtramp_p (frame_info_ptr this_frame)
    address of the associated sigcontext structure.  */
 
 static CORE_ADDR
-i386nto_sigcontext_addr (frame_info_ptr this_frame)
+i386nto_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 38ba280e4056951db390e38f20a8825d35c30b75..e1480ec6cc41fa3118174667ca330ce8b625364a 100644 (file)
@@ -64,7 +64,7 @@ static const int i386obsd_sigreturn_offset[] = {
    routine.  */
 
 static int
-i386obsd_sigtramp_p (frame_info_ptr this_frame)
+i386obsd_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   CORE_ADDR start_pc = (pc & ~(i386obsd_page_size - 1));
@@ -303,7 +303,7 @@ static int i386obsd_tf_reg_offset[] =
 };
 
 static struct trad_frame_cache *
-i386obsd_trapframe_cache (frame_info_ptr this_frame, void **this_cache)
+i386obsd_trapframe_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -350,7 +350,7 @@ i386obsd_trapframe_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-i386obsd_trapframe_this_id (frame_info_ptr this_frame,
+i386obsd_trapframe_this_id (const frame_info_ptr &this_frame,
                            void **this_cache, struct frame_id *this_id)
 {
   struct trad_frame_cache *cache =
@@ -360,7 +360,7 @@ i386obsd_trapframe_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-i386obsd_trapframe_prev_register (frame_info_ptr this_frame,
+i386obsd_trapframe_prev_register (const frame_info_ptr &this_frame,
                                  void **this_cache, int regnum)
 {
   struct trad_frame_cache *cache =
@@ -371,7 +371,7 @@ i386obsd_trapframe_prev_register (frame_info_ptr this_frame,
 
 static int
 i386obsd_trapframe_sniffer (const struct frame_unwind *self,
-                           frame_info_ptr this_frame,
+                           const frame_info_ptr &this_frame,
                            void **this_prologue_cache)
 {
   ULONGEST cs;
index ae4e2946789ce9d760850ef907d98a10ac1d9850..bc8df378219dcef9a138f0a78061e605940329c6 100644 (file)
@@ -50,7 +50,7 @@ static int i386_sol2_gregset_reg_offset[] =
    `mcontext_t' that contains the saved set of machine registers.  */
 
 static CORE_ADDR
-i386_sol2_mcontext_addr (frame_info_ptr this_frame)
+i386_sol2_mcontext_addr (const frame_info_ptr &this_frame)
 {
   CORE_ADDR sp, ucontext_addr;
 
index d8691f038454235f65355ef5dc647d2506b20b10..b487a3f74788364c86fc4aa0605cde57488509e7 100644 (file)
@@ -1965,7 +1965,7 @@ i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* This function is 64-bit safe.  */
 
 static CORE_ADDR
-i386_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+i386_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_byte buf[8];
 
@@ -1977,7 +1977,7 @@ i386_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* Normal frames.  */
 
 static void
-i386_frame_cache_1 (frame_info_ptr this_frame,
+i386_frame_cache_1 (const frame_info_ptr &this_frame,
                    struct i386_frame_cache *cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2078,7 +2078,7 @@ i386_frame_cache_1 (frame_info_ptr this_frame,
 }
 
 static struct i386_frame_cache *
-i386_frame_cache (frame_info_ptr this_frame, void **this_cache)
+i386_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct i386_frame_cache *cache;
 
@@ -2102,7 +2102,7 @@ i386_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-i386_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+i386_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                    struct frame_id *this_id)
 {
   struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
@@ -2121,7 +2121,7 @@ i386_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static enum unwind_stop_reason
-i386_frame_unwind_stop_reason (frame_info_ptr this_frame,
+i386_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                               void **this_cache)
 {
   struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
@@ -2137,7 +2137,7 @@ i386_frame_unwind_stop_reason (frame_info_ptr this_frame,
 }
 
 static struct value *
-i386_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+i386_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                          int regnum)
 {
   struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
@@ -2230,7 +2230,7 @@ i386_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 static int
 i386_epilogue_frame_sniffer_1 (const struct frame_unwind *self,
-                              frame_info_ptr this_frame,
+                              const frame_info_ptr &this_frame,
                               void **this_prologue_cache, bool override_p)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2263,7 +2263,7 @@ i386_epilogue_frame_sniffer_1 (const struct frame_unwind *self,
 
 static int
 i386_epilogue_override_frame_sniffer (const struct frame_unwind *self,
-                                     frame_info_ptr this_frame,
+                                     const frame_info_ptr &this_frame,
                                      void **this_prologue_cache)
 {
   return i386_epilogue_frame_sniffer_1 (self, this_frame, this_prologue_cache,
@@ -2272,7 +2272,7 @@ i386_epilogue_override_frame_sniffer (const struct frame_unwind *self,
 
 static int
 i386_epilogue_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_prologue_cache)
 {
   return i386_epilogue_frame_sniffer_1 (self, this_frame, this_prologue_cache,
@@ -2280,7 +2280,7 @@ i386_epilogue_frame_sniffer (const struct frame_unwind *self,
 }
 
 static struct i386_frame_cache *
-i386_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
+i386_epilogue_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct i386_frame_cache *cache;
   CORE_ADDR sp;
@@ -2315,7 +2315,7 @@ i386_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static enum unwind_stop_reason
-i386_epilogue_frame_unwind_stop_reason (frame_info_ptr this_frame,
+i386_epilogue_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                        void **this_cache)
 {
   struct i386_frame_cache *cache =
@@ -2328,7 +2328,7 @@ i386_epilogue_frame_unwind_stop_reason (frame_info_ptr this_frame,
 }
 
 static void
-i386_epilogue_frame_this_id (frame_info_ptr this_frame,
+i386_epilogue_frame_this_id (const frame_info_ptr &this_frame,
                             void **this_cache,
                             struct frame_id *this_id)
 {
@@ -2342,7 +2342,7 @@ i386_epilogue_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-i386_epilogue_frame_prev_register (frame_info_ptr this_frame,
+i386_epilogue_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache, int regnum)
 {
   /* Make sure we've initialized the cache.  */
@@ -2435,7 +2435,7 @@ i386_in_stack_tramp_p (CORE_ADDR pc)
 
 static int
 i386_stack_tramp_frame_sniffer (const struct frame_unwind *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                void **this_cache)
 {
   if (frame_relative_level (this_frame) == 0)
@@ -2475,7 +2475,7 @@ i386_gen_return_address (struct gdbarch *gdbarch,
 /* Signal trampolines.  */
 
 static struct i386_frame_cache *
-i386_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
+i386_sigtramp_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
@@ -2524,7 +2524,7 @@ i386_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static enum unwind_stop_reason
-i386_sigtramp_frame_unwind_stop_reason (frame_info_ptr this_frame,
+i386_sigtramp_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                        void **this_cache)
 {
   struct i386_frame_cache *cache =
@@ -2537,7 +2537,7 @@ i386_sigtramp_frame_unwind_stop_reason (frame_info_ptr this_frame,
 }
 
 static void
-i386_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+i386_sigtramp_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                             struct frame_id *this_id)
 {
   struct i386_frame_cache *cache =
@@ -2553,7 +2553,7 @@ i386_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-i386_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+i386_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache, int regnum)
 {
   /* Make sure we've initialized the cache.  */
@@ -2564,7 +2564,7 @@ i386_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 i386_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_prologue_cache)
 {
   gdbarch *arch = get_frame_arch (this_frame);
@@ -2606,7 +2606,7 @@ static const struct frame_unwind i386_sigtramp_frame_unwind =
 \f
 
 static CORE_ADDR
-i386_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+i386_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache);
 
@@ -2622,7 +2622,7 @@ static const struct frame_base i386_frame_base =
 };
 
 static struct frame_id
-i386_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+i386_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR fp;
 
@@ -2649,7 +2649,7 @@ i386_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
    success.  */
 
 static int
-i386_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+i386_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   gdb_byte buf[4];
   CORE_ADDR sp, jb_addr;
@@ -3395,7 +3395,7 @@ i386_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
    the MMX registers need to be mapped onto floating point registers.  */
 
 static int
-i386_mmx_regnum_to_fp_regnum (frame_info_ptr next_frame, int regnum)
+i386_mmx_regnum_to_fp_regnum (const frame_info_ptr &next_frame, int regnum)
 {
   gdbarch *arch = frame_unwind_arch (next_frame);
   i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
@@ -3413,7 +3413,7 @@ i386_mmx_regnum_to_fp_regnum (frame_info_ptr next_frame, int regnum)
    the data into an already-allocated value.  */
 
 value *
-i386_pseudo_register_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
+i386_pseudo_register_read_value (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                                 const int pseudo_reg_num)
 {
   if (i386_mmx_regnum_p (gdbarch, pseudo_reg_num))
@@ -3517,7 +3517,7 @@ i386_pseudo_register_read_value (gdbarch *gdbarch, frame_info_ptr next_frame,
 }
 
 void
-i386_pseudo_register_write (gdbarch *gdbarch, frame_info_ptr next_frame,
+i386_pseudo_register_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
                            const int pseudo_reg_num,
                            gdb::array_view<const gdb_byte> buf)
 {
@@ -3750,7 +3750,7 @@ i386_convert_register_p (struct gdbarch *gdbarch,
    return its contents in TO.  */
 
 static int
-i386_register_to_value (frame_info_ptr frame, int regnum,
+i386_register_to_value (const frame_info_ptr &frame, int regnum,
                        struct type *type, gdb_byte *to,
                        int *optimizedp, int *unavailablep)
 {
@@ -3790,7 +3790,7 @@ i386_register_to_value (frame_info_ptr frame, int regnum,
    REGNUM in frame FRAME.  */
 
 static void
-i386_value_to_register (frame_info_ptr frame, int regnum,
+i386_value_to_register (const frame_info_ptr &frame, int regnum,
                        struct type *type, const gdb_byte *from)
 {
   int len = type->length ();
@@ -3944,7 +3944,7 @@ i386_iterate_over_regset_sections (struct gdbarch *gdbarch,
 /* Stuff for WIN32 PE style DLL's but is pretty generic really.  */
 
 CORE_ADDR
-i386_pe_skip_trampoline_code (frame_info_ptr frame,
+i386_pe_skip_trampoline_code (const frame_info_ptr &frame,
                              CORE_ADDR pc, char *name)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -3975,7 +3975,7 @@ i386_pe_skip_trampoline_code (frame_info_ptr frame,
    routine.  */
 
 int
-i386_sigtramp_p (frame_info_ptr this_frame)
+i386_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -4011,7 +4011,7 @@ i386_print_insn (bfd_vma pc, struct disassemble_info *info)
    routine.  */
 
 static int
-i386_svr4_sigtramp_p (frame_info_ptr this_frame)
+i386_svr4_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
@@ -4026,7 +4026,7 @@ i386_svr4_sigtramp_p (frame_info_ptr this_frame)
    address of the associated sigcontext (ucontext) structure.  */
 
 static CORE_ADDR
-i386_svr4_sigcontext_addr (frame_info_ptr this_frame)
+i386_svr4_sigcontext_addr (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -4582,7 +4582,7 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 /* Get the ARGIth function argument for the current function.  */
 
 static CORE_ADDR
-i386_fetch_pointer_argument (frame_info_ptr frame, int argi,
+i386_fetch_pointer_argument (const frame_info_ptr &frame, int argi,
                             struct type *type)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
index e7699f0f1894d5fb782ad282e36dfe1ba70b85a9..a85e0a984a0f22443ac3a9fbd6434144b3583006 100644 (file)
@@ -227,10 +227,10 @@ struct i386_gdbarch_tdep : gdbarch_tdep_base
   CORE_ADDR sigtramp_end = 0;
 
   /* Detect sigtramp.  */
-  int (*sigtramp_p) (frame_info_ptr) = nullptr;
+  int (*sigtramp_p) (const frame_info_ptr &) = nullptr;
 
   /* Get address of sigcontext for sigtramp.  */
-  CORE_ADDR (*sigcontext_addr) (frame_info_ptr) = nullptr;
+  CORE_ADDR (*sigcontext_addr) (const frame_info_ptr &) = nullptr;
 
   /* Offset of registers in `struct sigcontext'.  */
   int *sc_reg_offset = 0;
@@ -377,11 +377,11 @@ extern struct type *i386_pseudo_register_type (struct gdbarch *gdbarch,
                                               int regnum);
 
 extern value *i386_pseudo_register_read_value (gdbarch *gdbarch,
-                                              frame_info_ptr next_frame,
+                                              const frame_info_ptr &next_frame,
                                               int regnum);
 
 extern void i386_pseudo_register_write (gdbarch *gdbarch,
-                                       frame_info_ptr next_frame, int regnum,
+                                       const frame_info_ptr &next_frame, int regnum,
                                        gdb::array_view<const gdb_byte> buf);
 
 extern int i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
@@ -398,7 +398,7 @@ extern int i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
 #define I386_MAX_INSN_LEN (16)
 
 /* Functions exported from i386-tdep.c.  */
-extern CORE_ADDR i386_pe_skip_trampoline_code (frame_info_ptr frame,
+extern CORE_ADDR i386_pe_skip_trampoline_code (const frame_info_ptr &frame,
                                               CORE_ADDR pc, char *name);
 extern CORE_ADDR i386_skip_main_prologue (struct gdbarch *gdbarch,
                                          CORE_ADDR pc);
@@ -417,7 +417,7 @@ extern CORE_ADDR i386_thiscall_push_dummy_call (struct gdbarch *gdbarch,
                                                bool thiscall);
 
 /* Return whether the THIS_FRAME corresponds to a sigtramp routine.  */
-extern int i386_sigtramp_p (frame_info_ptr this_frame);
+extern int i386_sigtramp_p (const frame_info_ptr &this_frame);
 
 /* Return non-zero if REGNUM is a member of the specified group.  */
 extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
index f1cc10fe3c55e364d4a8f685ec32a47a8cedf755..cd5c580a3e8dc3a212934a45f513db3f5f008734 100644 (file)
@@ -90,7 +90,7 @@ static int i386_windows_gregset_reg_offset[] =
 #define I386_WINDOWS_SIZEOF_GREGSET 716
 
 static CORE_ADDR
-i386_windows_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+i386_windows_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   return i386_pe_skip_trampoline_code (frame, pc, NULL);
 }
index d73e3ba40ae1fbcf4a20c70d2a0a969c9f5a815b..3d979e279a1e7b8a3ddd161d7ec61f249434461d 100644 (file)
@@ -202,7 +202,7 @@ print_i387_control_word (int control_p,
 
 void
 i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
-                      frame_info_ptr frame, const char *args)
+                      const frame_info_ptr &frame, const char *args)
 {
   i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
   ULONGEST fctrl;
@@ -345,7 +345,7 @@ i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
    return its contents in TO.  */
 
 int
-i387_register_to_value (frame_info_ptr frame, int regnum,
+i387_register_to_value (const frame_info_ptr &frame, int regnum,
                        struct type *type, gdb_byte *to,
                        int *optimizedp, int *unavailablep)
 {
@@ -380,7 +380,7 @@ i387_register_to_value (frame_info_ptr frame, int regnum,
    REGNUM in frame FRAME.  */
 
 void
-i387_value_to_register (frame_info_ptr frame, int regnum,
+i387_value_to_register (const frame_info_ptr &frame, int regnum,
                        struct type *type, const gdb_byte *from)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
index aa1cce7d9523891418af67f95f20ffc0595e4140..30d769478a6c46234cba76447859c4d16b03a2d9 100644 (file)
@@ -90,7 +90,7 @@ struct x86_xsave_layout;
 
 extern void i387_print_float_info (struct gdbarch *gdbarch,
                                   struct ui_file *file,
-                                  frame_info_ptr frame,
+                                  const frame_info_ptr &frame,
                                   const char *args);
 
 /* Return nonzero if a value of type TYPE stored in register REGNUM
@@ -102,14 +102,14 @@ extern int i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
 /* Read a value of type TYPE from register REGNUM in frame FRAME, and
    return its contents in TO.  */
 
-extern int i387_register_to_value (frame_info_ptr frame, int regnum,
+extern int i387_register_to_value (const frame_info_ptr &frame, int regnum,
                                   struct type *type, gdb_byte *to,
                                   int *optimizedp, int *unavailablep);
 
 /* Write the contents FROM of a value of type TYPE into register
    REGNUM in frame FRAME.  */
 
-extern void i387_value_to_register (frame_info_ptr frame, int regnum,
+extern void i387_value_to_register (const frame_info_ptr &frame, int regnum,
                                    struct type *type, const gdb_byte *from);
 \f
 
index a61e90fc5bea334ae094f87024f3caf55289fd6c..24a5162cdc65169b72ab9375328d33d1ba2b411e 100644 (file)
@@ -153,7 +153,7 @@ libunwind_frame_set_descr (struct gdbarch *gdbarch,
 }
 
 static struct libunwind_frame_cache *
-libunwind_frame_cache (frame_info_ptr this_frame, void **this_cache)
+libunwind_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   unw_accessors_t *acc;
   unw_addr_space_t as;
@@ -247,7 +247,7 @@ libunwind_find_dyn_list (unw_addr_space_t as, unw_dyn_info_t *di, void *arg)
    libunwind frame unwinding.  */
 int
 libunwind_frame_sniffer (const struct frame_unwind *self,
-                        frame_info_ptr this_frame, void **this_cache)
+                        const frame_info_ptr &this_frame, void **this_cache)
 {
   unw_cursor_t cursor;
   unw_accessors_t *acc;
@@ -292,7 +292,7 @@ libunwind_frame_sniffer (const struct frame_unwind *self,
 }
 
 void
-libunwind_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+libunwind_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                         struct frame_id *this_id)
 {
   struct libunwind_frame_cache *cache =
@@ -303,7 +303,7 @@ libunwind_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 struct value *
-libunwind_frame_prev_register (frame_info_ptr this_frame,
+libunwind_frame_prev_register (const frame_info_ptr &this_frame,
                               void **this_cache, int regnum)
 {
   struct libunwind_frame_cache *cache =
@@ -387,7 +387,7 @@ libunwind_search_unwind_table (void *as, long ip, void *di,
 /* Verify if we are in a sigtramp frame and we can use libunwind to unwind.  */
 int
 libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                 frame_info_ptr this_frame,
+                                 const frame_info_ptr &this_frame,
                                  void **this_cache)
 {
   unw_cursor_t cursor;
index e490e839fc27de0b9866917c4c5ea220d1638272..4f064bfc333f60c0a66b98a2d655779566f91dad 100644 (file)
@@ -48,19 +48,19 @@ struct libunwind_descr
 };
 
 int libunwind_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_cache);
                          
 int libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                     frame_info_ptr this_frame,
+                                     const frame_info_ptr &this_frame,
                                      void **this_cache);
 
 void libunwind_frame_set_descr (struct gdbarch *arch,
                                struct libunwind_descr *descr);
 
-void libunwind_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+void libunwind_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                              struct frame_id *this_id);
-struct value *libunwind_frame_prev_register (frame_info_ptr this_frame,
+struct value *libunwind_frame_prev_register (const frame_info_ptr &this_frame,
                                             void **this_cache, int regnum);
 void libunwind_frame_dealloc_cache (frame_info_ptr self, void *cache);
 
index afff210986baf3112aed167032adf6f470ad3391..88f67ccf09628d2290547f4911aeb0e562649fff 100644 (file)
@@ -1219,7 +1219,7 @@ ia64_convert_register_p (struct gdbarch *gdbarch, int regno, struct type *type)
 }
 
 static int
-ia64_register_to_value (frame_info_ptr frame, int regnum,
+ia64_register_to_value (const frame_info_ptr &frame, int regnum,
                        struct type *valtype, gdb_byte *out,
                        int *optimizedp, int *unavailablep)
 {
@@ -1239,7 +1239,7 @@ ia64_register_to_value (frame_info_ptr frame, int regnum,
 }
 
 static void
-ia64_value_to_register (frame_info_ptr frame, int regnum,
+ia64_value_to_register (const frame_info_ptr &frame, int regnum,
                         struct type *valtype, const gdb_byte *in)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1361,7 +1361,7 @@ ia64_alloc_frame_cache (void)
 
 static CORE_ADDR
 examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
-                 frame_info_ptr this_frame,
+                 const frame_info_ptr &this_frame,
                  struct ia64_frame_cache *cache)
 {
   CORE_ADDR next_pc;
@@ -1842,7 +1842,7 @@ ia64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* Normal frames.  */
 
 static struct ia64_frame_cache *
-ia64_frame_cache (frame_info_ptr this_frame, void **this_cache)
+ia64_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1887,7 +1887,7 @@ ia64_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-ia64_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+ia64_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                    struct frame_id *this_id)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1908,7 +1908,7 @@ ia64_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-ia64_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+ia64_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                          int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2176,7 +2176,7 @@ static const struct frame_unwind ia64_frame_unwind =
 /* Signal trampolines.  */
 
 static void
-ia64_sigtramp_frame_init_saved_regs (frame_info_ptr this_frame,
+ia64_sigtramp_frame_init_saved_regs (const frame_info_ptr &this_frame,
                                     struct ia64_frame_cache *cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2230,7 +2230,7 @@ ia64_sigtramp_frame_init_saved_regs (frame_info_ptr this_frame,
 }
 
 static struct ia64_frame_cache *
-ia64_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
+ia64_sigtramp_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -2261,7 +2261,7 @@ ia64_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-ia64_sigtramp_frame_this_id (frame_info_ptr this_frame,
+ia64_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                             void **this_cache, struct frame_id *this_id)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2282,7 +2282,7 @@ ia64_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-ia64_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+ia64_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache, int regnum)
 {
   struct ia64_frame_cache *cache =
@@ -2335,7 +2335,7 @@ ia64_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 ia64_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_cache)
 {
   gdbarch *arch = get_frame_arch (this_frame);
@@ -2365,7 +2365,7 @@ static const struct frame_unwind ia64_sigtramp_frame_unwind =
 \f
 
 static CORE_ADDR
-ia64_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+ia64_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct ia64_frame_cache *cache = ia64_frame_cache (this_frame, this_cache);
 
@@ -2541,7 +2541,7 @@ ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
                   unw_fpreg_t *val, int write, void *arg)
 {
   int regnum = ia64_uw2gdb_regnum (uw_regnum);
-  frame_info_ptr this_frame = (frame_info_ptr) arg;
+  frame_info_ptr this_frame = (const frame_info_ptr &) arg;
   
   /* We never call any libunwind routines that need to write registers.  */
   gdb_assert (!write);
@@ -2894,7 +2894,7 @@ ia64_get_dyn_info_list (unw_addr_space_t as,
 /* Frame interface functions for libunwind.  */
 
 static void
-ia64_libunwind_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+ia64_libunwind_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                              struct frame_id *this_id)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2928,7 +2928,7 @@ ia64_libunwind_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-ia64_libunwind_frame_prev_register (frame_info_ptr this_frame,
+ia64_libunwind_frame_prev_register (const frame_info_ptr &this_frame,
                                    void **this_cache, int regnum)
 {
   int reg = regnum;
@@ -3001,7 +3001,7 @@ ia64_libunwind_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 ia64_libunwind_frame_sniffer (const struct frame_unwind *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              void **this_cache)
 {
   if (libunwind_is_initialized ()
@@ -3024,7 +3024,7 @@ static const struct frame_unwind ia64_libunwind_frame_unwind =
 };
 
 static void
-ia64_libunwind_sigtramp_frame_this_id (frame_info_ptr this_frame,
+ia64_libunwind_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                       void **this_cache,
                                       struct frame_id *this_id)
 {
@@ -3060,7 +3060,7 @@ ia64_libunwind_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-ia64_libunwind_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+ia64_libunwind_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                             void **this_cache, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -3087,7 +3087,7 @@ ia64_libunwind_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 ia64_libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                      frame_info_ptr this_frame,
+                                      const frame_info_ptr &this_frame,
                                       void **this_cache)
 {
   if (libunwind_is_initialized ())
@@ -3864,7 +3864,7 @@ static const struct ia64_infcall_ops ia64_infcall_ops =
 };
 
 static struct frame_id
-ia64_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+ia64_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   gdb_byte buf[8];
@@ -3886,7 +3886,7 @@ ia64_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
 }
 
 static CORE_ADDR 
-ia64_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+ia64_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   gdb_byte buf[8];
@@ -3911,7 +3911,7 @@ ia64_print_insn (bfd_vma memaddr, struct disassemble_info *info)
 /* The default "size_of_register_frame" gdbarch_tdep routine for ia64.  */
 
 static int
-ia64_size_of_register_frame (frame_info_ptr this_frame, ULONGEST cfm)
+ia64_size_of_register_frame (const frame_info_ptr &this_frame, ULONGEST cfm)
 {
   return (cfm & 0x7f);
 }
index a623a7e58aefbae386401e4f2959c11d46f12467..64be38b4d7669382379b80705b876fccdaed1352 100644 (file)
@@ -240,7 +240,7 @@ struct ia64_gdbarch_tdep : gdbarch_tdep_base
 
      Normally, the size of the register frame is always obtained by
      extracting the lowest 7 bits ("cfm & 0x7f").  */
-  int (*size_of_register_frame) (frame_info_ptr this_frame, ULONGEST cfm)
+  int (*size_of_register_frame) (const frame_info_ptr &this_frame, ULONGEST cfm)
     = nullptr;
 
   /* Determine the function address FADDR belongs to a shared library.
index 4e17a6b06295958c08f7c85aa8a9bddc7420b2dc..c1fdbb300c67c15893383e7a4762f062958c6ec4 100644 (file)
@@ -1743,7 +1743,7 @@ finish_backward (struct finish_command_fsm *sm)
    frame that called the function we're about to step out of.  */
 
 static void
-finish_forward (struct finish_command_fsm *sm, frame_info_ptr frame)
+finish_forward (struct finish_command_fsm *sm, const frame_info_ptr &frame)
 {
   struct frame_id frame_id = get_frame_id (frame);
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1768,9 +1768,10 @@ finish_forward (struct finish_command_fsm *sm, frame_info_ptr frame)
 /* Skip frames for "finish".  */
 
 static frame_info_ptr
-skip_finish_frames (frame_info_ptr frame)
+skip_finish_frames (const frame_info_ptr &initial_frame)
 {
   frame_info_ptr start;
+  frame_info_ptr frame = initial_frame;
 
   do
     {
@@ -2256,7 +2257,7 @@ default_print_one_register_info (struct ui_file *file,
 void
 default_print_registers_info (struct gdbarch *gdbarch,
                              struct ui_file *file,
-                             frame_info_ptr frame,
+                             const frame_info_ptr &frame,
                              int regnum, int print_all)
 {
   int i;
@@ -2416,7 +2417,7 @@ info_registers_command (const char *addr_exp, int from_tty)
 
 static void
 print_vector_info (struct ui_file *file,
-                  frame_info_ptr frame, const char *args)
+                  const frame_info_ptr &frame, const char *args)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
@@ -2953,7 +2954,7 @@ interrupt_command (const char *args, int from_tty)
 
 void
 default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
-                         frame_info_ptr frame, const char *args)
+                         const frame_info_ptr &frame, const char *args)
 {
   int regnum;
   int printed_something = 0;
index f577bb1642d009c5f7d0beb1c56c73d9aae192e6..7be28423aeb1fec91806788c90d15d74b835802a 100644 (file)
@@ -156,7 +156,7 @@ extern void reopen_exec_file (void);
 
 extern void default_print_registers_info (struct gdbarch *gdbarch,
                                          struct ui_file *file,
-                                         frame_info_ptr frame,
+                                         const frame_info_ptr &frame,
                                          int regnum, int all);
 
 /* Default implementation of gdbarch_print_float_info.  Print
@@ -164,7 +164,7 @@ extern void default_print_registers_info (struct gdbarch *gdbarch,
 
 extern void default_print_float_info (struct gdbarch *gdbarch,
                                      struct ui_file *file,
-                                     frame_info_ptr frame,
+                                     const frame_info_ptr &frame,
                                      const char *args);
 
 /* Try to determine whether TTY is GDB's input terminal.  Returns
index fa68ab8296e970afe7cb6f578ffd41f69298488a..bbb98f6dcdb3e56a740ff5561826cb8ae56f7f97 100644 (file)
@@ -88,9 +88,9 @@ static void follow_inferior_reset_breakpoints (void);
 
 static bool currently_stepping (struct thread_info *tp);
 
-static void insert_hp_step_resume_breakpoint_at_frame (frame_info_ptr);
+static void insert_hp_step_resume_breakpoint_at_frame (const frame_info_ptr &);
 
-static void insert_step_resume_breakpoint_at_caller (frame_info_ptr);
+static void insert_step_resume_breakpoint_at_caller (const frame_info_ptr &);
 
 static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR);
 
@@ -3838,7 +3838,7 @@ static void handle_step_into_function_backward (struct gdbarch *gdbarch,
                                                struct execution_control_state *ecs);
 static void handle_signal_stop (struct execution_control_state *ecs);
 static void check_exception_resume (struct execution_control_state *,
-                                   frame_info_ptr);
+                                   const frame_info_ptr &);
 
 static void end_stepping_range (struct execution_control_state *ecs);
 static void stop_waiting (struct execution_control_state *ecs);
@@ -4771,7 +4771,7 @@ fetch_inferior_event ()
 /* See infrun.h.  */
 
 void
-set_step_info (thread_info *tp, frame_info_ptr frame,
+set_step_info (thread_info *tp, const frame_info_ptr &frame,
               struct symtab_and_line sal)
 {
   /* This can be removed once this function no longer implicitly relies on the
@@ -5003,8 +5003,10 @@ adjust_pc_after_break (struct thread_info *thread,
 }
 
 static bool
-stepped_in_from (frame_info_ptr frame, struct frame_id step_frame_id)
+stepped_in_from (const frame_info_ptr &initial_frame, frame_id step_frame_id)
 {
+  frame_info_ptr frame = initial_frame;
+
   for (frame = get_prev_frame (frame);
        frame != nullptr;
        frame = get_prev_frame (frame))
@@ -8742,7 +8744,7 @@ insert_step_resume_breakpoint_at_sal (struct gdbarch *gdbarch,
    RETURN_FRAME.pc.  */
 
 static void
-insert_hp_step_resume_breakpoint_at_frame (frame_info_ptr return_frame)
+insert_hp_step_resume_breakpoint_at_frame (const frame_info_ptr &return_frame)
 {
   gdb_assert (return_frame != nullptr);
 
@@ -8773,7 +8775,7 @@ insert_hp_step_resume_breakpoint_at_frame (frame_info_ptr return_frame)
    of frame_unwind_caller_id for an example).  */
 
 static void
-insert_step_resume_breakpoint_at_caller (frame_info_ptr next_frame)
+insert_step_resume_breakpoint_at_caller (const frame_info_ptr &next_frame)
 {
   /* We shouldn't have gotten here if we don't know where the call site
      is.  */
@@ -8820,7 +8822,7 @@ insert_longjmp_resume_breakpoint (struct gdbarch *gdbarch, CORE_ADDR pc)
 static void
 insert_exception_resume_breakpoint (struct thread_info *tp,
                                    const struct block *b,
-                                   frame_info_ptr frame,
+                                   const frame_info_ptr &frame,
                                    struct symbol *sym)
 {
   try
@@ -8863,7 +8865,7 @@ insert_exception_resume_breakpoint (struct thread_info *tp,
 static void
 insert_exception_resume_from_probe (struct thread_info *tp,
                                    const struct bound_probe *probe,
-                                   frame_info_ptr frame)
+                                   const frame_info_ptr &frame)
 {
   struct value *arg_value;
   CORE_ADDR handler;
@@ -8892,7 +8894,7 @@ insert_exception_resume_from_probe (struct thread_info *tp,
 
 static void
 check_exception_resume (struct execution_control_state *ecs,
-                       frame_info_ptr frame)
+                       const frame_info_ptr &frame)
 {
   struct bound_probe probe;
   struct symbol *func;
index ba72212d562217941a687e5c7c427534bd1aa9ae..6339fd997e15d57610208c7e3091fb9322104fd3 100644 (file)
@@ -207,7 +207,7 @@ extern int stepping_past_nonsteppable_watchpoint (void);
 
 /* Record in TP the frame and location we're currently stepping through.  */
 extern void set_step_info (thread_info *tp,
-                          frame_info_ptr frame,
+                          const frame_info_ptr &frame,
                           struct symtab_and_line sal);
 
 /* Notify interpreters and observers that the current inferior has stopped with
index 02dbcd12af1fc2e420e8953c4ad7f06612b320e7..9f3deef8f030fe68f49abbf79da08f59545f410c 100644 (file)
@@ -150,7 +150,7 @@ clear_inline_frame_state (thread_info *thread)
 }
 
 static void
-inline_frame_this_id (frame_info_ptr this_frame,
+inline_frame_this_id (const frame_info_ptr &this_frame,
                      void **this_cache,
                      struct frame_id *this_id)
 {
@@ -186,7 +186,7 @@ inline_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-inline_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+inline_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                            int regnum)
 {
   /* Use get_frame_register_value instead of
@@ -208,7 +208,7 @@ inline_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
 
 static int
 inline_frame_sniffer (const struct frame_unwind *self,
-                     frame_info_ptr this_frame,
+                     const frame_info_ptr &this_frame,
                      void **this_cache)
 {
   CORE_ADDR this_pc;
@@ -441,7 +441,7 @@ inline_skipped_symbol (thread_info *thread)
    skip_inline_frames).  */
 
 int
-frame_inlined_callees (frame_info_ptr this_frame)
+frame_inlined_callees (const frame_info_ptr &this_frame)
 {
   frame_info_ptr next_frame;
   int inline_count = 0;
index e19b60e010f621513ca2e9c5d1c0e96e28431c9c..bbe617c7c5b2cb90486a64f3f3672fe528155804 100644 (file)
@@ -68,6 +68,6 @@ struct symbol *inline_skipped_symbol (thread_info *thread);
    the callees may not have associated frames (see
    skip_inline_frames).  */
 
-int frame_inlined_callees (frame_info_ptr this_frame);
+int frame_inlined_callees (const frame_info_ptr &this_frame);
 
 #endif /* !defined (INLINE_FRAME_H) */
index 937a3513df444cfe6fa44692510544732a874aed..4177de059c0dbf10a214a54cbc5cfdf3f23c74f7 100644 (file)
@@ -198,7 +198,7 @@ static CORE_ADDR
 iq2000_scan_prologue (struct gdbarch *gdbarch,
                      CORE_ADDR scan_start,
                      CORE_ADDR scan_end,
-                     frame_info_ptr fi,
+                     const frame_info_ptr &fi,
                      struct iq2000_frame_cache *cache)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -358,7 +358,7 @@ iq2000_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 }
 
 static struct iq2000_frame_cache *
-iq2000_frame_cache (frame_info_ptr this_frame, void **this_cache)
+iq2000_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct iq2000_frame_cache *cache;
@@ -391,7 +391,7 @@ iq2000_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static struct value *
-iq2000_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+iq2000_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                            int regnum)
 {
   struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame,
@@ -411,7 +411,7 @@ iq2000_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
 }
 
 static void
-iq2000_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+iq2000_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                      struct frame_id *this_id)
 {
   struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame,
@@ -435,7 +435,7 @@ static const struct frame_unwind iq2000_frame_unwind = {
 };
 
 static CORE_ADDR
-iq2000_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+iq2000_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame,
                                                         this_cache);
index f1dbf39f73fda82052012d222c12ced10738042b..3ca9cdabf9da85ff6c9194ce9595854da133de87 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -1008,7 +1008,7 @@ jit_dealloc_cache (frame_info *this_frame, void *cache)
 
 static int
 jit_frame_sniffer (const struct frame_unwind *self,
-                  frame_info_ptr this_frame, void **cache)
+                  const frame_info_ptr &this_frame, void **cache)
 {
   struct jit_unwind_private *priv_data;
   struct gdb_unwind_callbacks callbacks;
@@ -1054,7 +1054,7 @@ jit_frame_sniffer (const struct frame_unwind *self,
    the loaded plugin.  */
 
 static void
-jit_frame_this_id (frame_info_ptr this_frame, void **cache,
+jit_frame_this_id (const frame_info_ptr &this_frame, void **cache,
                   struct frame_id *this_id)
 {
   struct jit_unwind_private priv;
@@ -1083,7 +1083,7 @@ jit_frame_this_id (frame_info_ptr this_frame, void **cache,
    the register from the cache.  */
 
 static struct value *
-jit_frame_prev_register (frame_info_ptr this_frame, void **cache, int reg)
+jit_frame_prev_register (const frame_info_ptr &this_frame, void **cache, int reg)
 {
   struct jit_unwind_private *priv = (struct jit_unwind_private *) *cache;
   struct gdbarch *gdbarch;
index 5bef965c2c8648676e8ca44e3190d7524562dc10..c2eae4f74343babf15023daffe93f1d6e1131fcb 100644 (file)
@@ -321,7 +321,7 @@ struct language_defn
 
   virtual struct value *read_var_value (struct symbol *var,
                                        const struct block *var_block,
-                                       frame_info_ptr frame) const;
+                                       const frame_info_ptr &frame) const;
 
   /* Return information about whether TYPE should be passed
      (and returned) by reference at the language level.  The default
index 12e9b5ad4fd6607fcfdf9a068c6018509a25704a..b4605e48c6a37dbd37952a94a42ebd5d7aa8a9a0 100644 (file)
@@ -379,7 +379,7 @@ lm32_return_value (struct gdbarch *gdbarch, struct value *function,
    for it IS the sp for the next frame.  */
 
 static struct lm32_frame_cache *
-lm32_frame_cache (frame_info_ptr this_frame, void **this_prologue_cache)
+lm32_frame_cache (const frame_info_ptr &this_frame, void **this_prologue_cache)
 {
   CORE_ADDR current_pc;
   ULONGEST prev_sp;
@@ -425,7 +425,7 @@ lm32_frame_cache (frame_info_ptr this_frame, void **this_prologue_cache)
 }
 
 static void
-lm32_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+lm32_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                    struct frame_id *this_id)
 {
   struct lm32_frame_cache *cache = lm32_frame_cache (this_frame, this_cache);
@@ -438,7 +438,7 @@ lm32_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-lm32_frame_prev_register (frame_info_ptr this_frame,
+lm32_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_prologue_cache, int regnum)
 {
   struct lm32_frame_cache *info;
@@ -458,7 +458,7 @@ static const struct frame_unwind lm32_frame_unwind = {
 };
 
 static CORE_ADDR
-lm32_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+lm32_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct lm32_frame_cache *info = lm32_frame_cache (this_frame, this_cache);
 
index f1471d53ff4cb937f2a9bab51c4c19fd07a083bf..5ea648acd8133a07101757a579f30a81c22c7718 100644 (file)
@@ -446,7 +446,7 @@ const struct regset loongarch_lbtregset =
 
 static void
 loongarch_linux_rt_sigframe_init (const struct tramp_frame *self,
-                                 frame_info_ptr this_frame,
+                                 const frame_info_ptr &this_frame,
                                  struct trad_frame_cache *this_cache,
                                  CORE_ADDR func)
 {
@@ -521,7 +521,7 @@ loongarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
    instruction to be executed.  */
 
 static CORE_ADDR
-loongarch_linux_syscall_next_pc (frame_info_ptr frame)
+loongarch_linux_syscall_next_pc (const frame_info_ptr &frame)
 {
   const CORE_ADDR pc = get_frame_pc (frame);
   ULONGEST a7 = get_frame_register_unsigned (frame, LOONGARCH_A7_REGNUM);
index 0f4622a55be315f781d7c2594650fd6ea8cd3e7e..0b38e751d1651824c7d74d1b2713d985b762e53f 100644 (file)
@@ -113,7 +113,7 @@ loongarch_insn_is_sc (insn_t insn)
 
 static CORE_ADDR
 loongarch_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc,
-                        CORE_ADDR limit_pc, frame_info_ptr this_frame,
+                        CORE_ADDR limit_pc, const frame_info_ptr &this_frame,
                         struct trad_frame_cache *this_cache)
 {
   CORE_ADDR cur_pc = start_pc, prologue_end = 0;
@@ -390,7 +390,7 @@ loongarch_software_single_step (struct regcache *regcache)
 /* Callback function for user_reg_add.  */
 
 static struct value *
-value_of_loongarch_user_reg (frame_info_ptr frame, const void *baton)
+value_of_loongarch_user_reg (const frame_info_ptr &frame, const void *baton)
 {
   return value_of_register ((long long) baton,
                            get_next_frame_sentinel_okay (frame));
@@ -407,7 +407,7 @@ loongarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
 /* Generate, or return the cached frame cache for frame unwinder.  */
 
 static struct trad_frame_cache *
-loongarch_frame_cache (frame_info_ptr this_frame, void **this_cache)
+loongarch_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct trad_frame_cache *cache;
   CORE_ADDR pc;
@@ -429,7 +429,7 @@ loongarch_frame_cache (frame_info_ptr this_frame, void **this_cache)
 /* Implement the this_id callback for frame unwinder.  */
 
 static void
-loongarch_frame_this_id (frame_info_ptr this_frame, void **prologue_cache,
+loongarch_frame_this_id (const frame_info_ptr &this_frame, void **prologue_cache,
                         struct frame_id *this_id)
 {
   struct trad_frame_cache *info;
@@ -441,7 +441,7 @@ loongarch_frame_this_id (frame_info_ptr this_frame, void **prologue_cache,
 /* Implement the prev_register callback for frame unwinder.  */
 
 static struct value *
-loongarch_frame_prev_register (frame_info_ptr this_frame,
+loongarch_frame_prev_register (const frame_info_ptr &this_frame,
                               void **prologue_cache, int regnum)
 {
   struct trad_frame_cache *info;
index bfe398898c009db09a41ebba3e275894987c8a37..5c8108182ad6b44c520f5c14229c0348b2a49ad9 100644 (file)
@@ -41,7 +41,7 @@ struct loongarch_gdbarch_tdep : gdbarch_tdep_base
   struct loongarch_gdbarch_features abi_features;
 
   /* Return the expected next PC if FRAME is stopped at a syscall instruction.  */
-  CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr;
+  CORE_ADDR (*syscall_next_pc) (const frame_info_ptr &frame) = nullptr;
 };
 
 #endif /* LOONGARCH_TDEP_H  */
index 8da15fefe800c4013c0f26a378f9a8c3870d2dd3..0895f7bd0c4b45415abe79472716774157963196 100644 (file)
@@ -1854,7 +1854,7 @@ m32c_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
 /* Stack unwinding.  */
 
 static struct m32c_prologue *
-m32c_analyze_frame_prologue (frame_info_ptr this_frame,
+m32c_analyze_frame_prologue (const frame_info_ptr &this_frame,
                             void **this_prologue_cache)
 {
   if (! *this_prologue_cache)
@@ -1878,7 +1878,7 @@ m32c_analyze_frame_prologue (frame_info_ptr this_frame,
 
 
 static CORE_ADDR
-m32c_frame_base (frame_info_ptr this_frame,
+m32c_frame_base (const frame_info_ptr &this_frame,
                void **this_prologue_cache)
 {
   struct m32c_prologue *p
@@ -1918,7 +1918,7 @@ m32c_frame_base (frame_info_ptr this_frame,
 
 
 static void
-m32c_this_id (frame_info_ptr this_frame,
+m32c_this_id (const frame_info_ptr &this_frame,
              void **this_prologue_cache,
              struct frame_id *this_id)
 {
@@ -1931,7 +1931,7 @@ m32c_this_id (frame_info_ptr this_frame,
 
 
 static struct value *
-m32c_prev_register (frame_info_ptr this_frame,
+m32c_prev_register (const frame_info_ptr &this_frame,
                    void **this_prologue_cache, int regnum)
 {
   gdbarch *arch = get_frame_arch (this_frame);
@@ -2309,7 +2309,7 @@ m32c_return_value (struct gdbarch *gdbarch,
    code sequence seems more fragile.  */
 
 static CORE_ADDR
-m32c_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR stop_pc)
+m32c_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR stop_pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
index ec054fa263ef4686d84931e8ad7bd38e7ecb9eec..b74d2f3f161b5881bcae90866a473246b877596c 100644 (file)
@@ -85,7 +85,7 @@ static const gdb_byte linux_sigtramp_code[] = {
    the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-m32r_linux_sigtramp_start (CORE_ADDR pc, frame_info_ptr this_frame)
+m32r_linux_sigtramp_start (CORE_ADDR pc, const frame_info_ptr &this_frame)
 {
   gdb_byte buf[4];
 
@@ -133,7 +133,7 @@ static const gdb_byte linux_rt_sigtramp_code[] = {
    of the routine.  Otherwise, return 0.  */
 
 static CORE_ADDR
-m32r_linux_rt_sigtramp_start (CORE_ADDR pc, frame_info_ptr this_frame)
+m32r_linux_rt_sigtramp_start (CORE_ADDR pc, const frame_info_ptr &this_frame)
 {
   gdb_byte buf[4];
 
@@ -173,7 +173,7 @@ m32r_linux_rt_sigtramp_start (CORE_ADDR pc, frame_info_ptr this_frame)
 
 static int
 m32r_linux_pc_in_sigtramp (CORE_ADDR pc, const char *name,
-                          frame_info_ptr this_frame)
+                          const frame_info_ptr &this_frame)
 {
   /* If we have NAME, we can optimize the search.  The trampolines are
      named __restore and __restore_rt.  However, they aren't dynamically
@@ -223,7 +223,7 @@ struct m32r_frame_cache
 };
 
 static struct m32r_frame_cache *
-m32r_linux_sigtramp_frame_cache (frame_info_ptr this_frame,
+m32r_linux_sigtramp_frame_cache (const frame_info_ptr &this_frame,
                                 void **this_cache)
 {
   struct m32r_frame_cache *cache;
@@ -266,7 +266,7 @@ m32r_linux_sigtramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-m32r_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
+m32r_linux_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                   void **this_cache,
                                   struct frame_id *this_id)
 {
@@ -277,7 +277,7 @@ m32r_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-m32r_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+m32r_linux_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                         void **this_cache, int regnum)
 {
   struct m32r_frame_cache *cache =
@@ -288,7 +288,7 @@ m32r_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 m32r_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                  frame_info_ptr this_frame,
+                                  const frame_info_ptr &this_frame,
                                   void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
index 73855947e6320d2b860403f50796e68b0e711739..0bd6b499e6f08183e9a9b668454e9ed6b4e01057 100644 (file)
@@ -516,7 +516,7 @@ struct m32r_unwind_cache
    for it IS the sp for the next frame.  */
 
 static struct m32r_unwind_cache *
-m32r_frame_unwind_cache (frame_info_ptr this_frame,
+m32r_frame_unwind_cache (const frame_info_ptr &this_frame,
                         void **this_prologue_cache)
 {
   CORE_ADDR pc, scan_limit;
@@ -793,7 +793,7 @@ m32r_return_value (struct gdbarch *gdbarch, struct value *function,
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-m32r_frame_this_id (frame_info_ptr this_frame,
+m32r_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_prologue_cache, struct frame_id *this_id)
 {
   struct m32r_unwind_cache *info
@@ -823,7 +823,7 @@ m32r_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-m32r_frame_prev_register (frame_info_ptr this_frame,
+m32r_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_prologue_cache, int regnum)
 {
   struct m32r_unwind_cache *info
@@ -842,7 +842,7 @@ static const struct frame_unwind m32r_frame_unwind = {
 };
 
 static CORE_ADDR
-m32r_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+m32r_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct m32r_unwind_cache *info
     = m32r_frame_unwind_cache (this_frame, this_cache);
index a8466e31b58e141bca9c1c2dcf9c8bfba0f61ec5..d80b190f2c0f0d7998493235f962e3adb97eee6e 100644 (file)
@@ -777,7 +777,7 @@ m68hc11_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
    for it IS the sp for the next frame.  */
 
 static struct m68hc11_unwind_cache *
-m68hc11_frame_unwind_cache (frame_info_ptr this_frame,
+m68hc11_frame_unwind_cache (const frame_info_ptr &this_frame,
                            void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -874,7 +874,7 @@ m68hc11_frame_unwind_cache (frame_info_ptr this_frame,
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-m68hc11_frame_this_id (frame_info_ptr this_frame,
+m68hc11_frame_this_id (const frame_info_ptr &this_frame,
                       void **this_prologue_cache,
                       struct frame_id *this_id)
 {
@@ -899,7 +899,7 @@ m68hc11_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-m68hc11_frame_prev_register (frame_info_ptr this_frame,
+m68hc11_frame_prev_register (const frame_info_ptr &this_frame,
                             void **this_prologue_cache, int regnum)
 {
   struct value *value;
@@ -947,7 +947,7 @@ static const struct frame_unwind m68hc11_frame_unwind = {
 };
 
 static CORE_ADDR
-m68hc11_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+m68hc11_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct m68hc11_unwind_cache *info
     = m68hc11_frame_unwind_cache (this_frame, this_cache);
@@ -956,7 +956,7 @@ m68hc11_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 }
 
 static CORE_ADDR
-m68hc11_frame_args_address (frame_info_ptr this_frame, void **this_cache)
+m68hc11_frame_args_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   CORE_ADDR addr;
   struct m68hc11_unwind_cache *info
@@ -983,7 +983,7 @@ static const struct frame_base m68hc11_frame_base = {
    save_dummy_frame_tos(), and the PC match the dummy frame's breakpoint.  */
 
 static struct frame_id
-m68hc11_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+m68hc11_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   ULONGEST tos;
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -997,7 +997,7 @@ m68hc11_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
 /* Get and print the register from the given frame.  */
 static void
 m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
-                       frame_info_ptr frame, int regno)
+                       const frame_info_ptr &frame, int regno)
 {
   LONGEST rval;
 
@@ -1084,7 +1084,7 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
 /* Same as 'info reg' but prints the registers in a different way.  */
 static void
 m68hc11_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
-                             frame_info_ptr frame, int regno, int cpregs)
+                             const frame_info_ptr &frame, int regno, int cpregs)
 {
   if (regno >= 0)
     {
index 9004b2e55b447fce0ca01a24ae6717de2c5ad0ad..eca4ede099f7704b9ddc119e25292427cf23e2f0 100644 (file)
@@ -61,7 +61,7 @@
    non-RT and RT signal trampolines.  */
 
 static int
-m68k_linux_pc_in_sigtramp (frame_info_ptr this_frame)
+m68k_linux_pc_in_sigtramp (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -219,7 +219,7 @@ m68k_linux_inferior_created (inferior *inf)
 }
 
 static struct m68k_linux_sigtramp_info
-m68k_linux_get_sigtramp_info (frame_info_ptr this_frame)
+m68k_linux_get_sigtramp_info (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -248,7 +248,7 @@ m68k_linux_get_sigtramp_info (frame_info_ptr this_frame)
 /* Signal trampolines.  */
 
 static struct trad_frame_cache *
-m68k_linux_sigtramp_frame_cache (frame_info_ptr this_frame,
+m68k_linux_sigtramp_frame_cache (const frame_info_ptr &this_frame,
                                 void **this_cache)
 {
   struct frame_id this_id;
@@ -286,7 +286,7 @@ m68k_linux_sigtramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-m68k_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
+m68k_linux_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                   void **this_cache,
                                   struct frame_id *this_id)
 {
@@ -296,7 +296,7 @@ m68k_linux_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-m68k_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+m68k_linux_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                         void **this_cache,
                                         int regnum)
 {
@@ -308,7 +308,7 @@ m68k_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 m68k_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                  frame_info_ptr this_frame,
+                                  const frame_info_ptr &this_frame,
                                   void **this_prologue_cache)
 {
   return m68k_linux_pc_in_sigtramp (this_frame);
index 1ae5c33e84200c0d07fd67d028e0b2ccff96222c..abfc605aabb65dadae8b479e18cd01fee4ace1b4 100644 (file)
@@ -205,7 +205,7 @@ m68k_convert_register_p (struct gdbarch *gdbarch,
    return its contents in TO.  */
 
 static int
-m68k_register_to_value (frame_info_ptr frame, int regnum,
+m68k_register_to_value (const frame_info_ptr &frame, int regnum,
                        struct type *type, gdb_byte *to,
                        int *optimizedp, int *unavailablep)
 {
@@ -232,7 +232,7 @@ m68k_register_to_value (frame_info_ptr frame, int regnum,
    REGNUM in frame FRAME.  */
 
 static void
-m68k_value_to_register (frame_info_ptr frame, int regnum,
+m68k_value_to_register (const frame_info_ptr &frame, int regnum,
                        struct type *type, const gdb_byte *from)
 {
   gdb_byte to[M68K_MAX_REGISTER_SIZE];
@@ -900,7 +900,7 @@ m68k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 }
 
 static CORE_ADDR
-m68k_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+m68k_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_byte buf[8];
 
@@ -911,7 +911,7 @@ m68k_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* Normal frames.  */
 
 static struct m68k_frame_cache *
-m68k_frame_cache (frame_info_ptr this_frame, void **this_cache)
+m68k_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -976,7 +976,7 @@ m68k_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-m68k_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+m68k_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                    struct frame_id *this_id)
 {
   struct m68k_frame_cache *cache = m68k_frame_cache (this_frame, this_cache);
@@ -990,7 +990,7 @@ m68k_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-m68k_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+m68k_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                          int regnum)
 {
   struct m68k_frame_cache *cache = m68k_frame_cache (this_frame, this_cache);
@@ -1019,7 +1019,7 @@ static const struct frame_unwind m68k_frame_unwind =
 };
 \f
 static CORE_ADDR
-m68k_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+m68k_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct m68k_frame_cache *cache = m68k_frame_cache (this_frame, this_cache);
 
@@ -1035,7 +1035,7 @@ static const struct frame_base m68k_frame_base =
 };
 
 static struct frame_id
-m68k_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+m68k_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR fp;
 
@@ -1052,7 +1052,7 @@ m68k_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
    This routine returns true on success.  */
 
 static int
-m68k_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+m68k_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   gdb_byte *buf;
   CORE_ADDR sp, jb_addr;
index 573711e8ba4381a8795c87dad867fd82124466c9..f455d3eb51d6367a6286b515b1995da98d4e9ca7 100644 (file)
@@ -1913,7 +1913,7 @@ typedef BP_MANIPULATION (mep_break_insn) mep_breakpoint;
 
 
 static struct mep_prologue *
-mep_analyze_frame_prologue (frame_info_ptr this_frame,
+mep_analyze_frame_prologue (const frame_info_ptr &this_frame,
                            void **this_prologue_cache)
 {
   if (! *this_prologue_cache)
@@ -1943,7 +1943,7 @@ mep_analyze_frame_prologue (frame_info_ptr this_frame,
 /* Given the next frame and a prologue cache, return this frame's
    base.  */
 static CORE_ADDR
-mep_frame_base (frame_info_ptr this_frame,
+mep_frame_base (const frame_info_ptr &this_frame,
                void **this_prologue_cache)
 {
   struct mep_prologue *p
@@ -1971,7 +1971,7 @@ mep_frame_base (frame_info_ptr this_frame,
 
 
 static void
-mep_frame_this_id (frame_info_ptr this_frame,
+mep_frame_this_id (const frame_info_ptr &this_frame,
                   void **this_prologue_cache,
                   struct frame_id *this_id)
 {
@@ -1981,7 +1981,7 @@ mep_frame_this_id (frame_info_ptr this_frame,
 
 
 static struct value *
-mep_frame_prev_register (frame_info_ptr this_frame,
+mep_frame_prev_register (const frame_info_ptr &this_frame,
                         void **this_prologue_cache, int regnum)
 {
   struct mep_prologue *p
index d4202b99514a38c9b8c5957e4f8a11f42a1d4f9d..09c31b6a9a4ca7acd59baeac4980d2693eee61f8 100644 (file)
@@ -44,7 +44,7 @@ enum what_to_list { locals, arguments, all };
 static void list_args_or_locals (const frame_print_options &fp_opts,
                                 enum what_to_list what,
                                 enum print_values values,
-                                frame_info_ptr fi,
+                                const frame_info_ptr &fi,
                                 int skip_unavailable);
 
 /* True if we want to allow Python-based frame filters.  */
@@ -62,7 +62,7 @@ mi_cmd_enable_frame_filters (const char *command, const char *const *argv,
 /* Like apply_ext_lang_frame_filter, but take a print_values */
 
 static enum ext_lang_bt_status
-mi_apply_ext_lang_frame_filter (frame_info_ptr frame,
+mi_apply_ext_lang_frame_filter (const frame_info_ptr &frame,
                                frame_filter_flags flags,
                                enum print_values print_values,
                                struct ui_out *out,
@@ -577,7 +577,7 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
 static void
 list_args_or_locals (const frame_print_options &fp_opts,
                     enum what_to_list what, enum print_values values,
-                    frame_info_ptr fi, int skip_unavailable)
+                    const frame_info_ptr &fi, int skip_unavailable)
 {
   const struct block *block;
   const char *name_of_result;
index db670e318f89e66636f500809e90808f9682525f..f4ab17915ecb3296ea548e15f2a641713575f04e 100644 (file)
@@ -89,7 +89,7 @@ static void mi_execute_async_cli_command (const char *cli_command,
                                          const char *const *argv, int argc);
 static bool register_changed_p (int regnum, readonly_detached_regcache *,
                               readonly_detached_regcache *);
-static void output_register (frame_info_ptr, int regnum, int format,
+static void output_register (const frame_info_ptr &, int regnum, int format,
                             int skip_unavailable);
 
 /* Controls whether the frontend wants MI in async mode.  */
@@ -1097,7 +1097,7 @@ mi_cmd_data_list_register_values (const char *command, const char *const *argv,
    unavailable.  */
 
 static void
-output_register (frame_info_ptr frame, int regnum, int format,
+output_register (const frame_info_ptr &frame, int regnum, int format,
                 int skip_unavailable)
 {
   struct ui_out *uiout = current_uiout;
index 7d620a3688b9b64403a96b5af9d5898e9caf3726..6236ab0a0447a89599dc4401ed12c3df2767ab89 100644 (file)
@@ -62,7 +62,7 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch,
 }
 
 static void
-microblaze_linux_sigtramp_cache (frame_info_ptr next_frame,
+microblaze_linux_sigtramp_cache (const frame_info_ptr &next_frame,
                                 struct trad_frame_cache *this_cache,
                                 CORE_ADDR func, LONGEST offset,
                                 int bias)
@@ -90,7 +90,7 @@ microblaze_linux_sigtramp_cache (frame_info_ptr next_frame,
 
 static void
 microblaze_linux_sighandler_cache_init (const struct tramp_frame *self,
-                                       frame_info_ptr next_frame,
+                                       const frame_info_ptr &next_frame,
                                        struct trad_frame_cache *this_cache,
                                        CORE_ADDR func)
 {
index fc83634d1e677a505270d769a67d95a32497bb8f..07261bd4d22fde9bf362736f50fa8c6f218de84f 100644 (file)
@@ -368,7 +368,7 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
 }
 
 static CORE_ADDR
-microblaze_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+microblaze_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_byte buf[4];
   CORE_ADDR pc;
@@ -417,7 +417,7 @@ microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 /* Normal frames.  */
 
 static struct microblaze_frame_cache *
-microblaze_frame_cache (frame_info_ptr next_frame, void **this_cache)
+microblaze_frame_cache (const frame_info_ptr &next_frame, void **this_cache)
 {
   struct microblaze_frame_cache *cache;
   struct gdbarch *gdbarch = get_frame_arch (next_frame);
@@ -443,7 +443,7 @@ microblaze_frame_cache (frame_info_ptr next_frame, void **this_cache)
 }
 
 static void
-microblaze_frame_this_id (frame_info_ptr next_frame, void **this_cache,
+microblaze_frame_this_id (const frame_info_ptr &next_frame, void **this_cache,
                       struct frame_id *this_id)
 {
   struct microblaze_frame_cache *cache =
@@ -457,7 +457,7 @@ microblaze_frame_this_id (frame_info_ptr next_frame, void **this_cache,
 }
 
 static struct value *
-microblaze_frame_prev_register (frame_info_ptr this_frame,
+microblaze_frame_prev_register (const frame_info_ptr &this_frame,
                                 void **this_cache, int regnum)
 {
   struct microblaze_frame_cache *cache =
@@ -490,7 +490,7 @@ static const struct frame_unwind microblaze_frame_unwind =
 };
 \f
 static CORE_ADDR
-microblaze_frame_base_address (frame_info_ptr next_frame,
+microblaze_frame_base_address (const frame_info_ptr &next_frame,
                               void **this_cache)
 {
   struct microblaze_frame_cache *cache =
index 1b85424586fce2a93f8e7038f6f02dfde0dd6a89..2a43175a170d8e34b9aae8ce13867287d11ce924 100644 (file)
@@ -1564,7 +1564,7 @@ lookup_solib_trampoline_symbol_by_pc (CORE_ADDR pc)
    a duplicate function in case this matters someday.  */
 
 CORE_ADDR
-find_solib_trampoline_target (frame_info_ptr frame, CORE_ADDR pc)
+find_solib_trampoline_target (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct minimal_symbol *tsymbol = lookup_solib_trampoline_symbol_by_pc (pc);
 
index 97ad5e79cab5fdb675399737fed48cfd96ea43ca..8464a92bf4afc6012bf761422e9e6eda85713681 100644 (file)
@@ -275,7 +275,7 @@ mips_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
 
 static void
 mips_fbsd_sigframe_init (const struct tramp_frame *self,
-                        frame_info_ptr this_frame,
+                        const frame_info_ptr &this_frame,
                         struct trad_frame_cache *cache,
                         CORE_ADDR func)
 {
@@ -367,7 +367,7 @@ static const struct tramp_frame mips_fbsd_sigframe =
 
 static void
 mips64_fbsd_sigframe_init (const struct tramp_frame *self,
-                          frame_info_ptr this_frame,
+                          const frame_info_ptr &this_frame,
                           struct trad_frame_cache *cache,
                           CORE_ADDR func)
 {
index 9ecf698113b1359cdfab6b681b030ee855d59319..0b5e7867788dae6deb1aaaf50dca0e1cef774625 100644 (file)
@@ -94,7 +94,7 @@ enum
 #define MIPS_LINUX_JB_PC 0
 
 static int
-mips_linux_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+mips_linux_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   CORE_ADDR jb_addr;
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -247,7 +247,7 @@ mips_fill_gregset_wrapper (const struct regset *regset,
 #define MIPS64_LINUX_JB_PC 0
 
 static int
-mips64_linux_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+mips64_linux_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   CORE_ADDR jb_addr;
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -714,21 +714,21 @@ mips_linux_skip_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
    efficient way, but simplest.  First, declare all the unwinders.  */
 
 static void mips_linux_o32_sigframe_init (const struct tramp_frame *self,
-                                         frame_info_ptr this_frame,
+                                         const frame_info_ptr &this_frame,
                                          struct trad_frame_cache *this_cache,
                                          CORE_ADDR func);
 
 static void mips_linux_n32n64_sigframe_init (const struct tramp_frame *self,
-                                            frame_info_ptr this_frame,
+                                            const frame_info_ptr &this_frame,
                                             struct trad_frame_cache *this_cache,
                                             CORE_ADDR func);
 
 static int mips_linux_sigframe_validate (const struct tramp_frame *self,
-                                        frame_info_ptr this_frame,
+                                        const frame_info_ptr &this_frame,
                                         CORE_ADDR *pc);
 
 static int micromips_linux_sigframe_validate (const struct tramp_frame *self,
-                                             frame_info_ptr this_frame,
+                                             const frame_info_ptr &this_frame,
                                              CORE_ADDR *pc);
 
 #define MIPS_NR_LINUX 4000
@@ -957,7 +957,7 @@ static const struct tramp_frame micromips_linux_n64_rt_sigframe = {
 
 static void
 mips_linux_o32_sigframe_init (const struct tramp_frame *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              struct trad_frame_cache *this_cache,
                              CORE_ADDR func)
 {
@@ -1150,7 +1150,7 @@ mips_linux_o32_sigframe_init (const struct tramp_frame *self,
 
 static void
 mips_linux_n32n64_sigframe_init (const struct tramp_frame *self,
-                                frame_info_ptr this_frame,
+                                const frame_info_ptr &this_frame,
                                 struct trad_frame_cache *this_cache,
                                 CORE_ADDR func)
 {
@@ -1235,7 +1235,7 @@ mips_linux_n32n64_sigframe_init (const struct tramp_frame *self,
 
 static int
 mips_linux_sigframe_validate (const struct tramp_frame *self,
-                             frame_info_ptr this_frame,
+                             const frame_info_ptr &this_frame,
                              CORE_ADDR *pc)
 {
   return mips_pc_is_mips (*pc);
@@ -1245,7 +1245,7 @@ mips_linux_sigframe_validate (const struct tramp_frame *self,
 
 static int
 micromips_linux_sigframe_validate (const struct tramp_frame *self,
-                                  frame_info_ptr this_frame,
+                                  const frame_info_ptr &this_frame,
                                   CORE_ADDR *pc)
 {
   if (mips_pc_is_micromips (get_frame_arch (this_frame), *pc))
@@ -1290,7 +1290,7 @@ mips_linux_restart_reg_p (struct gdbarch *gdbarch)
    instruction to be executed.  */
 
 static CORE_ADDR
-mips_linux_syscall_next_pc (frame_info_ptr frame)
+mips_linux_syscall_next_pc (const frame_info_ptr &frame)
 {
   CORE_ADDR pc = get_frame_pc (frame);
   ULONGEST v0 = get_frame_register_unsigned (frame, MIPS_V0_REGNUM);
index 1452109090f998479c5f0a9539d1a25f725b76ac..8d3604a8b905a815d4775c037e8f126464ec7463 100644 (file)
@@ -254,7 +254,7 @@ static const unsigned char sigtramp_retcode_mipseb[RETCODE_SIZE] =
                                         NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch))
 
 static int
-mipsnbsd_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+mipsnbsd_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index e54440e20b5d0146047d36a99b10a1c24e72a50b..7b367898f043c7e3a66ea459166580dd3bbf81ad 100644 (file)
@@ -33,7 +33,7 @@
    in the SDE frame unwinder.  */
 
 static struct trad_frame_cache *
-mips_sde_frame_cache (frame_info_ptr this_frame, void **this_cache)
+mips_sde_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   const struct mips_regnum *regs = mips_regnum (gdbarch);
@@ -121,7 +121,7 @@ mips_sde_frame_cache (frame_info_ptr this_frame, void **this_cache)
 /* Implement the this_id function for the SDE frame unwinder.  */
 
 static void
-mips_sde_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+mips_sde_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                        struct frame_id *this_id)
 {
   struct trad_frame_cache *this_trad_cache
@@ -133,7 +133,7 @@ mips_sde_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 /* Implement the prev_register function for the SDE frame unwinder.  */
 
 static struct value *
-mips_sde_frame_prev_register (frame_info_ptr this_frame,
+mips_sde_frame_prev_register (const frame_info_ptr &this_frame,
                              void **this_cache,
                              int prev_regnum)
 {
@@ -147,7 +147,7 @@ mips_sde_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 mips_sde_frame_sniffer (const struct frame_unwind *self,
-                       frame_info_ptr this_frame,
+                       const frame_info_ptr &this_frame,
                        void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -176,7 +176,7 @@ static const struct frame_unwind mips_sde_frame_unwind =
    for the normal unwinder.  */
 
 static CORE_ADDR
-mips_sde_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+mips_sde_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct trad_frame_cache *this_trad_cache
     = mips_sde_frame_cache (this_frame, this_cache);
@@ -193,7 +193,7 @@ static const struct frame_base mips_sde_frame_base =
 };
 
 static const struct frame_base *
-mips_sde_frame_base_sniffer (frame_info_ptr this_frame)
+mips_sde_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   if (mips_sde_frame_sniffer (&mips_sde_frame_unwind, this_frame, NULL))
     return &mips_sde_frame_base;
index bf0b66c4b0024bfa21cb99dcd1d5ef7c01dc449a..8339d2f1d4c6bbfeaaec595b391824b9f95ac189 100644 (file)
@@ -74,7 +74,7 @@ static int mips16_insn_at_pc_has_delay_slot (struct gdbarch *gdbarch,
                                             CORE_ADDR addr, int mustbe32);
 
 static void mips_print_float_info (struct gdbarch *, struct ui_file *,
-                                  frame_info_ptr, const char *);
+                                  const frame_info_ptr &, const char *);
 
 /* A useful bit in the CP0 status register (MIPS_PS_REGNUM).  */
 /* This bit is set if we are emulating 32-bit FPRs on a 64-bit chip.  */
@@ -562,7 +562,7 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
    physical 64-bit registers, but should treat them as 32-bit registers.  */
 
 static int
-mips2_fp_compat (frame_info_ptr frame)
+mips2_fp_compat (const frame_info_ptr &frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   /* MIPS1 and MIPS2 have only 32 bit FPRs, and the FR bit is not
@@ -942,7 +942,7 @@ mips_convert_register_p (struct gdbarch *gdbarch,
 }
 
 static int
-mips_register_to_value (frame_info_ptr frame, int regnum,
+mips_register_to_value (const frame_info_ptr &frame, int regnum,
                        struct type *type, gdb_byte *to,
                        int *optimizedp, int *unavailablep)
 {
@@ -984,7 +984,7 @@ mips_register_to_value (frame_info_ptr frame, int regnum,
 }
 
 static void
-mips_value_to_register (frame_info_ptr frame, int regnum,
+mips_value_to_register (const frame_info_ptr &frame, int regnum,
                        struct type *type, const gdb_byte *from)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1409,7 +1409,7 @@ mips_read_pc (readable_regcache *regcache)
 }
 
 static CORE_ADDR
-mips_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+mips_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   CORE_ADDR pc;
 
@@ -1431,7 +1431,7 @@ mips_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 }
 
 static CORE_ADDR
-mips_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+mips_unwind_sp (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   return frame_unwind_register_signed
           (next_frame, gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM);
@@ -1443,7 +1443,7 @@ mips_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
    breakpoint.  */
 
 static struct frame_id
-mips_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+mips_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   return frame_id_build
           (get_frame_register_signed (this_frame,
@@ -2526,7 +2526,7 @@ mips16_get_imm (unsigned short prev_inst, /* previous instruction */
 static CORE_ADDR
 mips16_scan_prologue (struct gdbarch *gdbarch,
                      CORE_ADDR start_pc, CORE_ADDR limit_pc,
-                     frame_info_ptr this_frame,
+                     const frame_info_ptr &this_frame,
                      struct mips_frame_cache *this_cache)
 {
   int prev_non_prologue_insn = 0;
@@ -2862,7 +2862,7 @@ mips16_scan_prologue (struct gdbarch *gdbarch,
    mips_insn32 unwinder.  */
 
 static struct mips_frame_cache *
-mips_insn16_frame_cache (frame_info_ptr this_frame, void **this_cache)
+mips_insn16_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct mips_frame_cache *cache;
@@ -2898,7 +2898,7 @@ mips_insn16_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-mips_insn16_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+mips_insn16_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                           struct frame_id *this_id)
 {
   struct mips_frame_cache *info = mips_insn16_frame_cache (this_frame,
@@ -2910,7 +2910,7 @@ mips_insn16_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-mips_insn16_frame_prev_register (frame_info_ptr this_frame,
+mips_insn16_frame_prev_register (const frame_info_ptr &this_frame,
                                 void **this_cache, int regnum)
 {
   struct mips_frame_cache *info = mips_insn16_frame_cache (this_frame,
@@ -2920,7 +2920,7 @@ mips_insn16_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 mips_insn16_frame_sniffer (const struct frame_unwind *self,
-                          frame_info_ptr this_frame, void **this_cache)
+                          const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -2941,7 +2941,7 @@ static const struct frame_unwind mips_insn16_frame_unwind =
 };
 
 static CORE_ADDR
-mips_insn16_frame_base_address (frame_info_ptr this_frame,
+mips_insn16_frame_base_address (const frame_info_ptr &this_frame,
                                void **this_cache)
 {
   struct mips_frame_cache *info = mips_insn16_frame_cache (this_frame,
@@ -2958,7 +2958,7 @@ static const struct frame_base mips_insn16_frame_base =
 };
 
 static const struct frame_base *
-mips_insn16_frame_base_sniffer (frame_info_ptr this_frame)
+mips_insn16_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -2987,7 +2987,7 @@ micromips_decode_imm9 (int imm)
 static CORE_ADDR
 micromips_scan_prologue (struct gdbarch *gdbarch,
                         CORE_ADDR start_pc, CORE_ADDR limit_pc,
-                        frame_info_ptr this_frame,
+                        const frame_info_ptr &this_frame,
                         struct mips_frame_cache *this_cache)
 {
   CORE_ADDR end_prologue_addr;
@@ -3296,7 +3296,7 @@ micromips_scan_prologue (struct gdbarch *gdbarch,
    mips_insn32 unwinder.  Likewise MIPS16 and the mips_insn16 unwinder. */
 
 static struct mips_frame_cache *
-mips_micro_frame_cache (frame_info_ptr this_frame, void **this_cache)
+mips_micro_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct mips_frame_cache *cache;
@@ -3333,7 +3333,7 @@ mips_micro_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-mips_micro_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+mips_micro_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                          struct frame_id *this_id)
 {
   struct mips_frame_cache *info = mips_micro_frame_cache (this_frame,
@@ -3345,7 +3345,7 @@ mips_micro_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-mips_micro_frame_prev_register (frame_info_ptr this_frame,
+mips_micro_frame_prev_register (const frame_info_ptr &this_frame,
                                void **this_cache, int regnum)
 {
   struct mips_frame_cache *info = mips_micro_frame_cache (this_frame,
@@ -3355,7 +3355,7 @@ mips_micro_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 mips_micro_frame_sniffer (const struct frame_unwind *self,
-                         frame_info_ptr this_frame, void **this_cache)
+                         const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -3377,7 +3377,7 @@ static const struct frame_unwind mips_micro_frame_unwind =
 };
 
 static CORE_ADDR
-mips_micro_frame_base_address (frame_info_ptr this_frame,
+mips_micro_frame_base_address (const frame_info_ptr &this_frame,
                               void **this_cache)
 {
   struct mips_frame_cache *info = mips_micro_frame_cache (this_frame,
@@ -3394,7 +3394,7 @@ static const struct frame_base mips_micro_frame_base =
 };
 
 static const struct frame_base *
-mips_micro_frame_base_sniffer (frame_info_ptr this_frame)
+mips_micro_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -3432,7 +3432,7 @@ reset_saved_regs (struct gdbarch *gdbarch, struct mips_frame_cache *this_cache)
 static CORE_ADDR
 mips32_scan_prologue (struct gdbarch *gdbarch,
                      CORE_ADDR start_pc, CORE_ADDR limit_pc,
-                     frame_info_ptr this_frame,
+                     const frame_info_ptr &this_frame,
                      struct mips_frame_cache *this_cache)
 {
   int prev_non_prologue_insn;
@@ -3677,7 +3677,7 @@ restart:
    unwinder.  Likewise microMIPS and the mips_micro unwinder. */
 
 static struct mips_frame_cache *
-mips_insn32_frame_cache (frame_info_ptr this_frame, void **this_cache)
+mips_insn32_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct mips_frame_cache *cache;
@@ -3714,7 +3714,7 @@ mips_insn32_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-mips_insn32_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+mips_insn32_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                           struct frame_id *this_id)
 {
   struct mips_frame_cache *info = mips_insn32_frame_cache (this_frame,
@@ -3726,7 +3726,7 @@ mips_insn32_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-mips_insn32_frame_prev_register (frame_info_ptr this_frame,
+mips_insn32_frame_prev_register (const frame_info_ptr &this_frame,
                                 void **this_cache, int regnum)
 {
   struct mips_frame_cache *info = mips_insn32_frame_cache (this_frame,
@@ -3736,7 +3736,7 @@ mips_insn32_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 mips_insn32_frame_sniffer (const struct frame_unwind *self,
-                          frame_info_ptr this_frame, void **this_cache)
+                          const frame_info_ptr &this_frame, void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   if (mips_pc_is_mips (pc))
@@ -3756,7 +3756,7 @@ static const struct frame_unwind mips_insn32_frame_unwind =
 };
 
 static CORE_ADDR
-mips_insn32_frame_base_address (frame_info_ptr this_frame,
+mips_insn32_frame_base_address (const frame_info_ptr &this_frame,
                                void **this_cache)
 {
   struct mips_frame_cache *info = mips_insn32_frame_cache (this_frame,
@@ -3773,7 +3773,7 @@ static const struct frame_base mips_insn32_frame_base =
 };
 
 static const struct frame_base *
-mips_insn32_frame_base_sniffer (frame_info_ptr this_frame)
+mips_insn32_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   if (mips_pc_is_mips (pc))
@@ -3783,7 +3783,7 @@ mips_insn32_frame_base_sniffer (frame_info_ptr this_frame)
 }
 
 static struct trad_frame_cache *
-mips_stub_frame_cache (frame_info_ptr this_frame, void **this_cache)
+mips_stub_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   CORE_ADDR pc;
   CORE_ADDR start_addr;
@@ -3818,7 +3818,7 @@ mips_stub_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-mips_stub_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+mips_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
@@ -3827,7 +3827,7 @@ mips_stub_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-mips_stub_frame_prev_register (frame_info_ptr this_frame,
+mips_stub_frame_prev_register (const frame_info_ptr &this_frame,
                               void **this_cache, int regnum)
 {
   struct trad_frame_cache *this_trad_cache
@@ -3837,7 +3837,7 @@ mips_stub_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 mips_stub_frame_sniffer (const struct frame_unwind *self,
-                        frame_info_ptr this_frame, void **this_cache)
+                        const frame_info_ptr &this_frame, void **this_cache)
 {
   gdb_byte dummy[4];
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
@@ -3873,7 +3873,7 @@ static const struct frame_unwind mips_stub_frame_unwind =
 };
 
 static CORE_ADDR
-mips_stub_frame_base_address (frame_info_ptr this_frame,
+mips_stub_frame_base_address (const frame_info_ptr &this_frame,
                              void **this_cache)
 {
   struct trad_frame_cache *this_trad_cache
@@ -3890,7 +3890,7 @@ static const struct frame_base mips_stub_frame_base =
 };
 
 static const struct frame_base *
-mips_stub_frame_base_sniffer (frame_info_ptr this_frame)
+mips_stub_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   if (mips_stub_frame_sniffer (&mips_stub_frame_unwind, this_frame, NULL))
     return &mips_stub_frame_base;
@@ -6256,7 +6256,7 @@ mips_o64_return_value (struct gdbarch *gdbarch, struct value *function,
    into rare_buffer.  */
 
 static void
-mips_read_fp_register_single (frame_info_ptr frame, int regno,
+mips_read_fp_register_single (const frame_info_ptr &frame, int regno,
                              gdb_byte *rare_buffer)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -6290,7 +6290,7 @@ mips_read_fp_register_single (frame_info_ptr frame, int regno,
    register.  */
 
 static void
-mips_read_fp_register_double (frame_info_ptr frame, int regno,
+mips_read_fp_register_double (const frame_info_ptr &frame, int regno,
                              gdb_byte *rare_buffer)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -6328,7 +6328,7 @@ mips_read_fp_register_double (frame_info_ptr frame, int regno,
 }
 
 static void
-mips_print_fp_register (struct ui_file *file, frame_info_ptr frame,
+mips_print_fp_register (struct ui_file *file, const frame_info_ptr &frame,
                        int regnum)
 {                              /* Do values for FP (float) regs.  */
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -6393,7 +6393,7 @@ mips_print_fp_register (struct ui_file *file, frame_info_ptr frame,
 }
 
 static void
-mips_print_register (struct ui_file *file, frame_info_ptr frame,
+mips_print_register (struct ui_file *file, const frame_info_ptr &frame,
                     int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -6448,7 +6448,7 @@ print_fpu_flags (struct ui_file *file, int flags)
 
 static void
 mips_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
-                     frame_info_ptr frame, const char *args)
+                     const frame_info_ptr &frame, const char *args)
 {
   int fcsr = mips_regnum (gdbarch)->fp_control_status;
   enum mips_fpu_type type = mips_get_fpu_type (gdbarch);
@@ -6515,7 +6515,7 @@ mips_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
    Print regs in pretty columns.  */
 
 static int
-print_fp_register_row (struct ui_file *file, frame_info_ptr frame,
+print_fp_register_row (struct ui_file *file, const frame_info_ptr &frame,
                       int regnum)
 {
   gdb_printf (file, " ");
@@ -6528,7 +6528,7 @@ print_fp_register_row (struct ui_file *file, frame_info_ptr frame,
 /* Print a row's worth of GP (int) registers, with name labels above.  */
 
 static int
-print_gp_register_row (struct ui_file *file, frame_info_ptr frame,
+print_gp_register_row (struct ui_file *file, const frame_info_ptr &frame,
                       int start_regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -6631,7 +6631,7 @@ print_gp_register_row (struct ui_file *file, frame_info_ptr frame,
 
 static void
 mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
-                          frame_info_ptr frame, int regnum, int all)
+                          const frame_info_ptr &frame, int regnum, int all)
 {
   if (regnum != -1)            /* Do one specified register.  */
     {
@@ -6663,7 +6663,7 @@ mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
 
 static int
 mips_single_step_through_delay (struct gdbarch *gdbarch,
-                               frame_info_ptr frame)
+                               const frame_info_ptr &frame)
 {
   CORE_ADDR pc = get_frame_pc (frame);
   enum mips_isa isa;
@@ -7569,7 +7569,7 @@ mips_is_stub_mode (const char *mode)
    The limit on the search is arbitrarily set to 20 instructions.  FIXME.  */
 
 static CORE_ADDR
-mips_get_mips16_fn_stub_pc (frame_info_ptr frame, CORE_ADDR pc)
+mips_get_mips16_fn_stub_pc (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -7692,7 +7692,7 @@ mips_get_mips16_fn_stub_pc (frame_info_ptr frame, CORE_ADDR pc)
    gory details.  */
 
 static CORE_ADDR
-mips_skip_mips16_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+mips_skip_mips16_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   CORE_ADDR start_addr;
@@ -7820,7 +7820,7 @@ mips_in_return_stub (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
    so that $t9 has the correct value at function entry.  */
 
 static CORE_ADDR
-mips_skip_pic_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+mips_skip_pic_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -7873,7 +7873,7 @@ mips_skip_pic_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
 }
 
 static CORE_ADDR
-mips_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+mips_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   CORE_ADDR requested_pc = pc;
   CORE_ADDR target_pc;
@@ -8074,7 +8074,7 @@ mips_register_g_packet_guesses (struct gdbarch *gdbarch)
 }
 
 static struct value *
-value_of_mips_user_reg (frame_info_ptr frame, const void *baton)
+value_of_mips_user_reg (const frame_info_ptr &frame, const void *baton)
 {
   const int *reg_p = (const int *) baton;
   return value_of_register (*reg_p, get_next_frame_sentinel_okay (frame));
index b64f37cebbbaa42e98081073919cdf73c5e894ba..eec1fb56f4e11b4d5cebc31f8a06d0b664982c14 100644 (file)
@@ -125,7 +125,7 @@ struct mips_gdbarch_tdep : gdbarch_tdep_base
 
   /* Return the expected next PC if FRAME is stopped at a syscall
      instruction.  */
-  CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr;
+  CORE_ADDR (*syscall_next_pc) (const frame_info_ptr &frame) = nullptr;
 };
 
 /* Register numbers of various important registers.  */
index 6ea49c16a56b5bdae6ca131b0a2f064b7cc1b8c8..cacb8bbee50a20137f140c6323a5ee986c6817be 100644 (file)
@@ -77,7 +77,7 @@ mips64obsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
 
 static void
 mips64obsd_sigframe_init (const struct tramp_frame *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          struct trad_frame_cache *cache,
                          CORE_ADDR func)
 {
index 276e01cdf8acce375b9601bd75d88409fe78b229..4554cb182314fc5c43483e4c84bd3dce67e53b05 100644 (file)
@@ -464,7 +464,7 @@ am33_iterate_over_regset_sections (struct gdbarch *gdbarch,
 \f
 static void
 am33_linux_sigframe_cache_init (const struct tramp_frame *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                struct trad_frame_cache *this_cache,
                                CORE_ADDR func);
 
@@ -607,7 +607,7 @@ struct sigcontext {
 
 static void
 am33_linux_sigframe_cache_init (const struct tramp_frame *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                struct trad_frame_cache *this_cache,
                                CORE_ADDR func)
 {
index 4d65fed38e76779514725bee1544be8a28f618e1..f8c5a0906ef56ac4e619c29be847e69cb68946ca 100644 (file)
@@ -1042,7 +1042,7 @@ mn10300_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
    use the current frame PC as the limit, then
    invoke mn10300_analyze_prologue and return its result.  */
 static struct mn10300_prologue *
-mn10300_analyze_frame_prologue (frame_info_ptr this_frame,
+mn10300_analyze_frame_prologue (const frame_info_ptr &this_frame,
                           void **this_prologue_cache)
 {
   if (!*this_prologue_cache)
@@ -1071,7 +1071,7 @@ mn10300_analyze_frame_prologue (frame_info_ptr this_frame,
 /* Given the next frame and a prologue cache, return this frame's
    base.  */
 static CORE_ADDR
-mn10300_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
+mn10300_frame_base (const frame_info_ptr &this_frame, void **this_prologue_cache)
 {
   struct mn10300_prologue *p
     = mn10300_analyze_frame_prologue (this_frame, this_prologue_cache);
@@ -1095,7 +1095,7 @@ mn10300_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
 }
 
 static void
-mn10300_frame_this_id (frame_info_ptr this_frame,
+mn10300_frame_this_id (const frame_info_ptr &this_frame,
                       void **this_prologue_cache,
                       struct frame_id *this_id)
 {
@@ -1106,7 +1106,7 @@ mn10300_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-mn10300_frame_prev_register (frame_info_ptr this_frame,
+mn10300_frame_prev_register (const frame_info_ptr &this_frame,
                             void **this_prologue_cache, int regnum)
 {
   struct mn10300_prologue *p
index 4a80355ada55484d3551852da1465247054df64a..812c92d1e0af713c14635cae2b7f603877e3b44e 100644 (file)
@@ -514,7 +514,7 @@ moxie_alloc_frame_cache (void)
 /* Populate a moxie_frame_cache object for this_frame.  */
 
 static struct moxie_frame_cache *
-moxie_frame_cache (frame_info_ptr this_frame, void **this_cache)
+moxie_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct moxie_frame_cache *cache;
   CORE_ADDR current_pc;
@@ -551,7 +551,7 @@ moxie_frame_cache (frame_info_ptr this_frame, void **this_cache)
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-moxie_frame_this_id (frame_info_ptr this_frame,
+moxie_frame_this_id (const frame_info_ptr &this_frame,
                    void **this_prologue_cache, struct frame_id *this_id)
 {
   struct moxie_frame_cache *cache = moxie_frame_cache (this_frame,
@@ -567,7 +567,7 @@ moxie_frame_this_id (frame_info_ptr this_frame,
 /* Get the value of register regnum in the previous stack frame.  */
 
 static struct value *
-moxie_frame_prev_register (frame_info_ptr this_frame,
+moxie_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_prologue_cache, int regnum)
 {
   struct moxie_frame_cache *cache = moxie_frame_cache (this_frame,
@@ -598,7 +598,7 @@ static const struct frame_unwind moxie_frame_unwind = {
 /* Return the base address of this_frame.  */
 
 static CORE_ADDR
-moxie_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+moxie_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct moxie_frame_cache *cache = moxie_frame_cache (this_frame,
                                                       this_cache);
index 6bbb1d43300f918a99a55ef82d46a69c2f99beaa..e07e3cc4be2b8b367132cdded90b648a5d991897 100644 (file)
@@ -458,7 +458,7 @@ msp430_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
    return that struct as the value of this function.  */
 
 static struct msp430_prologue *
-msp430_analyze_frame_prologue (frame_info_ptr this_frame,
+msp430_analyze_frame_prologue (const frame_info_ptr &this_frame,
                               void **this_prologue_cache)
 {
   if (!*this_prologue_cache)
@@ -486,7 +486,7 @@ msp430_analyze_frame_prologue (frame_info_ptr this_frame,
 /* Given a frame and a prologue cache, return this frame's base.  */
 
 static CORE_ADDR
-msp430_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
+msp430_frame_base (const frame_info_ptr &this_frame, void **this_prologue_cache)
 {
   struct msp430_prologue *p
     = msp430_analyze_frame_prologue (this_frame, this_prologue_cache);
@@ -498,7 +498,7 @@ msp430_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
 /* Implement the "frame_this_id" method for unwinding frames.  */
 
 static void
-msp430_this_id (frame_info_ptr this_frame,
+msp430_this_id (const frame_info_ptr &this_frame,
                void **this_prologue_cache, struct frame_id *this_id)
 {
   *this_id = frame_id_build (msp430_frame_base (this_frame,
@@ -509,7 +509,7 @@ msp430_this_id (frame_info_ptr this_frame,
 /* Implement the "frame_prev_register" method for unwinding frames.  */
 
 static struct value *
-msp430_prev_register (frame_info_ptr this_frame,
+msp430_prev_register (const frame_info_ptr &this_frame,
                      void **this_prologue_cache, int regnum)
 {
   struct msp430_prologue *p
@@ -805,7 +805,7 @@ msp430_in_return_stub (struct gdbarch *gdbarch, CORE_ADDR pc,
 
 /* Implement the "skip_trampoline_code" gdbarch method.  */
 static CORE_ADDR
-msp430_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+msp430_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct bound_minimal_symbol bms;
   const char *stub_name;
index d4be42ce777ec903d030300f8edf2ee25983bbf4..e453cd0f6d9a4dc1b2390d719235eecea116dc00 100644 (file)
@@ -265,7 +265,7 @@ static const struct
    register.  */
 
 static struct value *
-value_of_nds32_reg (frame_info_ptr frame, const void *baton)
+value_of_nds32_reg (const frame_info_ptr &frame, const void *baton)
 {
   return value_of_register ((int) (intptr_t) baton,
                            get_next_frame_sentinel_okay (frame));
@@ -902,7 +902,7 @@ nds32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
    a pointer to the current nds32_frame_cache in *THIS_CACHE.  */
 
 static struct nds32_frame_cache *
-nds32_frame_cache (frame_info_ptr this_frame, void **this_cache)
+nds32_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct nds32_frame_cache *cache;
@@ -953,7 +953,7 @@ nds32_frame_cache (frame_info_ptr this_frame, void **this_cache)
    PC and the caller's SP when we were called.  */
 
 static void
-nds32_frame_this_id (frame_info_ptr this_frame,
+nds32_frame_this_id (const frame_info_ptr &this_frame,
                     void **this_cache, struct frame_id *this_id)
 {
   struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache);
@@ -968,7 +968,7 @@ nds32_frame_this_id (frame_info_ptr this_frame,
 /* Implement the "prev_register" frame_unwind method.  */
 
 static struct value *
-nds32_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+nds32_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                           int regnum)
 {
   struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache);
@@ -1002,7 +1002,7 @@ static const struct frame_unwind nds32_frame_unwind =
 /* Return the frame base address of *THIS_FRAME.  */
 
 static CORE_ADDR
-nds32_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+nds32_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache);
 
@@ -1288,7 +1288,7 @@ nds32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
 
 static int
 nds32_epilogue_frame_sniffer (const struct frame_unwind *self,
-                             frame_info_ptr this_frame, void **this_cache)
+                             const frame_info_ptr &this_frame, void **this_cache)
 {
   if (frame_relative_level (this_frame) == 0)
     return nds32_stack_frame_destroyed_p (get_frame_arch (this_frame),
@@ -1303,7 +1303,7 @@ nds32_epilogue_frame_sniffer (const struct frame_unwind *self,
    *THIS_CACHE.  */
 
 static struct nds32_frame_cache *
-nds32_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
+nds32_epilogue_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct nds32_frame_cache *cache;
@@ -1335,7 +1335,7 @@ nds32_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
 /* Implement the "this_id" frame_unwind method.  */
 
 static void
-nds32_epilogue_frame_this_id (frame_info_ptr this_frame,
+nds32_epilogue_frame_this_id (const frame_info_ptr &this_frame,
                              void **this_cache, struct frame_id *this_id)
 {
   struct nds32_frame_cache *cache
@@ -1351,7 +1351,7 @@ nds32_epilogue_frame_this_id (frame_info_ptr this_frame,
 /* Implement the "prev_register" frame_unwind method.  */
 
 static struct value *
-nds32_epilogue_frame_prev_register (frame_info_ptr this_frame,
+nds32_epilogue_frame_prev_register (const frame_info_ptr &this_frame,
                                    void **this_cache, int regnum)
 {
   struct nds32_frame_cache *cache
@@ -1825,7 +1825,7 @@ nds32_return_value (struct gdbarch *gdbarch, struct value *func_type,
 /* Implement the "get_longjmp_target" gdbarch method.  */
 
 static int
-nds32_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+nds32_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   gdb_byte buf[4];
   CORE_ADDR jb_addr;
index 1ff0977810690fbece68a54fd782a4108417d990..9d2d4fff04a21b9efe4fa9f7c19c4d6f99b224b7 100644 (file)
@@ -134,7 +134,7 @@ nios2_iterate_over_regset_sections (struct gdbarch *gdbarch,
 
 static void
 nios2_linux_rt_sigreturn_init (const struct tramp_frame *self,
-                              frame_info_ptr next_frame,
+                              const frame_info_ptr &next_frame,
                               struct trad_frame_cache *this_cache,
                               CORE_ADDR func)
 {
@@ -187,7 +187,7 @@ static struct tramp_frame nios2_r2_linux_rt_sigreturn_tramp_frame =
    instruction to be executed.  */
 
 static CORE_ADDR
-nios2_linux_syscall_next_pc (frame_info_ptr frame,
+nios2_linux_syscall_next_pc (const frame_info_ptr &frame,
                             const struct nios2_opcode *op)
 {
   CORE_ADDR pc = get_frame_pc (frame);
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);
index ae68131736afeb15db41b97dd912b6737dac3f89..57e0de7076d0b6968e01ab5b9a61a0fe4a7ef7d4 100644 (file)
@@ -73,7 +73,7 @@ struct nios2_gdbarch_tdep : gdbarch_tdep_base
 {
   /* Assumes FRAME is stopped at a syscall (trap) instruction; returns
      the expected next PC.  */
-  CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame,
+  CORE_ADDR (*syscall_next_pc) (const frame_info_ptr &frame,
                                const struct nios2_opcode *op) = nullptr;
 
   /* Returns true if PC points to a kernel helper function.  */
index 0e9226982772a2284a249f380c6a9f9bcc5b623a..2aa3ef3fd4eec27a9ca024d584c2b6a30e39d930 100644 (file)
@@ -217,7 +217,7 @@ extern observable<ptid_t /* thread */, CORE_ADDR /* address */>
     inferior_call_post;
 
 /* A register in the inferior has been modified by the gdb user.  */
-extern observable<frame_info_ptr /* frame */, int /* regnum */>
+extern observable<const frame_info_ptr &/* frame */, int /* regnum */>
     register_changed;
 
 /* The user-selected inferior, thread and/or frame has changed.  The
index 5b65559bdeb068d2e3592bd70b403321ee3ede80..75ab8459e754dacc7d0fc3d3f6f34308f02c64a4 100644 (file)
@@ -62,7 +62,7 @@ or1k_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
 /* Signal trampoline support.  */
 
 static void or1k_linux_sigframe_init (const struct tramp_frame *self,
-                                      frame_info_ptr this_frame,
+                                      const frame_info_ptr &this_frame,
                                       struct trad_frame_cache *this_cache,
                                       CORE_ADDR func);
 
@@ -116,7 +116,7 @@ static const struct tramp_frame or1k_linux_sigframe = {
 
 static void
 or1k_linux_sigframe_init (const struct tramp_frame *self,
-                          frame_info_ptr this_frame,
+                          const frame_info_ptr &this_frame,
                           struct trad_frame_cache *this_cache,
                           CORE_ADDR func)
 {
index c8365dc9d7218727a8ae42a386c01fc85ac58a50..ffcb50f4bcd1f4bd75e7e36a838777e7fec3fcc0 100644 (file)
@@ -378,7 +378,7 @@ or1k_delay_slot_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 static int
 or1k_single_step_through_delay (struct gdbarch *gdbarch,
-                               frame_info_ptr this_frame)
+                               const frame_info_ptr &this_frame)
 {
   ULONGEST val;
   CORE_ADDR ppc;
@@ -558,7 +558,7 @@ or1k_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 /* Implement the unwind_pc gdbarch method.  */
 
 static CORE_ADDR
-or1k_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+or1k_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   CORE_ADDR pc;
 
@@ -578,7 +578,7 @@ or1k_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* Implement the unwind_sp gdbarch method.  */
 
 static CORE_ADDR
-or1k_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+or1k_unwind_sp (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   CORE_ADDR sp;
 
@@ -889,7 +889,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
    Reportedly, this is only valid for frames less than 0x7fff in size.  */
 
 static struct trad_frame_cache *
-or1k_frame_cache (frame_info_ptr this_frame, void **prologue_cache)
+or1k_frame_cache (const frame_info_ptr &this_frame, void **prologue_cache)
 {
   struct gdbarch *gdbarch;
   struct trad_frame_cache *info;
@@ -1102,7 +1102,7 @@ or1k_frame_cache (frame_info_ptr this_frame, void **prologue_cache)
 /* Implement the this_id function for the stub unwinder.  */
 
 static void
-or1k_frame_this_id (frame_info_ptr this_frame,
+or1k_frame_this_id (const frame_info_ptr &this_frame,
                    void **prologue_cache, struct frame_id *this_id)
 {
   struct trad_frame_cache *info = or1k_frame_cache (this_frame,
@@ -1114,7 +1114,7 @@ or1k_frame_this_id (frame_info_ptr this_frame,
 /* Implement the prev_register function for the stub unwinder.  */
 
 static struct value *
-or1k_frame_prev_register (frame_info_ptr this_frame,
+or1k_frame_prev_register (const frame_info_ptr &this_frame,
                          void **prologue_cache, int regnum)
 {
   struct trad_frame_cache *info = or1k_frame_cache (this_frame,
index e70056a2ac80a89c7c4fec79b18edfaf66975bb4..719ddc71d130e23744cdf299123e0a660eac03bd 100644 (file)
@@ -150,7 +150,7 @@ static const int ppcfbsd_sigreturn_offset[] = {
 
 static int
 ppcfbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -197,7 +197,7 @@ ppcfbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
 }
 
 static struct trad_frame_cache *
-ppcfbsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
+ppcfbsd_sigtramp_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
@@ -243,7 +243,7 @@ ppcfbsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-ppcfbsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
+ppcfbsd_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                void **this_cache, struct frame_id *this_id)
 {
   struct trad_frame_cache *cache =
@@ -253,7 +253,7 @@ ppcfbsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-ppcfbsd_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+ppcfbsd_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                      void **this_cache, int regnum)
 {
   struct trad_frame_cache *cache =
index a7c1104b29f4250541485590f862a65a2b09ce9e..2824cb628c3dd3da6ae253a316ae015ffd8f1b36 100644 (file)
@@ -338,7 +338,7 @@ powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc)
    stub sequence.  */
 
 static CORE_ADDR
-ppc_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+ppc_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   unsigned int insnbuf[POWERPC32_PLT_CHECK_LEN];
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -1169,7 +1169,7 @@ ppc_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
 }
 
 static void
-ppc_linux_sigtramp_cache (frame_info_ptr this_frame,
+ppc_linux_sigtramp_cache (const frame_info_ptr &this_frame,
                          struct trad_frame_cache *this_cache,
                          CORE_ADDR func, LONGEST offset,
                          int bias)
@@ -1241,7 +1241,7 @@ ppc_linux_sigtramp_cache (frame_info_ptr this_frame,
 
 static void
 ppc32_linux_sigaction_cache_init (const struct tramp_frame *self,
-                                 frame_info_ptr this_frame,
+                                 const frame_info_ptr &this_frame,
                                  struct trad_frame_cache *this_cache,
                                  CORE_ADDR func)
 {
@@ -1253,7 +1253,7 @@ ppc32_linux_sigaction_cache_init (const struct tramp_frame *self,
 
 static void
 ppc64_linux_sigaction_cache_init (const struct tramp_frame *self,
-                                 frame_info_ptr this_frame,
+                                 const frame_info_ptr &this_frame,
                                  struct trad_frame_cache *this_cache,
                                  CORE_ADDR func)
 {
@@ -1265,7 +1265,7 @@ ppc64_linux_sigaction_cache_init (const struct tramp_frame *self,
 
 static void
 ppc32_linux_sighandler_cache_init (const struct tramp_frame *self,
-                                  frame_info_ptr this_frame,
+                                  const frame_info_ptr &this_frame,
                                   struct trad_frame_cache *this_cache,
                                   CORE_ADDR func)
 {
@@ -1277,7 +1277,7 @@ ppc32_linux_sighandler_cache_init (const struct tramp_frame *self,
 
 static void
 ppc64_linux_sighandler_cache_init (const struct tramp_frame *self,
-                                  frame_info_ptr this_frame,
+                                  const frame_info_ptr &this_frame,
                                   struct trad_frame_cache *this_cache,
                                   CORE_ADDR func)
 {
index 0245969e8648e9484388e607b39f3a0c218de683..58f5678d5d9c978a5f70ceaa4c087e93d3ad9d7c 100644 (file)
@@ -97,7 +97,7 @@ extern const struct tramp_frame ppcnbsd2_sigtramp;
 
 static void
 ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             struct trad_frame_cache *this_cache,
                             CORE_ADDR func)
 {
index d9e21e3a3269cf536ccac55b13e6dd9ef5e56699..b845e67bcaab522707ab4a9f0162b7d7b6957561 100644 (file)
@@ -117,7 +117,7 @@ static const int ppcobsd_sigreturn_offset[] = {
 
 static int
 ppcobsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                               frame_info_ptr this_frame,
+                               const frame_info_ptr &this_frame,
                                void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -158,7 +158,7 @@ ppcobsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
 }
 
 static struct trad_frame_cache *
-ppcobsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
+ppcobsd_sigtramp_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
@@ -212,7 +212,7 @@ ppcobsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-ppcobsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
+ppcobsd_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                void **this_cache, struct frame_id *this_id)
 {
   struct trad_frame_cache *cache =
@@ -222,7 +222,7 @@ ppcobsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-ppcobsd_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+ppcobsd_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                      void **this_cache, int regnum)
 {
   struct trad_frame_cache *cache =
index 59365fc490c7714074b6dc1a14f32c4873fc40eb..ebbf1cf4295f3beb6b0b4ce75a11ecb22de15f27 100644 (file)
@@ -2163,7 +2163,8 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
 }
 
 CORE_ADDR
-ppc_sysv_get_return_buf_addr (struct type *val_type, frame_info_ptr cur_frame)
+ppc_sysv_get_return_buf_addr (struct type *val_type,
+                             const frame_info_ptr &cur_frame)
 {
   /* The PowerPC ABI specifies aggregates that are not returned by value
      are returned in a storage buffer provided by the caller.  The
index d4a62d2e33c2b54536cf3aa959d55c04a230ce25..db31c7f199acf7cb6ff1a8dfd4979bc0b2fd4571 100644 (file)
@@ -177,7 +177,7 @@ extern void ppc_collect_vsxregset (const struct regset *regset,
 
 /* Implementation of the gdbarch get_return_buf_addr hook.  */
 
-extern CORE_ADDR ppc_sysv_get_return_buf_addr (type*, frame_info_ptr);
+extern CORE_ADDR ppc_sysv_get_return_buf_addr (type*, const frame_info_ptr &);
 
 /* Private data that this module attaches to struct gdbarch.  */
 
@@ -424,7 +424,7 @@ struct ppc_insn_pattern
   int optional;                 /* If non-zero, this insn may be absent.  */
 };
 
-extern int ppc_insns_match_pattern (frame_info_ptr frame, CORE_ADDR pc,
+extern int ppc_insns_match_pattern (const frame_info_ptr &frame, CORE_ADDR pc,
                                    const struct ppc_insn_pattern *pattern,
                                    unsigned int *insns);
 extern CORE_ADDR ppc_insn_d_field (unsigned int insn);
index d415836c69df4bf41b2dab9feea04cb7cb38dfdb..5797d55f00b74583f503741a04fb92767d9bdb5c 100644 (file)
@@ -85,7 +85,7 @@
    Return the function's entry point.  */
 
 static CORE_ADDR
-ppc64_plt_entry_point (frame_info_ptr frame, CORE_ADDR plt_off)
+ppc64_plt_entry_point (const frame_info_ptr &frame, CORE_ADDR plt_off)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -108,7 +108,7 @@ ppc64_plt_entry_point (frame_info_ptr frame, CORE_ADDR plt_off)
 }
 
 static CORE_ADDR
-ppc64_plt_pcrel_entry_point (frame_info_ptr frame, CORE_ADDR plt_off,
+ppc64_plt_pcrel_entry_point (const frame_info_ptr &frame, CORE_ADDR plt_off,
                             CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -546,7 +546,7 @@ static const struct ppc_insn_pattern ppc64_standard_linkage12[] =
    dynamic linker lazy symbol resolution stubs.)  */
 
 static CORE_ADDR
-ppc64_standard_linkage1_target (frame_info_ptr frame, unsigned int *insn)
+ppc64_standard_linkage1_target (const frame_info_ptr &frame, unsigned int *insn)
 {
   CORE_ADDR plt_off = ((ppc_insn_d_field (insn[0]) << 16)
                       + ppc_insn_ds_field (insn[2]));
@@ -555,7 +555,7 @@ ppc64_standard_linkage1_target (frame_info_ptr frame, unsigned int *insn)
 }
 
 static CORE_ADDR
-ppc64_standard_linkage2_target (frame_info_ptr frame, unsigned int *insn)
+ppc64_standard_linkage2_target (const frame_info_ptr &frame, unsigned int *insn)
 {
   CORE_ADDR plt_off = ((ppc_insn_d_field (insn[1]) << 16)
                       + ppc_insn_ds_field (insn[3]));
@@ -564,7 +564,7 @@ ppc64_standard_linkage2_target (frame_info_ptr frame, unsigned int *insn)
 }
 
 static CORE_ADDR
-ppc64_standard_linkage3_target (frame_info_ptr frame, unsigned int *insn)
+ppc64_standard_linkage3_target (const frame_info_ptr &frame, unsigned int *insn)
 {
   CORE_ADDR plt_off = ppc_insn_ds_field (insn[1]);
 
@@ -572,7 +572,7 @@ ppc64_standard_linkage3_target (frame_info_ptr frame, unsigned int *insn)
 }
 
 static CORE_ADDR
-ppc64_standard_linkage4_target (frame_info_ptr frame, unsigned int *insn)
+ppc64_standard_linkage4_target (const frame_info_ptr &frame, unsigned int *insn)
 {
   CORE_ADDR plt_off = ((ppc_insn_d_field (insn[1]) << 16)
                       + ppc_insn_ds_field (insn[2]));
@@ -581,7 +581,7 @@ ppc64_standard_linkage4_target (frame_info_ptr frame, unsigned int *insn)
 }
 
 static CORE_ADDR
-ppc64_pcrel_linkage1_target (frame_info_ptr frame, unsigned int *insn,
+ppc64_pcrel_linkage1_target (const frame_info_ptr &frame, unsigned int *insn,
                             CORE_ADDR pc)
 {
   /* insn[0] is for the std instruction.  */
@@ -591,7 +591,7 @@ ppc64_pcrel_linkage1_target (frame_info_ptr frame, unsigned int *insn,
 }
 
 static CORE_ADDR
-ppc64_pcrel_linkage2_target (frame_info_ptr frame, unsigned int *insn,
+ppc64_pcrel_linkage2_target (const frame_info_ptr &frame, unsigned int *insn,
                             CORE_ADDR pc)
 {
   CORE_ADDR plt_off;
@@ -611,7 +611,7 @@ ppc64_pcrel_linkage2_target (frame_info_ptr frame, unsigned int *insn,
    check whether we are in the middle of a PLT stub.  */
 
 static CORE_ADDR
-ppc64_skip_trampoline_code_1 (frame_info_ptr frame, CORE_ADDR pc)
+ppc64_skip_trampoline_code_1 (const frame_info_ptr &frame, CORE_ADDR pc)
 {
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
   unsigned int insns[MAX (MAX (MAX (ARRAY_SIZE (ppc64_standard_linkage1),
@@ -707,7 +707,7 @@ ppc64_skip_trampoline_code_1 (frame_info_ptr frame, CORE_ADDR pc)
    ppc_elfv2_skip_entrypoint.  */
 
 CORE_ADDR
-ppc64_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+ppc64_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
index 4dc6e6a870910409c78cb531e68deeeed04b2cc0..ff0e3fdd033e5facbc2444de5926b2fbbb4e8226 100644 (file)
@@ -24,7 +24,7 @@ struct gdbarch;
 class frame_info_ptr;
 struct target_ops;
 
-extern CORE_ADDR ppc64_skip_trampoline_code (frame_info_ptr frame,
+extern CORE_ADDR ppc64_skip_trampoline_code (const frame_info_ptr &frame,
                                             CORE_ADDR pc);
 
 extern CORE_ADDR ppc64_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
index 7f47f489a9430fdd09ec6cf7416c8ca092d5cd41..43c0f447fa8a6a8671f602c07adf3ea53b6f2eed 100644 (file)
@@ -2330,7 +2330,7 @@ clear_dangling_display_expressions (struct objfile *objfile)
 
 void
 print_variable_and_value (const char *name, struct symbol *var,
-                         frame_info_ptr frame,
+                         const frame_info_ptr &frame,
                          struct ui_file *stream, int indent)
 {
 
index a68283ab5ce7fffeda1bfff147b25b8de9bb529b..4d68e129636e7d4b5bc88f422cd9b673402dcbdb 100644 (file)
@@ -786,7 +786,7 @@ ignore_probes_command (const char *arg, int from_tty)
 /* See comments in probe.h.  */
 
 struct value *
-probe_safe_evaluate_at_pc (frame_info_ptr frame, unsigned n)
+probe_safe_evaluate_at_pc (const frame_info_ptr &frame, unsigned n)
 {
   struct bound_probe probe;
   unsigned n_args;
index 31b0b8b8f739eef5fb927bdb1b82b6ffd57263a8..41e728ad049e03ec1e7a687775b0332b238489b8 100644 (file)
@@ -143,7 +143,7 @@ public:
      corresponding to it.  The argument number is represented N.
      This function can throw an exception.  */
   virtual struct value *evaluate_argument (unsigned n,
-                                          frame_info_ptr frame) = 0;
+                                          const frame_info_ptr &frame) = 0;
 
   /* Compile the Nth argument of the probe to an agent expression.
      The argument number is represented by N.  */
@@ -301,7 +301,7 @@ extern struct cmd_list_element **info_probes_cmdlist_get (void);
    probe at that location, or if the probe does not have enough arguments,
    this returns NULL.  */
 
-extern struct value *probe_safe_evaluate_at_pc (frame_info_ptr frame,
+extern struct value *probe_safe_evaluate_at_pc (const frame_info_ptr &frame,
                                                unsigned n);
 
 /* Return true if the PROVIDER/NAME probe from OBJFILE_NAME needs to be
index 30dd054305b64f7dc09b85bdf5da76b09e1748b7..388c513e5e9b5f2b2172c9657f5df7a40fc4adc7 100644 (file)
@@ -55,7 +55,7 @@ enum inferior_call_kind
 
 extern int emit_inferior_call_event (inferior_call_kind kind,
                                     ptid_t thread, CORE_ADDR addr);
-extern int emit_register_changed_event (frame_info_ptr frame,
+extern int emit_register_changed_event (const frame_info_ptr &frame,
                                        int regnum);
 extern int emit_memory_changed_event (CORE_ADDR addr, ssize_t len);
 extern int evpy_emit_event (PyObject *event,
index a1061fc0d729ebdbc6645b2f78bfb07648458df5..7467f845b78f89dc2e5640b909d5d61edd8e6bf0 100644 (file)
@@ -361,7 +361,7 @@ frapy_function (PyObject *self, PyObject *args)
    Sets a Python exception and returns NULL on error.  */
 
 PyObject *
-frame_info_to_frame_object (frame_info_ptr frame)
+frame_info_to_frame_object (const frame_info_ptr &frame)
 {
   gdbpy_ref<frame_object> frame_obj (PyObject_New (frame_object,
                                                   &frame_object_type));
index fd2757d686d6f455977e123ff6c1f6bb5f3b75df..768e3a6e0c81436b15e9eaaf308944a85d9995ff 100644 (file)
@@ -416,7 +416,7 @@ enumerate_args (PyObject *iter,
                enum ext_lang_frame_args args_type,
                bool raw_frame_args,
                int print_args_field,
-               frame_info_ptr frame)
+               const frame_info_ptr &frame)
 {
   struct value_print_options opts;
 
@@ -548,7 +548,7 @@ enumerate_locals (PyObject *iter,
                  int indent,
                  enum ext_lang_frame_args args_type,
                  int print_args_field,
-                 frame_info_ptr frame)
+                 const frame_info_ptr &frame)
 {
   struct value_print_options opts;
 
@@ -636,7 +636,7 @@ static enum ext_lang_bt_status
 py_mi_print_variables (PyObject *filter, struct ui_out *out,
                       struct value_print_options *opts,
                       enum ext_lang_frame_args args_type,
-                      frame_info_ptr frame,
+                      const frame_info_ptr &frame,
                       bool raw_frame_args_p)
 {
   gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args"));
@@ -671,7 +671,7 @@ py_print_locals (PyObject *filter,
                 struct ui_out *out,
                 enum ext_lang_frame_args args_type,
                 int indent,
-                frame_info_ptr frame)
+                const frame_info_ptr &frame)
 {
   gdbpy_ref<> locals_iter (get_py_iter_from_func (filter, "frame_locals"));
   if (locals_iter == NULL)
@@ -697,7 +697,7 @@ py_print_args (PyObject *filter,
               struct ui_out *out,
               enum ext_lang_frame_args args_type,
               bool raw_frame_args,
-              frame_info_ptr frame)
+              const frame_info_ptr &frame)
 {
   gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args"));
   if (args_iter == NULL)
@@ -1082,7 +1082,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
    frame FRAME.  */
 
 static PyObject *
-bootstrap_python_frame_filters (frame_info_ptr frame,
+bootstrap_python_frame_filters (const frame_info_ptr &frame,
                                int frame_low, int frame_high)
 {
   gdbpy_ref<> frame_obj (frame_info_to_frame_object (frame));
@@ -1137,7 +1137,7 @@ bootstrap_python_frame_filters (frame_info_ptr frame,
 
 enum ext_lang_bt_status
 gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
-                         frame_info_ptr frame, frame_filter_flags flags,
+                         const frame_info_ptr &frame, frame_filter_flags flags,
                          enum ext_lang_frame_args args_type,
                          struct ui_out *out, int frame_low, int frame_high)
 {
index 834f7274d1e79d40816dcdd4641963608a39b0d8..caf6c1bdd53e4a9dace3d31aac330b15f6fc90b9 100644 (file)
@@ -159,7 +159,7 @@ python_on_memory_change (struct inferior *inferior, CORE_ADDR addr, ssize_t len,
    command). */
 
 static void
-python_on_register_change (frame_info_ptr frame, int regnum)
+python_on_register_change (const frame_info_ptr &frame, int regnum)
 {
   gdbpy_enter enter_py (current_inferior ()->arch ());
 
index 39677af24f56ddc4604a777f209c84986c91ed00..8a150852e0895d409eeefa1987057b41e2599156 100644 (file)
@@ -62,7 +62,7 @@ create_inferior_call_event_object (inferior_call_kind flag, ptid_t ptid,
    register number. */
 
 static gdbpy_ref<>
-create_register_changed_event_object (frame_info_ptr frame, 
+create_register_changed_event_object (const frame_info_ptr &frame,
                                      int regnum)
 {
   gdbpy_ref<> event = create_event_object (&register_changed_event_object_type);
@@ -151,7 +151,7 @@ emit_memory_changed_event (CORE_ADDR addr, ssize_t len)
    will create a new Python register changed event object. */
 
 int
-emit_register_changed_event (frame_info_ptr frame, int regnum)
+emit_register_changed_event (const frame_info_ptr &frame, int regnum)
 {
   if (evregpy_no_listeners_p (gdb_py_events.register_changed))
     return 0;
index c55b5aa85ec8ef2c538916c7e4316bf638d17926..56f925bc57f0ca699bc98da480112b8188f87576 100644 (file)
@@ -769,7 +769,7 @@ pending_framepy_level (PyObject *self, PyObject *args)
 /* frame_unwind.this_id method.  */
 
 static void
-pyuw_this_id (frame_info_ptr this_frame, void **cache_ptr,
+pyuw_this_id (const frame_info_ptr &this_frame, void **cache_ptr,
              struct frame_id *this_id)
 {
   *this_id = ((cached_frame_info *) *cache_ptr)->frame_id;
@@ -779,7 +779,7 @@ pyuw_this_id (frame_info_ptr this_frame, void **cache_ptr,
 /* frame_unwind.prev_register.  */
 
 static struct value *
-pyuw_prev_register (frame_info_ptr this_frame, void **cache_ptr,
+pyuw_prev_register (const frame_info_ptr &this_frame, void **cache_ptr,
                    int regnum)
 {
   PYUW_SCOPED_DEBUG_ENTER_EXIT;
@@ -802,7 +802,7 @@ pyuw_prev_register (frame_info_ptr this_frame, void **cache_ptr,
 /* Frame sniffer dispatch.  */
 
 static int
-pyuw_sniffer (const struct frame_unwind *self, frame_info_ptr this_frame,
+pyuw_sniffer (const struct frame_unwind *self, const frame_info_ptr &this_frame,
              void **cache_ptr)
 {
   PYUW_SCOPED_DEBUG_ENTER_EXIT;
index 7c05007cbab503c611a5266ade5e398f6e9bf530..c68aff5340e7b5295c700e559838df3d59d408b8 100644 (file)
@@ -384,7 +384,7 @@ extern enum ext_lang_rc gdbpy_apply_val_pretty_printer
    const struct language_defn *language);
 extern enum ext_lang_bt_status gdbpy_apply_frame_filter
   (const struct extension_language_defn *,
-   frame_info_ptr frame, frame_filter_flags flags,
+   const frame_info_ptr &frame, frame_filter_flags flags,
    enum ext_lang_frame_args args_type,
    struct ui_out *out, int frame_low, int frame_high);
 extern void gdbpy_preserve_values (const struct extension_language_defn *,
@@ -444,7 +444,7 @@ PyObject *block_to_block_object (const struct block *block,
                                 struct objfile *objfile);
 PyObject *value_to_value_object (struct value *v);
 PyObject *type_to_type_object (struct type *);
-PyObject *frame_info_to_frame_object (frame_info_ptr frame);
+PyObject *frame_info_to_frame_object (const frame_info_ptr &frame);
 PyObject *symtab_to_linetable_object (PyObject *symtab);
 gdbpy_ref<> pspace_to_pspace_object (struct program_space *);
 PyObject *pspy_get_printers (PyObject *, void *);
index 030547ad51fda85c951e79b2db6e16e95e9909ca..6350400c318ad583e06bfece2a7668cf16c52974 100644 (file)
@@ -1649,7 +1649,7 @@ bfcache_eq (const void *arg1, const void *arg2)
 /* Create a new btrace frame cache.  */
 
 static struct btrace_frame_cache *
-bfcache_new (frame_info_ptr frame)
+bfcache_new (const frame_info_ptr &frame)
 {
   struct btrace_frame_cache *cache;
   void **slot;
@@ -1667,7 +1667,7 @@ bfcache_new (frame_info_ptr frame)
 /* Extract the branch trace function from a branch trace frame.  */
 
 static const struct btrace_function *
-btrace_get_frame_function (frame_info_ptr frame)
+btrace_get_frame_function (const frame_info_ptr &frame)
 {
   const struct btrace_frame_cache *cache;
   struct btrace_frame_cache pattern;
@@ -1686,7 +1686,7 @@ btrace_get_frame_function (frame_info_ptr frame)
 /* Implement stop_reason method for record_btrace_frame_unwind.  */
 
 static enum unwind_stop_reason
-record_btrace_frame_unwind_stop_reason (frame_info_ptr this_frame,
+record_btrace_frame_unwind_stop_reason (const frame_info_ptr &this_frame,
                                        void **this_cache)
 {
   const struct btrace_frame_cache *cache;
@@ -1705,7 +1705,7 @@ record_btrace_frame_unwind_stop_reason (frame_info_ptr this_frame,
 /* Implement this_id method for record_btrace_frame_unwind.  */
 
 static void
-record_btrace_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+record_btrace_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                             struct frame_id *this_id)
 {
   const struct btrace_frame_cache *cache;
@@ -1735,7 +1735,7 @@ record_btrace_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 /* Implement prev_register method for record_btrace_frame_unwind.  */
 
 static struct value *
-record_btrace_frame_prev_register (frame_info_ptr this_frame,
+record_btrace_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_cache,
                                   int regnum)
 {
@@ -1781,7 +1781,7 @@ record_btrace_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 record_btrace_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_cache)
 {
   const struct btrace_function *bfun;
@@ -1836,7 +1836,7 @@ record_btrace_frame_sniffer (const struct frame_unwind *self,
 
 static int
 record_btrace_tailcall_frame_sniffer (const struct frame_unwind *self,
-                                     frame_info_ptr this_frame,
+                                     const frame_info_ptr &this_frame,
                                      void **this_cache)
 {
   const struct btrace_function *bfun, *callee;
index ca56a39cb71c2c1f7c44b6e915dd0f4b97965f90..205f7a950df5b1c4b1f1603d7d1b6b773b307cc5 100644 (file)
@@ -108,7 +108,7 @@ riscv_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch,
 
 static void
 riscv_fbsd_sigframe_init (const struct tramp_frame *self,
-                         frame_info_ptr this_frame,
+                         const frame_info_ptr &this_frame,
                          struct trad_frame_cache *this_cache,
                          CORE_ADDR func)
 {
index 9dfbe789a699686776ef3cb8e2f8d4664e1fd7c1..0267dc65e58e2dd8f05deb699b3763fe1c96b5ac 100644 (file)
@@ -86,7 +86,7 @@ riscv_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
 /* Signal trampoline support.  */
 
 static void riscv_linux_sigframe_init (const struct tramp_frame *self,
-                                      frame_info_ptr this_frame,
+                                      const frame_info_ptr &this_frame,
                                       struct trad_frame_cache *this_cache,
                                       CORE_ADDR func);
 
@@ -125,7 +125,7 @@ static const struct tramp_frame riscv_linux_sigframe = {
 
 static void
 riscv_linux_sigframe_init (const struct tramp_frame *self,
-                          frame_info_ptr this_frame,
+                          const frame_info_ptr &this_frame,
                           struct trad_frame_cache *this_cache,
                           CORE_ADDR func)
 {
@@ -163,7 +163,7 @@ riscv_linux_sigframe_init (const struct tramp_frame *self,
    instruction to be executed.  */
 
 static CORE_ADDR
-riscv_linux_syscall_next_pc (frame_info_ptr frame)
+riscv_linux_syscall_next_pc (const frame_info_ptr &frame)
 {
   const CORE_ADDR pc = get_frame_pc (frame);
   const ULONGEST a7 = get_frame_register_unsigned (frame, RISCV_A7_REGNUM);
index 9a7cfa35afd91df604772e691836f74f45b1ccec..68ef3233e8d9a0e12d446449b56b8185ccc12eb1 100644 (file)
@@ -165,7 +165,7 @@ static const reggroup *csr_reggroup = nullptr;
 /* Callback function for user_reg_add.  */
 
 static struct value *
-value_of_riscv_user_reg (frame_info_ptr frame, const void *baton)
+value_of_riscv_user_reg (const frame_info_ptr &frame, const void *baton)
 {
   const int *reg_p = (const int *) baton;
   return value_of_register (*reg_p, get_next_frame_sentinel_okay (frame));
@@ -1135,7 +1135,7 @@ riscv_register_type (struct gdbarch *gdbarch, int regnum)
 static void
 riscv_print_one_register_info (struct gdbarch *gdbarch,
                               struct ui_file *file,
-                              frame_info_ptr frame,
+                              const frame_info_ptr &frame,
                               int regnum)
 {
   const char *name = gdbarch_register_name (gdbarch, regnum);
@@ -1504,7 +1504,7 @@ riscv_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 static void
 riscv_print_registers_info (struct gdbarch *gdbarch,
                            struct ui_file *file,
-                           frame_info_ptr frame,
+                           const frame_info_ptr &frame,
                            int regnum, int print_all)
 {
   if (regnum != -1)
@@ -3806,7 +3806,7 @@ riscv_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
    unwinder.  */
 
 static struct riscv_unwind_cache *
-riscv_frame_cache (frame_info_ptr this_frame, void **this_cache)
+riscv_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   CORE_ADDR pc, start_addr;
   struct riscv_unwind_cache *cache;
@@ -3866,7 +3866,7 @@ riscv_frame_cache (frame_info_ptr this_frame, void **this_cache)
 /* Implement the this_id callback for RiscV frame unwinder.  */
 
 static void
-riscv_frame_this_id (frame_info_ptr this_frame,
+riscv_frame_this_id (const frame_info_ptr &this_frame,
                     void **prologue_cache,
                     struct frame_id *this_id)
 {
@@ -3887,7 +3887,7 @@ riscv_frame_this_id (frame_info_ptr this_frame,
 /* Implement the prev_register callback for RiscV frame unwinder.  */
 
 static struct value *
-riscv_frame_prev_register (frame_info_ptr this_frame,
+riscv_frame_prev_register (const frame_info_ptr &this_frame,
                           void **prologue_cache,
                           int regnum)
 {
index ea6b25938ec197ba48e1c0e559b297618c0f0591..4bdc2e7a3d5dddae19aae8d3bdc56d56717632d0 100644 (file)
@@ -112,7 +112,7 @@ struct riscv_gdbarch_tdep : gdbarch_tdep_base
 
   /* Return the expected next PC assuming FRAME is stopped at a syscall
      instruction.  */
-  CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr;
+  CORE_ADDR (*syscall_next_pc) (const frame_info_ptr &frame) = nullptr;
 };
 
 
index aecda0ed2cc19999ea829b04fa7dbaa4b0fd0f80..1e439f3635644efb65f37ad882799a0ab4b3d53e 100644 (file)
@@ -1079,7 +1079,7 @@ rl78_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* Implement the "unwind_pc" gdbarch method.  */
 
 static CORE_ADDR
-rl78_unwind_pc (struct gdbarch *arch, frame_info_ptr next_frame)
+rl78_unwind_pc (struct gdbarch *arch, const frame_info_ptr &next_frame)
 {
   return rl78_addr_bits_remove
           (arch, frame_unwind_register_unsigned (next_frame,
@@ -1092,7 +1092,7 @@ rl78_unwind_pc (struct gdbarch *arch, frame_info_ptr next_frame)
    return that struct as the value of this function.  */
 
 static struct rl78_prologue *
-rl78_analyze_frame_prologue (frame_info_ptr this_frame,
+rl78_analyze_frame_prologue (const frame_info_ptr &this_frame,
                           void **this_prologue_cache)
 {
   if (!*this_prologue_cache)
@@ -1119,7 +1119,7 @@ rl78_analyze_frame_prologue (frame_info_ptr this_frame,
 /* Given a frame and a prologue cache, return this frame's base.  */
 
 static CORE_ADDR
-rl78_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
+rl78_frame_base (const frame_info_ptr &this_frame, void **this_prologue_cache)
 {
   struct rl78_prologue *p
     = rl78_analyze_frame_prologue (this_frame, this_prologue_cache);
@@ -1131,7 +1131,7 @@ rl78_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
 /* Implement the "frame_this_id" method for unwinding frames.  */
 
 static void
-rl78_this_id (frame_info_ptr this_frame,
+rl78_this_id (const frame_info_ptr &this_frame,
              void **this_prologue_cache, struct frame_id *this_id)
 {
   *this_id = frame_id_build (rl78_frame_base (this_frame,
@@ -1142,7 +1142,7 @@ rl78_this_id (frame_info_ptr this_frame,
 /* Implement the "frame_prev_register" method for unwinding frames.  */
 
 static struct value *
-rl78_prev_register (frame_info_ptr this_frame,
+rl78_prev_register (const frame_info_ptr &this_frame,
                    void **this_prologue_cache, int regnum)
 {
   struct rl78_prologue *p
@@ -1316,7 +1316,7 @@ rl78_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 /* Implement the "dummy_id" gdbarch method.  */
 
 static struct frame_id
-rl78_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+rl78_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   return
     frame_id_build (rl78_make_data_address
index 6fdbf63d6a86cb96fcb832f2aa9392fa565650f4..db76af6984b9e57c4bcd3da6162ea6bad524b462 100644 (file)
@@ -240,7 +240,7 @@ static const struct regset rs6000_aix_vsxregset = {
 };
 
 static struct trad_frame_cache *
-aix_sighandle_frame_cache (frame_info_ptr this_frame,
+aix_sighandle_frame_cache (const frame_info_ptr &this_frame,
                           void **this_cache)
 {
   LONGEST backchain;
@@ -296,7 +296,7 @@ aix_sighandle_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-aix_sighandle_frame_this_id (frame_info_ptr this_frame,
+aix_sighandle_frame_this_id (const frame_info_ptr &this_frame,
                             void **this_prologue_cache,
                             struct frame_id *this_id)
 {
@@ -306,7 +306,7 @@ aix_sighandle_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-aix_sighandle_frame_prev_register (frame_info_ptr this_frame,
+aix_sighandle_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_prologue_cache, int regnum)
 {
   struct trad_frame_cache *this_trad_cache
@@ -316,7 +316,7 @@ aix_sighandle_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 aix_sighandle_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_prologue_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
index f61e0843c1c79aab8bf3bf01ec26043e1db4e66a..c8450345be271a1d94cf0c6e8f141952ce749c45 100644 (file)
@@ -743,7 +743,7 @@ insn_changes_sp_or_jumps (unsigned long insn)
           limit for the size of an epilogue.  */
 
 static int
-rs6000_in_function_epilogue_frame_p (frame_info_ptr curfrm,
+rs6000_in_function_epilogue_frame_p (const frame_info_ptr &curfrm,
                                     struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
@@ -816,7 +816,7 @@ rs6000_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
 /* Get the ith function argument for the current function.  */
 static CORE_ADDR
-rs6000_fetch_pointer_argument (frame_info_ptr frame, int argi, 
+rs6000_fetch_pointer_argument (const frame_info_ptr &frame, int argi,
                               struct type *type)
 {
   return get_frame_register_unsigned (frame, 3 + argi);
@@ -2316,7 +2316,7 @@ rs6000_in_solib_return_trampoline (struct gdbarch *gdbarch,
    code that should be skipped.  */
 
 static CORE_ADDR
-rs6000_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+rs6000_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
@@ -2698,7 +2698,7 @@ ieee_128_float_regnum_adjust (struct gdbarch *gdbarch, struct type *type,
 }
 
 static int
-rs6000_register_to_value (frame_info_ptr frame,
+rs6000_register_to_value (const frame_info_ptr &frame,
                          int regnum,
                          struct type *type,
                          gdb_byte *to,
@@ -2727,7 +2727,7 @@ rs6000_register_to_value (frame_info_ptr frame,
 }
 
 static void
-rs6000_value_to_register (frame_info_ptr frame,
+rs6000_value_to_register (const frame_info_ptr &frame,
                          int regnum,
                          struct type *type,
                          const gdb_byte *from)
@@ -3617,7 +3617,7 @@ struct rs6000_frame_cache
 };
 
 static struct rs6000_frame_cache *
-rs6000_frame_cache (frame_info_ptr this_frame, void **this_cache)
+rs6000_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct rs6000_frame_cache *cache;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -3810,7 +3810,7 @@ rs6000_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-rs6000_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+rs6000_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                      struct frame_id *this_id)
 {
   struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame,
@@ -3830,7 +3830,7 @@ rs6000_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-rs6000_frame_prev_register (frame_info_ptr this_frame,
+rs6000_frame_prev_register (const frame_info_ptr &this_frame,
                            void **this_cache, int regnum)
 {
   struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame,
@@ -3853,7 +3853,7 @@ static const struct frame_unwind rs6000_frame_unwind =
    SP is restored and prev-PC is stored in LR.  */
 
 static struct rs6000_frame_cache *
-rs6000_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
+rs6000_epilogue_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct rs6000_frame_cache *cache;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -3934,7 +3934,7 @@ rs6000_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache)
    Return the frame ID of an epilogue frame.  */
 
 static void
-rs6000_epilogue_frame_this_id (frame_info_ptr this_frame,
+rs6000_epilogue_frame_this_id (const frame_info_ptr &this_frame,
                               void **this_cache, struct frame_id *this_id)
 {
   CORE_ADDR pc;
@@ -3952,7 +3952,7 @@ rs6000_epilogue_frame_this_id (frame_info_ptr this_frame,
    Return the register value of REGNUM in previous frame.  */
 
 static struct value *
-rs6000_epilogue_frame_prev_register (frame_info_ptr this_frame,
+rs6000_epilogue_frame_prev_register (const frame_info_ptr &this_frame,
                                     void **this_cache, int regnum)
 {
   struct rs6000_frame_cache *info =
@@ -3965,7 +3965,7 @@ rs6000_epilogue_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 rs6000_epilogue_frame_sniffer (const struct frame_unwind *self,
-                              frame_info_ptr this_frame,
+                              const frame_info_ptr &this_frame,
                               void **this_prologue_cache)
 {
   if (frame_relative_level (this_frame) == 0)
@@ -3991,7 +3991,7 @@ static const struct frame_unwind rs6000_epilogue_frame_unwind =
 \f
 
 static CORE_ADDR
-rs6000_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+rs6000_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame,
                                                        this_cache);
@@ -4006,7 +4006,7 @@ static const struct frame_base rs6000_frame_base = {
 };
 
 static const struct frame_base *
-rs6000_frame_base_sniffer (frame_info_ptr this_frame)
+rs6000_frame_base_sniffer (const frame_info_ptr &this_frame)
 {
   return &rs6000_frame_base;
 }
@@ -4017,7 +4017,7 @@ rs6000_frame_base_sniffer (frame_info_ptr this_frame)
 static void
 ppc_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)
 {
   ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
 
@@ -8647,7 +8647,7 @@ show_powerpc_exact_watchpoints (struct ui_file *file, int from_tty,
 /* Read a PPC instruction from memory.  */
 
 static unsigned int
-read_insn (frame_info_ptr frame, CORE_ADDR pc)
+read_insn (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -8669,7 +8669,7 @@ read_insn (frame_info_ptr frame, CORE_ADDR pc)
    necessarily the i'th instruction in memory.  */
 
 int
-ppc_insns_match_pattern (frame_info_ptr frame, CORE_ADDR pc,
+ppc_insns_match_pattern (const frame_info_ptr &frame, CORE_ADDR pc,
                         const struct ppc_insn_pattern *pattern,
                         unsigned int *insns)
 {
index 5ea01e79bb5b8136172abe75e9d47d566e867d2f..53ad5d5c92b2fd682974e394dc10f7bdba9bc06b 100644 (file)
@@ -383,7 +383,7 @@ rx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
    return that struct as the value of this function.  */
 
 static struct rx_prologue *
-rx_analyze_frame_prologue (frame_info_ptr this_frame,
+rx_analyze_frame_prologue (const frame_info_ptr &this_frame,
                           enum rx_frame_type frame_type,
                           void **this_prologue_cache)
 {
@@ -412,7 +412,7 @@ rx_analyze_frame_prologue (frame_info_ptr this_frame,
    instruction.  */
 
 static enum rx_frame_type
-rx_frame_type (frame_info_ptr this_frame, void **this_cache)
+rx_frame_type (const frame_info_ptr &this_frame, void **this_cache)
 {
   const char *name;
   CORE_ADDR pc, start_pc, lim_pc;
@@ -466,7 +466,7 @@ rx_frame_type (frame_info_ptr this_frame, void **this_cache)
    base.  */
 
 static CORE_ADDR
-rx_frame_base (frame_info_ptr this_frame, void **this_cache)
+rx_frame_base (const frame_info_ptr &this_frame, void **this_cache)
 {
   enum rx_frame_type frame_type = rx_frame_type (this_frame, this_cache);
   struct rx_prologue *p
@@ -493,7 +493,7 @@ rx_frame_base (frame_info_ptr this_frame, void **this_cache)
 /* Implement the "frame_this_id" method for unwinding frames.  */
 
 static void
-rx_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+rx_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                  struct frame_id *this_id)
 {
   *this_id = frame_id_build (rx_frame_base (this_frame, this_cache),
@@ -503,7 +503,7 @@ rx_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 /* Implement the "frame_prev_register" method for unwinding frames.  */
 
 static struct value *
-rx_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+rx_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                        int regnum)
 {
   enum rx_frame_type frame_type = rx_frame_type (this_frame, this_cache);
@@ -577,7 +577,7 @@ exception_frame_p (enum rx_frame_type frame_type)
 
 static int
 rx_frame_sniffer_common (const struct frame_unwind *self,
-                        frame_info_ptr this_frame,
+                        const frame_info_ptr &this_frame,
                         void **this_cache,
                         int (*sniff_p)(enum rx_frame_type) )
 {
@@ -610,7 +610,7 @@ rx_frame_sniffer_common (const struct frame_unwind *self,
 
 static int
 rx_frame_sniffer (const struct frame_unwind *self,
-                 frame_info_ptr this_frame,
+                 const frame_info_ptr &this_frame,
                  void **this_cache)
 {
   return rx_frame_sniffer_common (self, this_frame, this_cache,
@@ -621,7 +621,7 @@ rx_frame_sniffer (const struct frame_unwind *self,
 
 static int
 rx_exception_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_cache)
 {
   return rx_frame_sniffer_common (self, this_frame, this_cache,
index 4b2ed85c1670a85cf65561c008bf3404bb0ef52a..60cbc26afffdcc7a9bd708ec2322422e8dfa9a64 100644 (file)
@@ -241,7 +241,7 @@ push_pull_get_stack_adjustment (int n_operands,
 /* Initialize a prologue cache.  */
 
 static struct trad_frame_cache *
-s12z_frame_cache (frame_info_ptr this_frame, void **prologue_cache)
+s12z_frame_cache (const frame_info_ptr &this_frame, void **prologue_cache)
 {
   struct trad_frame_cache *info;
 
@@ -420,7 +420,7 @@ s12z_frame_cache (frame_info_ptr this_frame, void **prologue_cache)
 
 /* Implement the this_id function for the stub unwinder.  */
 static void
-s12z_frame_this_id (frame_info_ptr this_frame,
+s12z_frame_this_id (const frame_info_ptr &this_frame,
                    void **prologue_cache, struct frame_id *this_id)
 {
   struct trad_frame_cache *info = s12z_frame_cache (this_frame,
@@ -432,7 +432,7 @@ s12z_frame_this_id (frame_info_ptr this_frame,
 
 /* Implement the prev_register function for the stub unwinder.  */
 static struct value *
-s12z_frame_prev_register (frame_info_ptr this_frame,
+s12z_frame_prev_register (const frame_info_ptr &this_frame,
                          void **prologue_cache, int regnum)
 {
   struct trad_frame_cache *info = s12z_frame_cache (this_frame,
@@ -491,7 +491,7 @@ static const char ccw_bits[] =
 static void
 s12z_print_ccw_info (struct gdbarch *gdbarch,
                     struct ui_file *file,
-                    frame_info_ptr frame,
+                    const frame_info_ptr &frame,
                     int reg)
 {
   value *v = value_of_register (reg, get_next_frame_sentinel_okay (frame));
@@ -524,7 +524,7 @@ s12z_print_ccw_info (struct gdbarch *gdbarch,
 static void
 s12z_print_registers_info (struct gdbarch *gdbarch,
                            struct ui_file *file,
-                           frame_info_ptr frame,
+                           const frame_info_ptr &frame,
                            int regnum, int print_all)
 {
   const int numregs = (gdbarch_num_regs (gdbarch)
index 4f73d5a4c017429bd9c974dd661a38a0ef05737c..945b3c7cee7297370d7476df4d667feaa19072f5 100644 (file)
@@ -387,7 +387,7 @@ struct s390_sigtramp_unwind_cache {
    s390_sigtramp_frame_unwind.  */
 
 static struct s390_sigtramp_unwind_cache *
-s390_sigtramp_frame_unwind_cache (frame_info_ptr this_frame,
+s390_sigtramp_frame_unwind_cache (const frame_info_ptr &this_frame,
                                  void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -497,7 +497,7 @@ s390_sigtramp_frame_unwind_cache (frame_info_ptr this_frame,
 /* Implement this_id frame_unwind method for s390_sigtramp_frame_unwind.  */
 
 static void
-s390_sigtramp_frame_this_id (frame_info_ptr this_frame,
+s390_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                             void **this_prologue_cache,
                             struct frame_id *this_id)
 {
@@ -509,7 +509,7 @@ s390_sigtramp_frame_this_id (frame_info_ptr this_frame,
 /* Implement prev_register frame_unwind method for sigtramp frames.  */
 
 static struct value *
-s390_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+s390_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                   void **this_prologue_cache, int regnum)
 {
   struct s390_sigtramp_unwind_cache *info
@@ -521,7 +521,7 @@ s390_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 s390_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             void **this_prologue_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
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);
index 58a7d08c9b0bafbca5bf94a3319578e062090256..10f775f468f84bbc3bc84c0710aa938477f4b663 100644 (file)
@@ -316,7 +316,7 @@ enum
 /* Frame unwinding.  */
 
 extern struct value *s390_trad_frame_prev_register
-    (frame_info_ptr this_frame, struct trad_frame_saved_reg saved_regs[],
+    (const frame_info_ptr &this_frame, struct trad_frame_saved_reg saved_regs[],
      int regnum);
 
 extern const struct target_desc *tdesc_s390_linux32;
index 6b6cbeb3a3f27636cbcafbdf71cb992e3743b018..ca7c28952f3618a28f39d40db7909db95a92535c 100644 (file)
@@ -42,7 +42,7 @@ sentinel_frame_cache (struct regcache *regcache)
 /* Here the register value is taken direct from the register cache.  */
 
 static struct value *
-sentinel_frame_prev_register (frame_info_ptr this_frame,
+sentinel_frame_prev_register (const frame_info_ptr &this_frame,
                              void **this_prologue_cache,
                              int regnum)
 {
@@ -59,7 +59,7 @@ sentinel_frame_prev_register (frame_info_ptr this_frame,
 }
 
 static void
-sentinel_frame_this_id (frame_info_ptr this_frame,
+sentinel_frame_this_id (const frame_info_ptr &this_frame,
                        void **this_prologue_cache,
                        struct frame_id *this_id)
 {
@@ -70,7 +70,7 @@ sentinel_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct gdbarch *
-sentinel_frame_prev_arch (frame_info_ptr this_frame,
+sentinel_frame_prev_arch (const frame_info_ptr &this_frame,
                          void **this_prologue_cache)
 {
   struct frame_unwind_cache *cache
index 8fee028bb42ec4e635e4abe3253e659200a0b026..c78d363400ad0518c2b4ad86745246935f81c0c7 100644 (file)
@@ -77,7 +77,7 @@ static const struct sh_corefile_regmap fpregs_table[] =
 /* SH signal handler frame support.  */
 
 static void
-sh_linux_sigtramp_cache (frame_info_ptr this_frame,
+sh_linux_sigtramp_cache (const frame_info_ptr &this_frame,
                         struct trad_frame_cache *this_cache,
                         CORE_ADDR func, int regs_offset)
 {
@@ -114,7 +114,7 @@ sh_linux_sigtramp_cache (frame_info_ptr this_frame,
 
 static void
 sh_linux_sigreturn_init (const struct tramp_frame *self,
-                        frame_info_ptr this_frame,
+                        const frame_info_ptr &this_frame,
                         struct trad_frame_cache *this_cache,
                         CORE_ADDR func)
 {
@@ -125,7 +125,7 @@ sh_linux_sigreturn_init (const struct tramp_frame *self,
 
 static void
 sh_linux_rt_sigreturn_init (const struct tramp_frame *self,
-                           frame_info_ptr this_frame,
+                           const frame_info_ptr &this_frame,
                            struct trad_frame_cache *this_cache,
                            CORE_ADDR func)
 {
index 3a4ff96428a6cf81d261b19d255743098408370a..16e513eb405311ab3ac78d27a5657996f0252121 100644 (file)
@@ -1755,7 +1755,7 @@ sh_sh2a_register_sim_regno (struct gdbarch *gdbarch, int nr)
 static void
 sh_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)
 {
   /* Mark the PC as the destination for the return address.  */
   if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -1825,7 +1825,7 @@ sh_alloc_frame_cache (void)
 }
 
 static struct sh_frame_cache *
-sh_frame_cache (frame_info_ptr this_frame, void **this_cache)
+sh_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct sh_frame_cache *cache;
@@ -1892,7 +1892,7 @@ sh_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static struct value *
-sh_frame_prev_register (frame_info_ptr this_frame,
+sh_frame_prev_register (const frame_info_ptr &this_frame,
                        void **this_cache, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1917,7 +1917,7 @@ sh_frame_prev_register (frame_info_ptr this_frame,
 }
 
 static void
-sh_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+sh_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                  struct frame_id *this_id)
 {
   struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
@@ -1940,7 +1940,7 @@ static const struct frame_unwind sh_frame_unwind = {
 };
 
 static CORE_ADDR
-sh_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+sh_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
 
@@ -1955,7 +1955,7 @@ static const struct frame_base sh_frame_base = {
 };
 
 static struct sh_frame_cache *
-sh_make_stub_cache (frame_info_ptr this_frame)
+sh_make_stub_cache (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct sh_frame_cache *cache;
@@ -1969,7 +1969,7 @@ sh_make_stub_cache (frame_info_ptr this_frame)
 }
 
 static void
-sh_stub_this_id (frame_info_ptr this_frame, void **this_cache,
+sh_stub_this_id (const frame_info_ptr &this_frame, void **this_cache,
                 struct frame_id *this_id)
 {
   struct sh_frame_cache *cache;
@@ -1983,7 +1983,7 @@ sh_stub_this_id (frame_info_ptr this_frame, void **this_cache,
 
 static int
 sh_stub_unwind_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;
index de6794635a579d5ff51272bdf43488fa71be21ca..4ee2d0ac3460235373717f615326db42aa901f0a 100644 (file)
@@ -52,7 +52,7 @@ sol2_pc_in_sigtramp (CORE_ADDR pc, const char *name)
 /* Return whether THIS_FRAME corresponds to a Solaris sigtramp routine.  */
 
 int
-sol2_sigtramp_p (frame_info_ptr this_frame)
+sol2_sigtramp_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
   const char *name;
index d669b484d0dafeb26d78d603f2fb6b439abbc6a3..a189666f05ee5f6f7a4f1568a2ea94db5ee4f2e6 100644 (file)
@@ -22,7 +22,7 @@
 
 struct gdbarch;
 
-int sol2_sigtramp_p (frame_info_ptr this_frame);
+int sol2_sigtramp_p (const frame_info_ptr &this_frame);
 
 void sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
 
index 430522b970299bb33d2f46a86ec658fa6432781c..1590cbdc4f054dee83e6a227bf1e0da0a9456a09 100644 (file)
@@ -42,7 +42,7 @@
 /* Signal trampoline support.  */
 
 static void sparc32_linux_sigframe_init (const struct tramp_frame *self,
-                                        frame_info_ptr this_frame,
+                                        const frame_info_ptr &this_frame,
                                         struct trad_frame_cache *this_cache,
                                         CORE_ADDR func);
 
@@ -117,7 +117,7 @@ enum
 
 static void
 sparc32_linux_sigframe_init (const struct tramp_frame *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             struct trad_frame_cache *this_cache,
                             CORE_ADDR func)
 {
@@ -159,7 +159,7 @@ sparc32_linux_sigframe_init (const struct tramp_frame *self,
    address.  */
 
 static CORE_ADDR
-sparc32_linux_step_trap (frame_info_ptr frame, unsigned long insn)
+sparc32_linux_step_trap (const frame_info_ptr &frame, unsigned long insn)
 {
   if (insn == 0x91d02010)
     {
index 486381f497b4abad011e1bc8cd869790f628eed2..d2b1a4bfd1403cea406500f0c6fe04b60b3a8aac 100644 (file)
@@ -95,7 +95,7 @@ sparc32nbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
 }
 
 trad_frame_saved_reg *
-sparc32nbsd_sigcontext_saved_regs (frame_info_ptr this_frame)
+sparc32nbsd_sigcontext_saved_regs (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   trad_frame_saved_reg *saved_regs;
@@ -180,7 +180,7 @@ sparc32nbsd_sigcontext_saved_regs (frame_info_ptr this_frame)
 }
 
 static struct sparc_frame_cache *
-sparc32nbsd_sigcontext_frame_cache (frame_info_ptr this_frame,
+sparc32nbsd_sigcontext_frame_cache (const frame_info_ptr &this_frame,
                                    void **this_cache)
 {
   struct sparc_frame_cache *cache;
@@ -211,7 +211,7 @@ sparc32nbsd_sigcontext_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-sparc32nbsd_sigcontext_frame_this_id (frame_info_ptr this_frame,
+sparc32nbsd_sigcontext_frame_this_id (const frame_info_ptr &this_frame,
                                      void **this_cache,
                                      struct frame_id *this_id)
 {
@@ -222,7 +222,7 @@ sparc32nbsd_sigcontext_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-sparc32nbsd_sigcontext_frame_prev_register (frame_info_ptr this_frame,
+sparc32nbsd_sigcontext_frame_prev_register (const frame_info_ptr &this_frame,
                                            void **this_cache, int regnum)
 {
   struct sparc_frame_cache *cache =
@@ -233,7 +233,7 @@ sparc32nbsd_sigcontext_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc32nbsd_sigcontext_frame_sniffer (const struct frame_unwind *self,
-                                     frame_info_ptr this_frame,
+                                     const frame_info_ptr &this_frame,
                                      void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -264,7 +264,7 @@ static const struct frame_unwind sparc32nbsd_sigcontext_frame_unwind =
    address.  */
 
 CORE_ADDR
-sparcnbsd_step_trap (frame_info_ptr frame, unsigned long insn)
+sparcnbsd_step_trap (const frame_info_ptr &frame, unsigned long insn)
 {
   if ((X_I (insn) == 0 && X_RS1 (insn) == 0 && X_RS2 (insn) == 0)
       || (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
index 2155a30e20b16bcea363859d89d91ed91a8685c0..8cdbc8aae6e70436fc7a04cf42c98dad44261e3c 100644 (file)
@@ -68,7 +68,7 @@ sparc32obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
 }
 
 static struct sparc_frame_cache *
-sparc32obsd_sigtramp_frame_cache (frame_info_ptr this_frame,
+sparc32obsd_sigtramp_frame_cache (const frame_info_ptr &this_frame,
                                  void **this_cache)
 {
   struct sparc_frame_cache *cache;
@@ -100,7 +100,7 @@ sparc32obsd_sigtramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-sparc32obsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
+sparc32obsd_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                    void **this_cache,
                                    struct frame_id *this_id)
 {
@@ -111,7 +111,7 @@ sparc32obsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-sparc32obsd_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+sparc32obsd_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                          void **this_cache, int regnum)
 {
   struct sparc_frame_cache *cache =
@@ -122,7 +122,7 @@ sparc32obsd_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc32obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                   frame_info_ptr this_frame,
+                                   const frame_info_ptr &this_frame,
                                    void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
index a0a6c4cd71772592121e1c5248bd2b00b1db9c67..525784401038eb70bdf0c2b6649523c3f74880a9 100644 (file)
@@ -100,7 +100,7 @@ static const struct regset sparc32_sol2_fpregset =
 \f
 
 static struct sparc_frame_cache *
-sparc32_sol2_sigtramp_frame_cache (frame_info_ptr this_frame,
+sparc32_sol2_sigtramp_frame_cache (const frame_info_ptr &this_frame,
                                   void **this_cache)
 {
   struct sparc_frame_cache *cache;
@@ -151,7 +151,7 @@ sparc32_sol2_sigtramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-sparc32_sol2_sigtramp_frame_this_id (frame_info_ptr this_frame,
+sparc32_sol2_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                     void **this_cache,
                                     struct frame_id *this_id)
 {
@@ -162,7 +162,7 @@ sparc32_sol2_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-sparc32_sol2_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+sparc32_sol2_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                           void **this_cache,
                                           int regnum)
 {
@@ -174,7 +174,7 @@ sparc32_sol2_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc32_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                    frame_info_ptr this_frame,
+                                    const frame_info_ptr &this_frame,
                                     void **this_cache)
 {
   return sol2_sigtramp_p (this_frame);
index f84e168ab9fd4adcfb68b701a34298f3af5b16ea..5eec3615f5365507ebc97feffa678e89d87b8b57 100644 (file)
@@ -1182,7 +1182,7 @@ sparc32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 /* Normal frames.  */
 
 struct sparc_frame_cache *
-sparc_frame_cache (frame_info_ptr this_frame, void **this_cache)
+sparc_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct sparc_frame_cache *cache;
 
@@ -1239,7 +1239,7 @@ sparc32_struct_return_from_sym (struct symbol *sym)
 }
 
 struct sparc_frame_cache *
-sparc32_frame_cache (frame_info_ptr this_frame, void **this_cache)
+sparc32_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct sparc_frame_cache *cache;
   struct symbol *sym;
@@ -1275,7 +1275,7 @@ sparc32_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-sparc32_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+sparc32_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                       struct frame_id *this_id)
 {
   struct sparc_frame_cache *cache =
@@ -1289,7 +1289,7 @@ sparc32_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-sparc32_frame_prev_register (frame_info_ptr this_frame,
+sparc32_frame_prev_register (const frame_info_ptr &this_frame,
                             void **this_cache, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1359,7 +1359,7 @@ static const struct frame_unwind sparc32_frame_unwind =
 \f
 
 static CORE_ADDR
-sparc32_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+sparc32_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct sparc_frame_cache *cache =
     sparc32_frame_cache (this_frame, this_cache);
@@ -1376,7 +1376,7 @@ static const struct frame_base sparc32_frame_base =
 };
 
 static struct frame_id
-sparc_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+sparc_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR sp;
 
@@ -1549,7 +1549,7 @@ sparc32_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
 }
 
 static int
-sparc32_dwarf2_struct_return_p (frame_info_ptr this_frame)
+sparc32_dwarf2_struct_return_p (const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
   struct symbol *sym = find_pc_function (pc);
@@ -1562,7 +1562,7 @@ sparc32_dwarf2_struct_return_p (frame_info_ptr this_frame)
 static void
 sparc32_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)
 {
   int off;
 
@@ -1721,7 +1721,7 @@ sparc_analyze_control_transfer (struct regcache *regcache,
 }
 
 static CORE_ADDR
-sparc_step_trap (frame_info_ptr frame, unsigned long insn)
+sparc_step_trap (const frame_info_ptr &frame, unsigned long insn)
 {
   return 0;
 }
index c4ea4ff9d5589384cc872a45a2d17a4f375943aa..2d8c50768be040dd01feb5e76d6ba0907e0d09bb 100644 (file)
@@ -85,7 +85,7 @@ struct sparc_gdbarch_tdep : gdbarch_tdep_base
   size_t plt_entry_size = 0;
 
   /* Alternative location for trap return.  Used for single-stepping.  */
-  CORE_ADDR (*step_trap) (frame_info_ptr frame, unsigned long insn)
+  CORE_ADDR (*step_trap) (const frame_info_ptr &frame, unsigned long insn)
     = nullptr;
 
   /* ISA-specific data types.  */
@@ -207,10 +207,10 @@ extern CORE_ADDR sparc_analyze_prologue (struct gdbarch *gdbarch,
                                         struct sparc_frame_cache *cache);
 
 extern struct sparc_frame_cache *
-  sparc_frame_cache (frame_info_ptr this_frame, void **this_cache);
+  sparc_frame_cache (const frame_info_ptr &this_frame, void **this_cache);
 
 extern struct sparc_frame_cache *
-  sparc32_frame_cache (frame_info_ptr this_frame, void **this_cache);
+  sparc32_frame_cache (const frame_info_ptr &this_frame, void **this_cache);
 
 extern int
   sparc_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc);
@@ -255,13 +255,13 @@ extern const struct sparc_gregmap sparc32nbsd_gregmap;
 
 /* Return the address of a system call's alternative return
    address.  */
-extern CORE_ADDR sparcnbsd_step_trap (frame_info_ptr frame,
+extern CORE_ADDR sparcnbsd_step_trap (const frame_info_ptr &frame,
                                      unsigned long insn);
 
 extern void sparc32nbsd_init_abi (struct gdbarch_info info,
                                  struct gdbarch *gdbarch);
 
 extern struct trad_frame_saved_reg *
-  sparc32nbsd_sigcontext_saved_regs (frame_info_ptr next_frame);
+  sparc32nbsd_sigcontext_saved_regs (const frame_info_ptr &next_frame);
 
 #endif /* sparc-tdep.h */
index 8c97ce87209f3816ef83c3cb449c2d1af4dd3d9e..c992c8c8f6fb7c969a364c3d0153e84aba90c8b8 100644 (file)
@@ -89,7 +89,7 @@ sparc64fbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
 }
 
 static struct sparc_frame_cache *
-sparc64fbsd_sigtramp_frame_cache (frame_info_ptr this_frame,
+sparc64fbsd_sigtramp_frame_cache (const frame_info_ptr &this_frame,
                                   void **this_cache)
 {
   struct sparc_frame_cache *cache;
@@ -162,7 +162,7 @@ sparc64fbsd_sigtramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-sparc64fbsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
+sparc64fbsd_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                    void **this_cache,
                                    struct frame_id *this_id)
 {
@@ -173,7 +173,7 @@ sparc64fbsd_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-sparc64fbsd_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+sparc64fbsd_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                          void **this_cache, int regnum)
 {
   struct sparc_frame_cache *cache =
@@ -184,7 +184,7 @@ sparc64fbsd_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc64fbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                   frame_info_ptr this_frame,
+                                   const frame_info_ptr &this_frame,
                                    void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
index ba9d694776f3bb9f9c1f1c6e5bf78d022c7beb6f..33da5321d81a57bfb895cea2fb758d01e284cc16 100644 (file)
@@ -52,7 +52,7 @@
 /* Signal trampoline support.  */
 
 static void sparc64_linux_sigframe_init (const struct tramp_frame *self,
-                                        frame_info_ptr this_frame,
+                                        const frame_info_ptr &this_frame,
                                         struct trad_frame_cache *this_cache,
                                         CORE_ADDR func);
 
@@ -73,7 +73,7 @@ static const struct tramp_frame sparc64_linux_rt_sigframe =
 
 static void
 sparc64_linux_sigframe_init (const struct tramp_frame *self,
-                            frame_info_ptr this_frame,
+                            const frame_info_ptr &this_frame,
                             struct trad_frame_cache *this_cache,
                             CORE_ADDR func)
 {
@@ -176,7 +176,7 @@ sparc64_linux_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout,
    address.  */
 
 static CORE_ADDR
-sparc64_linux_step_trap (frame_info_ptr frame, unsigned long insn)
+sparc64_linux_step_trap (const frame_info_ptr &frame, unsigned long insn)
 {
   /* __NR_rt_sigreturn is 101  */
   if ((insn == 0x91d0206d)
@@ -306,7 +306,7 @@ sparc64_linux_get_syscall_number (struct gdbarch *gdbarch,
 /* Implement the "get_longjmp_target" gdbarch method.  */
 
 static int
-sparc64_linux_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+sparc64_linux_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   CORE_ADDR jb_addr;
index 82405f8b62bad7b7338c07652ad59b3d6ba47a4f..fe97689ae157a20e5863e296ba44bfaa7466dd2e 100644 (file)
@@ -86,7 +86,7 @@ sparc64nbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
 
 trad_frame_saved_reg *
 sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
-                                  frame_info_ptr this_frame)
+                                  const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   trad_frame_saved_reg *saved_regs;
@@ -149,7 +149,7 @@ sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
 }
 
 static struct sparc_frame_cache *
-sparc64nbsd_sigcontext_frame_cache (frame_info_ptr this_frame,
+sparc64nbsd_sigcontext_frame_cache (const frame_info_ptr &this_frame,
                                    void **this_cache)
 {
   struct sparc_frame_cache *cache;
@@ -185,7 +185,7 @@ sparc64nbsd_sigcontext_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-sparc64nbsd_sigcontext_frame_this_id (frame_info_ptr this_frame,
+sparc64nbsd_sigcontext_frame_this_id (const frame_info_ptr &this_frame,
                                      void **this_cache,
                                      struct frame_id *this_id)
 {
@@ -196,7 +196,7 @@ sparc64nbsd_sigcontext_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-sparc64nbsd_sigcontext_frame_prev_register (frame_info_ptr this_frame,
+sparc64nbsd_sigcontext_frame_prev_register (const frame_info_ptr &this_frame,
                                            void **this_cache, int regnum)
 {
   struct sparc_frame_cache *cache =
@@ -207,7 +207,7 @@ sparc64nbsd_sigcontext_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc64nbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                   frame_info_ptr this_frame,
+                                   const frame_info_ptr &this_frame,
                                    void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
index 7f22c4b0fc0f85f28e0e8d58128265d7af4041cb..3837074a9fb7c0aeddbdcc5c207e2ff6a58277f2 100644 (file)
@@ -150,7 +150,7 @@ sparc64obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name)
 }
 
 static struct sparc_frame_cache *
-sparc64obsd_frame_cache (frame_info_ptr this_frame, void **this_cache)
+sparc64obsd_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct sparc_frame_cache *cache;
   CORE_ADDR addr;
@@ -186,7 +186,7 @@ sparc64obsd_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-sparc64obsd_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+sparc64obsd_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                           struct frame_id *this_id)
 {
   struct sparc_frame_cache *cache =
@@ -196,7 +196,7 @@ sparc64obsd_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-sparc64obsd_frame_prev_register (frame_info_ptr this_frame,
+sparc64obsd_frame_prev_register (const frame_info_ptr &this_frame,
                                 void **this_cache, int regnum)
 {
   struct sparc_frame_cache *cache =
@@ -207,7 +207,7 @@ sparc64obsd_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc64obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                   frame_info_ptr this_frame,
+                                   const frame_info_ptr &this_frame,
                                    void **this_cache)
 {
   CORE_ADDR pc = get_frame_pc (this_frame);
@@ -234,7 +234,7 @@ static const struct frame_unwind sparc64obsd_frame_unwind =
 /* Kernel debugging support.  */
 
 static struct sparc_frame_cache *
-sparc64obsd_trapframe_cache (frame_info_ptr this_frame, void **this_cache)
+sparc64obsd_trapframe_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct sparc_frame_cache *cache;
   CORE_ADDR sp, trapframe_addr;
@@ -263,7 +263,7 @@ sparc64obsd_trapframe_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-sparc64obsd_trapframe_this_id (frame_info_ptr this_frame,
+sparc64obsd_trapframe_this_id (const frame_info_ptr &this_frame,
                               void **this_cache, struct frame_id *this_id)
 {
   struct sparc_frame_cache *cache =
@@ -273,7 +273,7 @@ sparc64obsd_trapframe_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-sparc64obsd_trapframe_prev_register (frame_info_ptr this_frame,
+sparc64obsd_trapframe_prev_register (const frame_info_ptr &this_frame,
                                     void **this_cache, int regnum)
 {
   struct sparc_frame_cache *cache =
@@ -284,7 +284,7 @@ sparc64obsd_trapframe_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc64obsd_trapframe_sniffer (const struct frame_unwind *self,
-                              frame_info_ptr this_frame,
+                              const frame_info_ptr &this_frame,
                               void **this_cache)
 {
   CORE_ADDR pc;
index 95db72bcbe722e1fab86845a61976eccc14dee85..7cef98bb681cc2b82cd8bc030d17b015257e2fe4 100644 (file)
@@ -99,7 +99,7 @@ static const struct regset sparc64_sol2_fpregset =
 \f
 
 static struct sparc_frame_cache *
-sparc64_sol2_sigtramp_frame_cache (frame_info_ptr this_frame,
+sparc64_sol2_sigtramp_frame_cache (const frame_info_ptr &this_frame,
                                   void **this_cache)
 {
   struct sparc_frame_cache *cache;
@@ -154,7 +154,7 @@ sparc64_sol2_sigtramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-sparc64_sol2_sigtramp_frame_this_id (frame_info_ptr this_frame,
+sparc64_sol2_sigtramp_frame_this_id (const frame_info_ptr &this_frame,
                                     void **this_cache,
                                     struct frame_id *this_id)
 {
@@ -165,7 +165,7 @@ sparc64_sol2_sigtramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-sparc64_sol2_sigtramp_frame_prev_register (frame_info_ptr this_frame,
+sparc64_sol2_sigtramp_frame_prev_register (const frame_info_ptr &this_frame,
                                           void **this_cache,
                                           int regnum)
 {
@@ -177,7 +177,7 @@ sparc64_sol2_sigtramp_frame_prev_register (frame_info_ptr this_frame,
 
 static int
 sparc64_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self,
-                                    frame_info_ptr this_frame,
+                                    const frame_info_ptr &this_frame,
                                     void **this_cache)
 {
   return sol2_sigtramp_p (this_frame);
index 39ad976eaaeb9aba5a9c9bf66a2153510e29b21b..8a90dd00d16f968d653bbbae67de52600a85974a 100644 (file)
@@ -1063,13 +1063,13 @@ sparc64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 /* Normal frames.  */
 
 static struct sparc_frame_cache *
-sparc64_frame_cache (frame_info_ptr this_frame, void **this_cache)
+sparc64_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   return sparc_frame_cache (this_frame, this_cache);
 }
 
 static void
-sparc64_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+sparc64_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                       struct frame_id *this_id)
 {
   struct sparc_frame_cache *cache =
@@ -1083,7 +1083,7 @@ sparc64_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-sparc64_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+sparc64_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                             int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -1147,7 +1147,7 @@ static const struct frame_unwind sparc64_frame_unwind =
 \f
 
 static CORE_ADDR
-sparc64_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+sparc64_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct sparc_frame_cache *cache =
     sparc64_frame_cache (this_frame, this_cache);
@@ -1766,7 +1766,7 @@ sparc64_return_value (struct gdbarch *gdbarch, struct value *function,
 static void
 sparc64_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)
 {
   switch (regnum)
     {
index 8e097f1e86ff52977bcf837abd609e361a99dd2b..6fcd91ee8d35f9114de8c06be718121d037641f8 100644 (file)
@@ -131,7 +131,7 @@ extern const struct sparc_gregmap sparc64nbsd_gregmap;
 
 extern struct trad_frame_saved_reg *
   sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
-                                    frame_info_ptr next_frame);
+                                    const frame_info_ptr &next_frame);
 
 extern const struct sparc_fpregmap sparc64_bsd_fpregmap;
 
index ab4d52849051b104cf9fa8d7c12839ea58d4d32b..23e3891a0600fa06b6d1bce60c0dd074fad0558f 100644 (file)
@@ -215,14 +215,14 @@ static const gdb::option::option_def backtrace_command_option_defs[] = {
 
 /* Prototypes for local functions.  */
 
-static void print_frame_local_vars (frame_info_ptr frame,
+static void print_frame_local_vars (const frame_info_ptr &frame,
                                    bool quiet,
                                    const char *regexp, const char *t_regexp,
                                    int num_tabs, struct ui_file *stream);
 
 static void print_frame (struct ui_out *uiout,
                         const frame_print_options &opts,
-                        frame_info_ptr frame, int print_level,
+                        const frame_info_ptr &frame, int print_level,
                         enum print_what print_what,  int print_args,
                         struct symtab_and_line sal);
 
@@ -315,7 +315,7 @@ static last_displayed_symtab_info_type last_displayed_symtab_info;
 /* See stack.h.  */
 
 bool
-frame_show_address (frame_info_ptr frame,
+frame_show_address (const frame_info_ptr &frame,
                    struct symtab_and_line sal)
 {
   /* If there is a line number, but no PC, then there is no location
@@ -338,7 +338,7 @@ frame_show_address (frame_info_ptr frame,
 /* See frame.h.  */
 
 void
-print_stack_frame_to_uiout (struct ui_out *uiout, frame_info_ptr frame,
+print_stack_frame_to_uiout (struct ui_out *uiout, const frame_info_ptr &frame,
                            int print_level, enum print_what print_what,
                            int set_current_sal)
 {
@@ -354,7 +354,7 @@ print_stack_frame_to_uiout (struct ui_out *uiout, frame_info_ptr frame,
    source line, the actual PC is printed at the beginning.  */
 
 void
-print_stack_frame (frame_info_ptr frame, int print_level,
+print_stack_frame (const frame_info_ptr &frame, int print_level,
                   enum print_what print_what,
                   int set_current_sal)
 {
@@ -382,7 +382,7 @@ print_stack_frame (frame_info_ptr frame, int print_level,
    argument (not just the first nameless argument).  */
 
 static void
-print_frame_nameless_args (frame_info_ptr frame, long start, int num,
+print_frame_nameless_args (const frame_info_ptr &frame, long start, int num,
                           int first, struct ui_file *stream)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -504,7 +504,7 @@ print_frame_arg (const frame_print_options &fp_opts,
    exception.  */
 
 void
-read_frame_local (struct symbol *sym, frame_info_ptr frame,
+read_frame_local (struct symbol *sym, const frame_info_ptr &frame,
                  struct frame_arg *argp)
 {
   argp->sym = sym;
@@ -526,7 +526,7 @@ read_frame_local (struct symbol *sym, frame_info_ptr frame,
 
 void
 read_frame_arg (const frame_print_options &fp_opts,
-               symbol *sym, frame_info_ptr frame,
+               symbol *sym, const frame_info_ptr &frame,
                struct frame_arg *argp, struct frame_arg *entryargp)
 {
   struct value *val = NULL, *entryval = NULL;
@@ -721,7 +721,7 @@ read_frame_arg (const frame_print_options &fp_opts,
 
 static void
 print_frame_args (const frame_print_options &fp_opts,
-                 struct symbol *func, frame_info_ptr frame,
+                 struct symbol *func, const frame_info_ptr &frame,
                  int num, struct ui_file *stream)
 {
   struct ui_out *uiout = current_uiout;
@@ -920,7 +920,7 @@ print_frame_args (const frame_print_options &fp_opts,
    line is in the center of the next 'list'.  */
 
 void
-set_current_sal_from_frame (frame_info_ptr frame)
+set_current_sal_from_frame (const frame_info_ptr &frame)
 {
   symtab_and_line sal = find_frame_sal (frame);
   if (sal.symtab != NULL)
@@ -986,7 +986,7 @@ print_frame_info_to_print_what (const char *print_frame_info)
 /* Print the PC from FRAME, plus any flags, to UIOUT.  */
 
 static void
-print_pc (struct ui_out *uiout, struct gdbarch *gdbarch, frame_info_ptr frame,
+print_pc (struct ui_out *uiout, struct gdbarch *gdbarch, const frame_info_ptr &frame,
          CORE_ADDR pc)
 {
   uiout->field_core_addr ("addr", gdbarch, pc);
@@ -1021,7 +1021,7 @@ get_user_print_what_frame_info (std::optional<enum print_what> *what)
 
 static void
 do_print_frame_info (struct ui_out *uiout, const frame_print_options &fp_opts,
-                    frame_info_ptr frame, int print_level,
+                    const frame_info_ptr &frame, int print_level,
                     enum print_what print_what, int print_args,
                     int set_current_sal)
 {
@@ -1189,7 +1189,7 @@ do_print_frame_info (struct ui_out *uiout, const frame_print_options &fp_opts,
 
 void
 print_frame_info (const frame_print_options &fp_opts,
-                 frame_info_ptr frame, int print_level,
+                 const frame_info_ptr &frame, int print_level,
                  enum print_what print_what, int print_args,
                  int set_current_sal)
 {
@@ -1269,7 +1269,7 @@ get_last_displayed_sal ()
    corresponding to FRAME.  */
 
 gdb::unique_xmalloc_ptr<char>
-find_frame_funname (frame_info_ptr frame, enum language *funlang,
+find_frame_funname (const frame_info_ptr &frame, enum language *funlang,
                    struct symbol **funcp)
 {
   struct symbol *func;
@@ -1324,7 +1324,7 @@ find_frame_funname (frame_info_ptr frame, enum language *funlang,
 static void
 print_frame (struct ui_out *uiout,
             const frame_print_options &fp_opts,
-            frame_info_ptr frame, int print_level,
+            const frame_info_ptr &frame, int print_level,
             enum print_what print_what, int print_args,
             struct symtab_and_line sal)
 {
@@ -1478,7 +1478,7 @@ frame_selection_by_function_completer (struct cmd_list_element *ignore,
    level 1') then SELECTED_FRAME_P will be false.  */
 
 static void
-info_frame_command_core (frame_info_ptr fi, bool selected_frame_p)
+info_frame_command_core (const frame_info_ptr &fi, bool selected_frame_p)
 {
   struct symbol *func;
   struct symtab *s;
@@ -1836,7 +1836,7 @@ trailing_outermost_frame (int count)
    SELECT_FRAME.  */
 
 static void
-select_frame_command_core (frame_info_ptr fi, bool ignored)
+select_frame_command_core (const frame_info_ptr &fi, bool ignored)
 {
   frame_info_ptr prev_frame = get_selected_frame ();
   select_frame (fi);
@@ -1849,7 +1849,7 @@ select_frame_command_core (frame_info_ptr fi, bool ignored)
    reprint the current frame summary).   */
 
 static void
-frame_command_core (frame_info_ptr fi, bool ignored)
+frame_command_core (const frame_info_ptr &fi, bool ignored)
 {
   frame_info_ptr prev_frame = get_selected_frame ();
   select_frame (fi);
@@ -1873,7 +1873,7 @@ frame_command_core (frame_info_ptr fi, bool ignored)
    'frame' will all cause SELECTED_FRAME_P to be true.  In all other cases
    SELECTED_FRAME_P is false.  */
 
-template <void (*FPTR) (frame_info_ptr fi, bool selected_frame_p)>
+template <void (*FPTR) (const frame_info_ptr &fi, bool selected_frame_p)>
 class frame_command_helper
 {
 public:
@@ -2338,7 +2338,7 @@ prepare_reg (const char *regexp, std::optional<compiled_regex> *reg)
    explaining why no local variables could be printed.  */
 
 static void
-print_frame_local_vars (frame_info_ptr frame,
+print_frame_local_vars (const frame_info_ptr &frame,
                        bool quiet,
                        const char *regexp, const char *t_regexp,
                        int num_tabs, struct ui_file *stream)
@@ -2500,7 +2500,7 @@ iterate_over_block_arg_vars (const struct block *b,
    explaining why no argument variables could be printed.  */
 
 static void
-print_frame_arg_vars (frame_info_ptr frame,
+print_frame_arg_vars (const frame_info_ptr &frame,
                      bool quiet,
                      const char *regexp, const char *t_regexp,
                      struct ui_file *stream)
index eb52c1d193fe005b14cd3125a1fae13b8e6f334c..e7242c710367d935145a453e143e4225a3835a2d 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef STACK_H
 #define STACK_H
 
-gdb::unique_xmalloc_ptr<char> find_frame_funname (frame_info_ptr frame,
+gdb::unique_xmalloc_ptr<char> find_frame_funname (const frame_info_ptr &frame,
                                                  enum language *funlang,
                                                  struct symbol **funcp);
 
@@ -43,7 +43,7 @@ void get_user_print_what_frame_info (std::optional<enum print_what> *what);
 /* Return true if we should display the address in addition to the location,
    because we are in the middle of a statement.  */
 
-bool frame_show_address (frame_info_ptr frame, struct symtab_and_line sal);
+bool frame_show_address (const frame_info_ptr &frame, struct symtab_and_line sal);
 
 /* Forget the last sal we displayed.  */
 
index e5796f2ff76d94d48b436a4d6ed5a30353c18e10..b54e4d2d10a770c5aec6bb1caede28ae95be006c 100644 (file)
@@ -151,7 +151,7 @@ public:
 
   /* See probe.h.  */
   struct value *evaluate_argument (unsigned n,
-                                  frame_info_ptr frame) override;
+                                  const frame_info_ptr &frame) override;
 
   /* See probe.h.  */
   void compile_to_ax (struct agent_expr *aexpr,
@@ -1438,7 +1438,7 @@ stap_probe::can_evaluate_arguments () const
    corresponding to it.  Assertion is thrown if N does not exist.  */
 
 struct value *
-stap_probe::evaluate_argument (unsigned n, frame_info_ptr frame)
+stap_probe::evaluate_argument (unsigned n, const frame_info_ptr &frame)
 {
   struct stap_probe_arg *arg;
   struct gdbarch *gdbarch = get_frame_arch (frame);
index 8901f326c8dd69e6eac5b44413979f30fe98d63b..755e0c987e6e9bdf238eb5348830a1087c353413 100644 (file)
@@ -27,7 +27,7 @@
 #include "gdbarch.h"
 
 static struct value *
-value_of_builtin_frame_fp_reg (frame_info_ptr frame, const void *baton)
+value_of_builtin_frame_fp_reg (const frame_info_ptr &frame, const void *baton)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
@@ -53,7 +53,7 @@ value_of_builtin_frame_fp_reg (frame_info_ptr frame, const void *baton)
 }
 
 static struct value *
-value_of_builtin_frame_pc_reg (frame_info_ptr frame, const void *baton)
+value_of_builtin_frame_pc_reg (const frame_info_ptr &frame, const void *baton)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
@@ -73,7 +73,7 @@ value_of_builtin_frame_pc_reg (frame_info_ptr frame, const void *baton)
 }
 
 static struct value *
-value_of_builtin_frame_sp_reg (frame_info_ptr frame, const void *baton)
+value_of_builtin_frame_sp_reg (const frame_info_ptr &frame, const void *baton)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
@@ -84,7 +84,7 @@ value_of_builtin_frame_sp_reg (frame_info_ptr frame, const void *baton)
 }
 
 static struct value *
-value_of_builtin_frame_ps_reg (frame_info_ptr frame, const void *baton)
+value_of_builtin_frame_ps_reg (const frame_info_ptr &frame, const void *baton)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
index ca5a5b0f7fde4151964b58456b35d5deb4624893..5bd63979132cbfa4c33bec51628862e772baec28 100644 (file)
@@ -1114,13 +1114,13 @@ struct symbol_computed_ops
      FRAME may be zero.  */
 
   struct value *(*read_variable) (struct symbol * symbol,
-                                 frame_info_ptr frame);
+                                 const frame_info_ptr &frame);
 
   /* Read variable SYMBOL like read_variable at (callee) FRAME's function
      entry.  SYMBOL should be a function parameter, otherwise
      NO_ENTRY_VALUE_ERROR will be thrown.  */
   struct value *(*read_variable_at_entry) (struct symbol *symbol,
-                                          frame_info_ptr frame);
+                                          const frame_info_ptr &frame);
 
   /* Find the "symbol_needs_kind" value for the given symbol.  This
      value determines whether reading the symbol needs memory (e.g., a
@@ -1192,7 +1192,7 @@ struct symbol_block_ops
      computed with DW_AT_static_link and this method must be used to compute
      the corresponding DW_AT_frame_base attribute.  */
   CORE_ADDR (*get_frame_base) (struct symbol *framefunc,
-                              frame_info_ptr frame);
+                              const frame_info_ptr &frame);
 
   /* Return the block for this function.  So far, this is used to
      implement function aliases.  So, if this is set, then it's not
@@ -2350,7 +2350,7 @@ struct gnu_ifunc_fns
 
 extern const struct gnu_ifunc_fns *gnu_ifunc_fns_p;
 
-extern CORE_ADDR find_solib_trampoline_target (frame_info_ptr, CORE_ADDR);
+extern CORE_ADDR find_solib_trampoline_target (const frame_info_ptr &, CORE_ADDR);
 
 struct symtab_and_line
 {
index 870ba368fda16e41decbb42a8243dd1a53ed1341..a9de60cf662a697eaf8604d46764e82bdfc686c3 100644 (file)
@@ -79,7 +79,7 @@ tic6x_register_sigcontext_offset (unsigned int regnum, struct gdbarch *gdbarch)
 
 static void
 tic6x_linux_rt_sigreturn_init (const struct tramp_frame *self,
-                              frame_info_ptr this_frame,
+                              const frame_info_ptr &this_frame,
                               struct trad_frame_cache *this_cache,
                               CORE_ADDR func)
 {
@@ -149,7 +149,7 @@ static struct tramp_frame tic6x_linux_rt_sigreturn_tramp_frame =
    instruction to be executed.  */
 
 static CORE_ADDR
-tic6x_linux_syscall_next_pc (frame_info_ptr frame)
+tic6x_linux_syscall_next_pc (const frame_info_ptr &frame)
 {
   ULONGEST syscall_number = get_frame_register_unsigned (frame,
                                                         TIC6X_B0_REGNUM);
index c81f0100a27aa91ba9b71d17468c940b99823cf2..aa115095df79ba7173f3ddbf85cb1825fabcb164 100644 (file)
@@ -142,7 +142,7 @@ static CORE_ADDR
 tic6x_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc,
                        const CORE_ADDR current_pc,
                        struct tic6x_unwind_cache *cache,
-                       frame_info_ptr this_frame)
+                       const frame_info_ptr &this_frame)
 {
   unsigned int src_reg, base_reg, dst_reg;
   int i;
@@ -340,7 +340,7 @@ tic6x_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 static void
 tic6x_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)
 {
   /* Mark the PC as the destination for the return address.  */
   if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -365,7 +365,7 @@ tic6x_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
 /* This is the implementation of gdbarch method unwind_pc.  */
 
 static CORE_ADDR
-tic6x_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+tic6x_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_byte buf[8];
 
@@ -376,7 +376,7 @@ tic6x_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 /* Frame base handling.  */
 
 static struct tic6x_unwind_cache*
-tic6x_frame_unwind_cache (frame_info_ptr this_frame,
+tic6x_frame_unwind_cache (const frame_info_ptr &this_frame,
                          void **this_prologue_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -404,7 +404,7 @@ tic6x_frame_unwind_cache (frame_info_ptr this_frame,
 }
 
 static void
-tic6x_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+tic6x_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                     struct frame_id *this_id)
 {
   struct tic6x_unwind_cache *cache =
@@ -418,7 +418,7 @@ tic6x_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-tic6x_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
+tic6x_frame_prev_register (const frame_info_ptr &this_frame, void **this_cache,
                           int regnum)
 {
   struct tic6x_unwind_cache *cache =
@@ -445,7 +445,7 @@ tic6x_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
 }
 
 static CORE_ADDR
-tic6x_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+tic6x_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct tic6x_unwind_cache *info
     = tic6x_frame_unwind_cache (this_frame, this_cache);
@@ -473,7 +473,7 @@ static const struct frame_base tic6x_frame_base =
 
 
 static struct tic6x_unwind_cache *
-tic6x_make_stub_cache (frame_info_ptr this_frame)
+tic6x_make_stub_cache (const frame_info_ptr &this_frame)
 {
   struct tic6x_unwind_cache *cache;
 
@@ -489,7 +489,7 @@ tic6x_make_stub_cache (frame_info_ptr this_frame)
 }
 
 static void
-tic6x_stub_this_id (frame_info_ptr this_frame, void **this_cache,
+tic6x_stub_this_id (const frame_info_ptr &this_frame, void **this_cache,
                    struct frame_id *this_id)
 {
   struct tic6x_unwind_cache *cache;
@@ -503,7 +503,7 @@ tic6x_stub_this_id (frame_info_ptr this_frame, void **this_cache,
 
 static int
 tic6x_stub_unwind_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;
@@ -1103,7 +1103,7 @@ tic6x_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* This is the implementation of gdbarch method get_longjmp_target.  */
 
 static int
-tic6x_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+tic6x_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
index 61978ea7681365f234730d7298d58b98a54b5305..886e1b8b30982989360d62d7fc4881e86dce9f99 100644 (file)
@@ -50,7 +50,7 @@ struct tic6x_gdbarch_tdep : gdbarch_tdep_base
 {
   /* Return the expected next PC if FRAME is stopped at a syscall
      instruction.  */
-  CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr;
+  CORE_ADDR (*syscall_next_pc) (const frame_info_ptr &frame) = nullptr;
 
   const gdb_byte *breakpoint = nullptr; /* Breakpoint instruction.  */
 
index efd2e9f8f23b396c6d1bdfded0fca10e5e66efa3..e0ff0fc2a86c7269ea7b579426f69350d4f0f780 100644 (file)
@@ -34,7 +34,7 @@
 
 static void
 tilegx_linux_sigframe_init (const struct tramp_frame *self,
-                           frame_info_ptr this_frame,
+                           const frame_info_ptr &this_frame,
                            struct trad_frame_cache *this_cache,
                            CORE_ADDR func)
 {
index 8264937788f0b265566d45f2f817a5aa3f5ca0f3..c25933be558563c5b00e6e8cdb0440a2accd914a 100644 (file)
@@ -362,7 +362,7 @@ static CORE_ADDR
 tilegx_analyze_prologue (struct gdbarch* gdbarch,
                         CORE_ADDR start_addr, CORE_ADDR end_addr,
                         struct tilegx_frame_cache *cache,
-                        frame_info_ptr next_frame)
+                        const frame_info_ptr &next_frame)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR next_addr;
@@ -774,7 +774,7 @@ tilegx_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 /* This is the implementation of gdbarch method get_longjmp_target.  */
 
 static int
-tilegx_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc)
+tilegx_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -833,7 +833,7 @@ typedef BP_MANIPULATION (tilegx_break_insn) tilegx_breakpoint;
 /* Normal frames.  */
 
 static struct tilegx_frame_cache *
-tilegx_frame_cache (frame_info_ptr this_frame, void **this_cache)
+tilegx_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct tilegx_frame_cache *cache;
@@ -864,7 +864,7 @@ tilegx_frame_cache (frame_info_ptr this_frame, void **this_cache)
 /* Retrieve the value of REGNUM in FRAME.  */
 
 static struct value*
-tilegx_frame_prev_register (frame_info_ptr this_frame,
+tilegx_frame_prev_register (const frame_info_ptr &this_frame,
                            void **this_cache,
                            int regnum)
 {
@@ -878,7 +878,7 @@ tilegx_frame_prev_register (frame_info_ptr this_frame,
 /* Build frame id.  */
 
 static void
-tilegx_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+tilegx_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                      struct frame_id *this_id)
 {
   struct tilegx_frame_cache *info =
@@ -892,7 +892,7 @@ tilegx_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static CORE_ADDR
-tilegx_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+tilegx_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct tilegx_frame_cache *cache =
     tilegx_frame_cache (this_frame, this_cache);
index 7005ca83455cb2c1b511272adf0adb40a6e34d44..418d9ea2203a0cb47e6e63a27f49022e486c212d 100644 (file)
@@ -206,7 +206,7 @@ set_tracepoint_num (int num)
    the traceframe context (line, function, file).  */
 
 static void
-set_traceframe_context (frame_info_ptr trace_frame)
+set_traceframe_context (const frame_info_ptr &trace_frame)
 {
   CORE_ADDR trace_pc;
   struct symbol *traceframe_fun;
index 78bfb2fdd4e4cfd33614419afd192dc94e62cfcc..8b63927b133c610798062fdd980c1b5d55a44fde 100644 (file)
@@ -36,7 +36,7 @@ struct trad_frame_cache
 };
 
 struct trad_frame_cache *
-trad_frame_cache_zalloc (frame_info_ptr this_frame)
+trad_frame_cache_zalloc (const frame_info_ptr &this_frame)
 {
   struct trad_frame_cache *this_trad_cache;
 
@@ -83,7 +83,7 @@ trad_frame_alloc_saved_regs (struct gdbarch *gdbarch)
    for all potential instruction sequences).  */
 
 trad_frame_saved_reg *
-trad_frame_alloc_saved_regs (frame_info_ptr this_frame)
+trad_frame_alloc_saved_regs (const frame_info_ptr &this_frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
 
@@ -184,7 +184,7 @@ trad_frame_set_reg_value_bytes (struct trad_frame_cache *this_trad_cache,
 
 
 struct value *
-trad_frame_get_prev_register (frame_info_ptr this_frame,
+trad_frame_get_prev_register (const frame_info_ptr &this_frame,
                              trad_frame_saved_reg this_saved_regs[],
                              int regnum)
 {
@@ -209,7 +209,7 @@ trad_frame_get_prev_register (frame_info_ptr this_frame,
 
 struct value *
 trad_frame_get_register (struct trad_frame_cache *this_trad_cache,
-                        frame_info_ptr this_frame,
+                        const frame_info_ptr &this_frame,
                         int regnum)
 {
   return trad_frame_get_prev_register (this_frame, this_trad_cache->prev_regs,
index 96d2953a26749a70edff75e477f5c938fe3cb3e6..ca8792baa17d20e932412b09ba65dcb98dcb0c5e 100644 (file)
@@ -31,7 +31,7 @@ struct trad_frame_cache;
    The entire cache is populated in a single pass and then generic
    routines are used to extract the various cache values.  */
 
-struct trad_frame_cache *trad_frame_cache_zalloc (frame_info_ptr);
+struct trad_frame_cache *trad_frame_cache_zalloc (const frame_info_ptr &);
 
 /* This frame's ID.  */
 void trad_frame_set_id (struct trad_frame_cache *this_trad_cache,
@@ -59,7 +59,7 @@ void trad_frame_set_reg_value_bytes (struct trad_frame_cache *this_trad_cache,
                                     gdb::array_view<const gdb_byte> bytes);
 
 struct value *trad_frame_get_register (struct trad_frame_cache *this_trad_cache,
-                                      frame_info_ptr this_frame,
+                                      const frame_info_ptr &this_frame,
                                       int regnum);
 
 /* Describes the kind of encoding a stored register has.  */
@@ -194,12 +194,12 @@ void trad_frame_reset_saved_regs (struct gdbarch *gdbarch,
                                  trad_frame_saved_reg *regs);
 
 /* Return a freshly allocated (and initialized) trad_frame array.  */
-trad_frame_saved_reg *trad_frame_alloc_saved_regs (frame_info_ptr);
+trad_frame_saved_reg *trad_frame_alloc_saved_regs (const frame_info_ptr &);
 trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct gdbarch *);
 
 /* Given the trad_frame info, return the location of the specified
    register.  */
-struct value *trad_frame_get_prev_register (frame_info_ptr this_frame,
+struct value *trad_frame_get_prev_register (const frame_info_ptr &this_frame,
                                            trad_frame_saved_reg this_saved_regs[],
                                            int regnum);
 
index 51abd347db425587c0cff8a1d280725591d8da06..0e730e66b5839edee6dd28f0de1c442983609ce2 100644 (file)
@@ -40,7 +40,7 @@ struct tramp_frame_cache
 };
 
 static struct trad_frame_cache *
-tramp_frame_cache (frame_info_ptr this_frame,
+tramp_frame_cache (const frame_info_ptr &this_frame,
                   void **this_cache)
 {
   struct tramp_frame_cache *tramp_cache
@@ -58,7 +58,7 @@ tramp_frame_cache (frame_info_ptr this_frame,
 }
 
 static void
-tramp_frame_this_id (frame_info_ptr this_frame,
+tramp_frame_this_id (const frame_info_ptr &this_frame,
                     void **this_cache,
                     struct frame_id *this_id)
 {
@@ -69,7 +69,7 @@ tramp_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-tramp_frame_prev_register (frame_info_ptr this_frame,
+tramp_frame_prev_register (const frame_info_ptr &this_frame,
                           void **this_cache,
                           int prev_regnum)
 {
@@ -81,7 +81,7 @@ tramp_frame_prev_register (frame_info_ptr this_frame,
 
 static CORE_ADDR
 tramp_frame_start (const struct tramp_frame *tramp,
-                  frame_info_ptr this_frame, CORE_ADDR pc)
+                  const frame_info_ptr &this_frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -121,7 +121,7 @@ tramp_frame_start (const struct tramp_frame *tramp,
 
 static int
 tramp_frame_sniffer (const struct frame_unwind *self,
-                    frame_info_ptr this_frame,
+                    const frame_info_ptr &this_frame,
                     void **this_cache)
 {
   const struct tramp_frame *tramp = self->unwind_data->tramp_frame;
index 36185c1f4e0bbbc713c43ce5cefe62d8768d0179..d9e54f5981a2b24da4a48d137129941789cac3a0 100644 (file)
@@ -66,7 +66,7 @@ struct tramp_frame
   /* Initialize a trad-frame cache corresponding to the tramp-frame.
      FUNC is the address of the instruction TRAMP[0] in memory.  */
   void (*init) (const struct tramp_frame *self,
-               frame_info_ptr this_frame,
+               const frame_info_ptr &this_frame,
                struct trad_frame_cache *this_cache,
                CORE_ADDR func);
   /* Return non-zero if the tramp-frame is valid for the PC requested.
@@ -74,7 +74,7 @@ struct tramp_frame
      sequence against if required.  If this is NULL, then the tramp-frame
      is valid for any PC.  */
   int (*validate) (const struct tramp_frame *self,
-                  frame_info_ptr this_frame,
+                  const frame_info_ptr &this_frame,
                   CORE_ADDR *pc);
 
   /* Given the current frame in THIS_FRAME and a frame cache in FRAME_CACHE,
index 45c60db99203a0b259b41299e3640adba3090eef..5dc27c32daacc7720f87e4129e2cd7181a7b5b80 100644 (file)
@@ -490,7 +490,7 @@ tui_disasm_window::addr_is_displayed (CORE_ADDR addr) const
 }
 
 void
-tui_disasm_window::maybe_update (frame_info_ptr fi, symtab_and_line sal)
+tui_disasm_window::maybe_update (const frame_info_ptr &fi, symtab_and_line sal)
 {
   CORE_ADDR low;
 
index 9c4eabbb092956d48a1704549edc8ca74df79bb0..0aef091069b726df0398f6bae447341548dcd4ac 100644 (file)
@@ -41,7 +41,7 @@ struct tui_disasm_window : public tui_source_window_base
 
   bool location_matches_p (struct bp_location *loc, int line_no) override;
 
-  void maybe_update (frame_info_ptr fi, symtab_and_line sal) override;
+  void maybe_update (const frame_info_ptr &fi, symtab_and_line sal) override;
 
   void erase_source_content () override
   {
index 28d0b742ed7607e32a7fb4fa1b8e2d27a6ebeb0c..289a259968890555a5221503251bbe2b82964380 100644 (file)
@@ -66,7 +66,7 @@ tui_all_objfiles_removed (program_space *pspace)
 /* Observer for the register_changed notification.  */
 
 static void
-tui_register_changed (frame_info_ptr frame, int regno)
+tui_register_changed (const frame_info_ptr &frame, int regno)
 {
   frame_info_ptr fi;
 
index 504aed4b81f90fca34acde97e617827948e10628..e7c1839656c812eabcba6049b6080ad95f8bd2a9 100644 (file)
@@ -85,7 +85,7 @@ tab_expansion_file::write (const char *buf, long length_buf)
    representation of it.  */
 
 static std::string
-tui_register_format (frame_info_ptr frame, int regnum)
+tui_register_format (const frame_info_ptr &frame, int regnum)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
@@ -406,7 +406,7 @@ tui_data_window::do_scroll_vertical (int num_to_scroll)
    given a particular frame.  If the values have changed, they are
    updated with the new value and highlighted.  */
 void
-tui_data_window::check_register_values (frame_info_ptr frame)
+tui_data_window::check_register_values (const frame_info_ptr &frame)
 {
   if (frame == nullptr)
     set_register_group (nullptr);
index 9d9cae40fe07a51b7939100e713bf4397b18d090..07b951316b6b3ee43a90a04f9f9bd9f8dd23fec9 100644 (file)
@@ -74,7 +74,7 @@ struct tui_data_window : public tui_win_info
     return DATA_NAME;
   }
 
-  void check_register_values (frame_info_ptr frame);
+  void check_register_values (const frame_info_ptr &frame);
 
   void set_register_group (const reggroup *group);
 
index 635cb2f35a65280d215d69258d98098c3092c1dd..fa956b29a195ca4031e315eed27c632710ebbe1b 100644 (file)
@@ -199,7 +199,7 @@ tui_source_window::line_is_displayed (int line) const
 }
 
 void
-tui_source_window::maybe_update (frame_info_ptr fi, symtab_and_line sal)
+tui_source_window::maybe_update (const frame_info_ptr &fi, symtab_and_line sal)
 {
   int start_line = (sal.line - ((height - box_size ()) / 2)) + 1;
   if (start_line <= 0)
index 0bf43b663e73a33c21ec097d8372f25964eed2f4..6d4ad4e39c27120854ce9e048946df7a4c6b1ebd 100644 (file)
@@ -46,7 +46,7 @@ struct tui_source_window : public tui_source_window_base
 
   bool showing_source_p (const char *filename) const;
 
-  void maybe_update (frame_info_ptr fi, symtab_and_line sal) override;
+  void maybe_update (const frame_info_ptr &fi, symtab_and_line sal) override;
 
   void erase_source_content () override
   {
index df4675fe5dfbbd816b36325c1ff0b6169a956081..aac391d3babcd06a08d910ef31a3ebcf6e6cc368 100644 (file)
@@ -213,7 +213,7 @@ tui_status_window::make_status_line () const
    name is demangled if demangling is turned on.  Returns a pointer to
    a static area holding the result.  */
 static char*
-tui_get_function_from_frame (frame_info_ptr fi)
+tui_get_function_from_frame (const frame_info_ptr &fi)
 {
   static char name[256];
   string_file stream;
@@ -267,7 +267,7 @@ tui_status_window::rerender ()
    refresh.  */
 
 void
-tui_show_frame_info (frame_info_ptr fi)
+tui_show_frame_info (const frame_info_ptr &fi)
 {
   bool status_changed_p;
 
index efef5375e86eb1c925648eac596d9549232b1317..0af44664104290b23b23075131198795ae27f6f8 100644 (file)
@@ -51,6 +51,6 @@ private:
 };
 
 extern void tui_show_status_content (void);
-extern void tui_show_frame_info (frame_info_ptr);
+extern void tui_show_frame_info (const frame_info_ptr &);
 
 #endif /* TUI_TUI_STATUS_H */
index 628fc22c03ca333661ef4f2ee9ad40bdee4250ce..646597306f26ede528acc51af233d20e0fe72cc9 100644 (file)
@@ -159,7 +159,7 @@ public:
 
   /* Update the window to display the given location.  Does nothing if
      the location is already displayed.  */
-  virtual void maybe_update (frame_info_ptr fi, symtab_and_line sal) = 0;
+  virtual void maybe_update (const frame_info_ptr &fi, symtab_and_line sal) = 0;
 
   void update_source_window_as_is  (struct gdbarch *gdbarch,
                                    const struct symtab_and_line &sal);
index f0981b836dd323cbe02a25aad67eb6caab9027ab..f09d1c8ba015e674423e610c850d0837147ee555 100644 (file)
@@ -36,7 +36,7 @@ validate_user_created_frame (frame_id id)
 }
 
 static frame_info_ptr
-user_created_frame_callee (frame_info_ptr frame)
+user_created_frame_callee (const frame_info_ptr &frame)
 {
   validate_user_created_frame (get_frame_id (frame));
 
index 61c8f8bd2c023103164b81fd6c5d05e0a1a28940..d1b510a79278ed6e30c2ef48fa89ad3600ab80f8 100644 (file)
@@ -44,7 +44,7 @@ struct user_reg
   /* Avoid the "read" symbol name as it conflicts with a preprocessor symbol
      in the NetBSD header for Stack Smashing Protection, that wraps the read(2)
      syscall.  */
-  struct value *(*xread) (frame_info_ptr frame, const void *baton);
+  struct value *(*xread) (const frame_info_ptr &frame, const void *baton);
   const void *baton;
   struct user_reg *next;
 };
@@ -203,7 +203,7 @@ user_reg_map_regnum_to_name (struct gdbarch *gdbarch, int regnum)
 }
 
 struct value *
-value_of_user_reg (int regnum, frame_info_ptr frame)
+value_of_user_reg (int regnum, const frame_info_ptr &frame)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   int maxregs = gdbarch_num_cooked_regs (gdbarch);
index cbe0cded2d5ead6de7e873a86b62094ff74b5561..baa3581a0baff473f43128454e1a4946d5d0464c 100644 (file)
@@ -56,9 +56,9 @@ extern const char *user_reg_map_regnum_to_name (struct gdbarch *gdbarch,
    bytes as, at the time the register is being added, the type needed
    to describe the register has not bee initialized.  */
 
-typedef struct value *(user_reg_read_ftype) (frame_info_ptr frame,
+typedef struct value *(user_reg_read_ftype) (const frame_info_ptr &frame,
                                             const void *baton);
-extern struct value *value_of_user_reg (int regnum, frame_info_ptr frame);
+extern struct value *value_of_user_reg (int regnum, const frame_info_ptr &frame);
 
 /* Add a builtin register (present in all architectures).  */
 extern void user_reg_add_builtin (const char *name,
index 5b22ee2f4c421a8cffbd4f9b3721405cd15a7249..4c1fd383a84f15458ac956f3ad24f971d2cb848b 100644 (file)
@@ -1212,7 +1212,7 @@ v850_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 }
 
 static struct v850_frame_cache *
-v850_alloc_frame_cache (frame_info_ptr this_frame)
+v850_alloc_frame_cache (const frame_info_ptr &this_frame)
 {
   struct v850_frame_cache *cache;
 
@@ -1231,7 +1231,7 @@ v850_alloc_frame_cache (frame_info_ptr this_frame)
 }
 
 static struct v850_frame_cache *
-v850_frame_cache (frame_info_ptr this_frame, void **this_cache)
+v850_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct v850_frame_cache *cache;
@@ -1297,7 +1297,7 @@ v850_frame_cache (frame_info_ptr this_frame, void **this_cache)
 
 
 static struct value *
-v850_frame_prev_register (frame_info_ptr this_frame,
+v850_frame_prev_register (const frame_info_ptr &this_frame,
                          void **this_cache, int regnum)
 {
   struct v850_frame_cache *cache = v850_frame_cache (this_frame, this_cache);
@@ -1308,7 +1308,7 @@ v850_frame_prev_register (frame_info_ptr this_frame,
 }
 
 static void
-v850_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+v850_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                    struct frame_id *this_id)
 {
   struct v850_frame_cache *cache = v850_frame_cache (this_frame, this_cache);
@@ -1331,7 +1331,7 @@ static const struct frame_unwind v850_frame_unwind = {
 };
 
 static CORE_ADDR
-v850_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+v850_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct v850_frame_cache *cache = v850_frame_cache (this_frame, this_cache);
 
index 399d0f109e145acf297b5260c0df409e193e5c80..be907440a59ba75f8eac7fed6c97b9997bd47ef0 100644 (file)
@@ -976,7 +976,7 @@ value_one (struct type *type)
    e.g. in case the type is a variable length array.  */
 
 static struct value *
-get_value_at (struct type *type, CORE_ADDR addr, frame_info_ptr frame,
+get_value_at (struct type *type, CORE_ADDR addr, const frame_info_ptr &frame,
              int lazy)
 {
   struct value *val;
@@ -1029,7 +1029,7 @@ value_at_non_lval (struct type *type, CORE_ADDR addr)
    e.g. in case the type is a variable length array.  */
 
 struct value *
-value_at_lazy (struct type *type, CORE_ADDR addr, frame_info_ptr frame)
+value_at_lazy (struct type *type, CORE_ADDR addr, const frame_info_ptr &frame)
 {
   return get_value_at (type, addr, frame, 1);
 }
index bea34e556a60e3722626cf150064a42d50b075af..c7e940badb97bafbe06561838cc003a39ff272ec 100644 (file)
@@ -962,11 +962,11 @@ value::allocate (struct type *type)
 /* See value.h  */
 
 value *
-value::allocate_register_lazy (frame_info_ptr next_frame, int regnum,
-                              struct type *type)
+value::allocate_register_lazy (const frame_info_ptr &initial_next_frame,
+                              int regnum, struct type *type)
 {
   if (type == nullptr)
-    type = register_type (frame_unwind_arch (next_frame), regnum);
+    type = register_type (frame_unwind_arch (initial_next_frame), regnum);
 
   value *result = value::allocate_lazy (type);
 
@@ -978,6 +978,7 @@ value::allocate_register_lazy (frame_info_ptr next_frame, int regnum,
      NEXT_FRAME will not have a valid frame id yet.  Find the next non-inline
      frame (possibly the sentinel frame).  This is where registers are unwound
      from anyway.  */
+  frame_info_ptr next_frame = initial_next_frame;
   while (get_frame_type (next_frame) == INLINE_FRAME)
     next_frame = get_next_frame_sentinel_okay (next_frame);
 
@@ -992,7 +993,7 @@ value::allocate_register_lazy (frame_info_ptr next_frame, int regnum,
 /* See value.h  */
 
 value *
-value::allocate_register (frame_info_ptr next_frame, int regnum,
+value::allocate_register (const frame_info_ptr &next_frame, int regnum,
                          struct type *type)
 {
   value *result = value::allocate_register_lazy (next_frame, regnum, type);
@@ -3598,7 +3599,7 @@ struct value *
 value_from_contents_and_address (struct type *type,
                                 const gdb_byte *valaddr,
                                 CORE_ADDR address,
-                                frame_info_ptr frame)
+                                const frame_info_ptr &frame)
 {
   gdb::array_view<const gdb_byte> view;
   if (valaddr != nullptr)
@@ -4070,7 +4071,7 @@ value::fetch_lazy ()
 /* See value.h.  */
 
 value *
-pseudo_from_raw_part (frame_info_ptr next_frame, int pseudo_reg_num,
+pseudo_from_raw_part (const frame_info_ptr &next_frame, int pseudo_reg_num,
                      int raw_reg_num, int raw_offset)
 {
   value *pseudo_reg_val
@@ -4084,7 +4085,7 @@ pseudo_from_raw_part (frame_info_ptr next_frame, int pseudo_reg_num,
 /* See value.h.  */
 
 void
-pseudo_to_raw_part (frame_info_ptr next_frame,
+pseudo_to_raw_part (const frame_info_ptr &next_frame,
                    gdb::array_view<const gdb_byte> pseudo_buf,
                    int raw_reg_num, int raw_offset)
 {
@@ -4101,7 +4102,7 @@ pseudo_to_raw_part (frame_info_ptr next_frame,
 /* See value.h.  */
 
 value *
-pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
+pseudo_from_concat_raw (const frame_info_ptr &next_frame, int pseudo_reg_num,
                        int raw_reg_1_num, int raw_reg_2_num)
 {
   value *pseudo_reg_val
@@ -4126,7 +4127,7 @@ pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
 /* See value.h. */
 
 void
-pseudo_to_concat_raw (frame_info_ptr next_frame,
+pseudo_to_concat_raw (const frame_info_ptr &next_frame,
                      gdb::array_view<const gdb_byte> pseudo_buf,
                      int raw_reg_1_num, int raw_reg_2_num)
 {
@@ -4149,7 +4150,7 @@ pseudo_to_concat_raw (frame_info_ptr next_frame,
 /* See value.h.  */
 
 value *
-pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
+pseudo_from_concat_raw (const frame_info_ptr &next_frame, int pseudo_reg_num,
                        int raw_reg_1_num, int raw_reg_2_num,
                        int raw_reg_3_num)
 {
@@ -4180,7 +4181,7 @@ pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
 /* See value.h. */
 
 void
-pseudo_to_concat_raw (frame_info_ptr next_frame,
+pseudo_to_concat_raw (const frame_info_ptr &next_frame,
                      gdb::array_view<const gdb_byte> pseudo_buf,
                      int raw_reg_1_num, int raw_reg_2_num, int raw_reg_3_num)
 {
index c7d3866038ab7a3d1f07e9ad107b3e3a0446080a..e8d3c9fd907a56f43a58c876edb323d6bb17bf93 100644 (file)
@@ -162,13 +162,14 @@ public:
   /* Allocate a lazy value representing register REGNUM in the frame previous
      to NEXT_FRAME.  If TYPE is non-nullptr, use it as the value type.
      Otherwise, use `register_type` to obtain the type.  */
-  static struct value *allocate_register_lazy (frame_info_ptr next_frame,
-                                         int regnum, type *type = nullptr);
+  static struct value *allocate_register_lazy (const frame_info_ptr &next_frame,
+                                              int regnum,
+                                              type *type = nullptr);
 
   /* Same as `allocate_register_lazy`, but make the value non-lazy.
   
      The caller is responsible for filling the value's contents.  */
-  static struct value *allocate_register (frame_info_ptr next_frame,
+  static struct value *allocate_register (const frame_info_ptr &next_frame,
                                          int regnum, type *type = nullptr);
 
   /* Create a computed lvalue, with type TYPE, function pointers
@@ -1110,7 +1111,7 @@ extern struct value *value_at (struct type *type, CORE_ADDR addr);
    properties.  */
 
 extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr,
-                                   frame_info_ptr frame = nullptr);
+                                   const frame_info_ptr &frame = nullptr);
 
 /* Like value_at, but ensures that the result is marked not_lval.
    This can be important if the memory is "volatile".  */
@@ -1120,7 +1121,7 @@ extern struct value *value_from_contents_and_address_unresolved
      (struct type *, const gdb_byte *, CORE_ADDR);
 extern struct value *value_from_contents_and_address
      (struct type *, const gdb_byte *, CORE_ADDR,
-      frame_info_ptr frame = nullptr);
+      const frame_info_ptr &frame = nullptr);
 extern struct value *value_from_contents (struct type *, const gdb_byte *);
 
 extern value *default_value_from_register (gdbarch *gdbarch, type *type,
@@ -1128,10 +1129,10 @@ extern value *default_value_from_register (gdbarch *gdbarch, type *type,
                                           const frame_info_ptr &this_frame);
 
 extern struct value *value_from_register (struct type *type, int regnum,
-                                         frame_info_ptr frame);
+                                         const frame_info_ptr &frame);
 
 extern CORE_ADDR address_from_register (int regnum,
-                                       frame_info_ptr frame);
+                                       const frame_info_ptr &frame);
 
 extern struct value *value_of_variable (struct symbol *var,
                                        const struct block *b);
@@ -1142,11 +1143,11 @@ extern struct value *address_of_variable (struct symbol *var,
 /* Return a value with the contents of register REGNUM as found in the frame
    previous to NEXT_FRAME.  */
 
-extern value *value_of_register (int regnum, frame_info_ptr next_frame);
+extern value *value_of_register (int regnum, const frame_info_ptr &next_frame);
 
 /* Same as the above, but the value is not fetched.  */
 
-extern value *value_of_register_lazy (frame_info_ptr next_frame, int regnum);
+extern value *value_of_register_lazy (const frame_info_ptr &next_frame, int regnum);
 
 /* Return the symbol's reading requirement.  */
 
@@ -1159,7 +1160,7 @@ extern int symbol_read_needs_frame (struct symbol *);
 
 extern struct value *read_var_value (struct symbol *var,
                                     const struct block *var_block,
-                                    frame_info_ptr frame);
+                                    const frame_info_ptr &frame);
 
 extern struct value *allocate_repeat_value (struct type *type, int count);
 
@@ -1556,7 +1557,7 @@ extern int val_print_string (struct type *elttype, const char *encoding,
 
 extern void print_variable_and_value (const char *name,
                                      struct symbol *var,
-                                     frame_info_ptr frame,
+                                     const frame_info_ptr &frame,
                                      struct ui_file *stream,
                                      int indent);
 
@@ -1667,13 +1668,13 @@ private:
    The size of the pseudo register specifies how many bytes to use.  The
    offset plus the size must not overflow the raw register's size.  */
 
-value *pseudo_from_raw_part (frame_info_ptr next_frame, int pseudo_reg_num,
+value *pseudo_from_raw_part (const frame_info_ptr &next_frame, int pseudo_reg_num,
                             int raw_reg_num, int raw_offset);
 
 /* Write PSEUDO_BUF, the contents of a pseudo register, to part of raw register
    RAW_REG_NUM starting at RAW_OFFSET.  */
 
-void pseudo_to_raw_part (frame_info_ptr next_frame,
+void pseudo_to_raw_part (const frame_info_ptr &next_frame,
                         gdb::array_view<const gdb_byte> pseudo_buf,
                         int raw_reg_num, int raw_offset);
 
@@ -1683,26 +1684,26 @@ void pseudo_to_raw_part (frame_info_ptr next_frame,
    The sum of the sizes of raw registers must be equal to the size of the
    pseudo register.  */
 
-value *pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
+value *pseudo_from_concat_raw (const frame_info_ptr &next_frame, int pseudo_reg_num,
                               int raw_reg_1_num, int raw_reg_2_num);
 
 /* Write PSEUDO_BUF, the contents of a pseudo register, to the two raw registers
    RAW_REG_1_NUM and RAW_REG_2_NUM.  */
 
-void pseudo_to_concat_raw (frame_info_ptr next_frame,
+void pseudo_to_concat_raw (const frame_info_ptr &next_frame,
                           gdb::array_view<const gdb_byte> pseudo_buf,
                           int raw_reg_1_num, int raw_reg_2_num);
 
 /* Same as the above, but with three raw registers.  */
 
-value *pseudo_from_concat_raw (frame_info_ptr next_frame, int pseudo_reg_num,
+value *pseudo_from_concat_raw (const frame_info_ptr &next_frame, int pseudo_reg_num,
                               int raw_reg_1_num, int raw_reg_2_num,
                               int raw_reg_3_num);
 
 /* Write PSEUDO_BUF, the contents of a pseudo register, to the three raw
    registers RAW_REG_1_NUM, RAW_REG_2_NUM and RAW_REG_3_NUM.  */
 
-void pseudo_to_concat_raw (frame_info_ptr next_frame,
+void pseudo_to_concat_raw (const frame_info_ptr &next_frame,
                           gdb::array_view<const gdb_byte> pseudo_buf,
                           int raw_reg_1_num, int raw_reg_2_num,
                           int raw_reg_3_num);
index 979dc1786e0ab2f6bf96810ecbf0caa720bd7498..125f3423be571c0291857dc1d9d0d07da457e86d 100644 (file)
@@ -187,7 +187,7 @@ vax_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
 }
 
 static struct frame_id
-vax_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+vax_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR fp;
 
@@ -303,7 +303,7 @@ struct vax_frame_cache
 };
 
 static struct vax_frame_cache *
-vax_frame_cache (frame_info_ptr this_frame, void **this_cache)
+vax_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct vax_frame_cache *cache;
   CORE_ADDR addr;
@@ -365,7 +365,7 @@ vax_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static void
-vax_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+vax_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                   struct frame_id *this_id)
 {
   struct vax_frame_cache *cache = vax_frame_cache (this_frame, this_cache);
@@ -378,7 +378,7 @@ vax_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-vax_frame_prev_register (frame_info_ptr this_frame,
+vax_frame_prev_register (const frame_info_ptr &this_frame,
                         void **this_cache, int regnum)
 {
   struct vax_frame_cache *cache = vax_frame_cache (this_frame, this_cache);
@@ -399,7 +399,7 @@ static const struct frame_unwind vax_frame_unwind =
 \f
 
 static CORE_ADDR
-vax_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+vax_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct vax_frame_cache *cache = vax_frame_cache (this_frame, this_cache);
 
@@ -407,7 +407,7 @@ vax_frame_base_address (frame_info_ptr this_frame, void **this_cache)
 }
 
 static CORE_ADDR
-vax_frame_args_address (frame_info_ptr this_frame, void **this_cache)
+vax_frame_args_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   return get_frame_register_unsigned (this_frame, VAX_AP_REGNUM);
 }
@@ -423,7 +423,7 @@ static const struct frame_base vax_frame_base =
 /* Return number of arguments for FRAME.  */
 
 static int
-vax_frame_num_args (frame_info_ptr frame)
+vax_frame_num_args (const frame_info_ptr &frame)
 {
   CORE_ADDR args;
 
index b19c9491fd0fc52ad1101d5abf66baa28e27cede..12b16c2d3d36d19404d7c90400cf9899cd47d981 100644 (file)
@@ -306,7 +306,7 @@ static CORE_ADDR
 xstormy16_analyze_prologue (struct gdbarch *gdbarch,
                            CORE_ADDR start_addr, CORE_ADDR end_addr,
                            struct xstormy16_frame_cache *cache,
-                           frame_info_ptr this_frame)
+                           const frame_info_ptr &this_frame)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR next_addr;
@@ -581,7 +581,7 @@ xstormy16_find_jmp_table_entry (struct gdbarch *gdbarch, CORE_ADDR faddr)
 }
 
 static CORE_ADDR
-xstormy16_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
+xstormy16_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   CORE_ADDR tmp = xstormy16_resolve_jmp_table_entry (gdbarch, pc);
@@ -653,7 +653,7 @@ xstormy16_alloc_frame_cache (void)
 }
 
 static struct xstormy16_frame_cache *
-xstormy16_frame_cache (frame_info_ptr this_frame, void **this_cache)
+xstormy16_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct xstormy16_frame_cache *cache;
@@ -689,7 +689,7 @@ xstormy16_frame_cache (frame_info_ptr this_frame, void **this_cache)
 }
 
 static struct value *
-xstormy16_frame_prev_register (frame_info_ptr this_frame, 
+xstormy16_frame_prev_register (const frame_info_ptr &this_frame,
                               void **this_cache, int regnum)
 {
   struct xstormy16_frame_cache *cache = xstormy16_frame_cache (this_frame,
@@ -707,7 +707,7 @@ xstormy16_frame_prev_register (frame_info_ptr this_frame,
 }
 
 static void
-xstormy16_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+xstormy16_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                         struct frame_id *this_id)
 {
   struct xstormy16_frame_cache *cache = xstormy16_frame_cache (this_frame,
@@ -721,7 +721,7 @@ xstormy16_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static CORE_ADDR
-xstormy16_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+xstormy16_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct xstormy16_frame_cache *cache = xstormy16_frame_cache (this_frame,
                                                               this_cache);
index 2563d65f91e213c4448b1f803770402fe371a51e..d116b34fd819a8746d900d337d0383b3abeccc01 100644 (file)
@@ -1026,7 +1026,7 @@ xtensa_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
 
 
 static CORE_ADDR
-xtensa_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
+xtensa_unwind_pc (struct gdbarch *gdbarch, const frame_info_ptr &next_frame)
 {
   gdb_byte buf[8];
   CORE_ADDR pc;
@@ -1044,7 +1044,7 @@ xtensa_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame)
 
 
 static struct frame_id
-xtensa_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
+xtensa_dummy_id (struct gdbarch *gdbarch, const frame_info_ptr &this_frame)
 {
   CORE_ADDR pc, fp;
   xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
@@ -1217,16 +1217,16 @@ done:
        cache->prev_sp = SP of the previous frame.  */
 
 static void
-call0_frame_cache (frame_info_ptr this_frame,
+call0_frame_cache (const frame_info_ptr &this_frame,
                   xtensa_frame_cache_t *cache, CORE_ADDR pc);
 
 static void
-xtensa_window_interrupt_frame_cache (frame_info_ptr this_frame,
+xtensa_window_interrupt_frame_cache (const frame_info_ptr &this_frame,
                                     xtensa_frame_cache_t *cache,
                                     CORE_ADDR pc);
 
 static struct xtensa_frame_cache *
-xtensa_frame_cache (frame_info_ptr this_frame, void **this_cache)
+xtensa_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
 {
   xtensa_frame_cache_t *cache;
   CORE_ADDR ra, wb, ws, pc, sp, ps;
@@ -1392,7 +1392,7 @@ This message will not be repeated in this session.\n"));
 
 
 static void
-xtensa_frame_this_id (frame_info_ptr this_frame,
+xtensa_frame_this_id (const frame_info_ptr &this_frame,
                      void **this_cache,
                      struct frame_id *this_id)
 {
@@ -1406,7 +1406,7 @@ xtensa_frame_this_id (frame_info_ptr this_frame,
 }
 
 static struct value *
-xtensa_frame_prev_register (frame_info_ptr this_frame,
+xtensa_frame_prev_register (const frame_info_ptr &this_frame,
                            void **this_cache,
                            int regnum)
 {
@@ -1509,7 +1509,7 @@ xtensa_unwind =
 };
 
 static CORE_ADDR
-xtensa_frame_base_address (frame_info_ptr this_frame, void **this_cache)
+xtensa_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
 {
   struct xtensa_frame_cache *cache =
     xtensa_frame_cache (this_frame, this_cache);
@@ -2543,7 +2543,7 @@ done:
 /* Initialize frame cache for the current frame in CALL0 ABI.  */
 
 static void
-call0_frame_cache (frame_info_ptr this_frame,
+call0_frame_cache (const frame_info_ptr &this_frame,
                   xtensa_frame_cache_t *cache, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
@@ -2892,7 +2892,7 @@ execute_code (struct gdbarch *gdbarch, CORE_ADDR current_pc, CORE_ADDR wb)
 /* Handle Window Overflow / Underflow exception frames.  */
 
 static void
-xtensa_window_interrupt_frame_cache (frame_info_ptr this_frame,
+xtensa_window_interrupt_frame_cache (const frame_info_ptr &this_frame,
                                     xtensa_frame_cache_t *cache,
                                     CORE_ADDR pc)
 {
index f03eafdc6f726bf02cd861f058ed04e154ebfb8f..f2d000f530306fe13b752772f4f5207282279a50 100644 (file)
@@ -555,7 +555,7 @@ z80_return_value (struct gdbarch *gdbarch, struct value *function,
 
 /* function unwinds current stack frame and returns next one */
 static struct z80_unwind_cache *
-z80_frame_unwind_cache (frame_info_ptr this_frame,
+z80_frame_unwind_cache (const frame_info_ptr &this_frame,
                        void **this_prologue_cache)
 {
   CORE_ADDR start_pc, current_pc;
@@ -658,7 +658,7 @@ z80_frame_unwind_cache (frame_info_ptr this_frame,
 /* Given a GDB frame, determine the address of the calling function's
    frame.  This will be used to create a new GDB frame struct.  */
 static void
-z80_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+z80_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
                   struct frame_id *this_id)
 {
   struct frame_id id;
@@ -682,7 +682,7 @@ z80_frame_this_id (frame_info_ptr this_frame, void **this_cache,
 }
 
 static struct value *
-z80_frame_prev_register (frame_info_ptr this_frame,
+z80_frame_prev_register (const frame_info_ptr &this_frame,
                         void **this_prologue_cache, int regnum)
 {
   struct z80_unwind_cache *info