From bd2b40ac129b167f1a709589dee9c009a04a6e21 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 25 Jul 2022 14:06:35 -0300 Subject: [PATCH] Change GDB to use frame_info_ptr This changes GDB to use frame_info_ptr instead of frame_info * The substitution was done with multiple sequential `sed` commands: sed 's/^struct frame_info;/class frame_info_ptr;/' sed 's/struct frame_info \*/frame_info_ptr /g' - which left some issues in a few files, that were manually fixed. sed 's/\ Approved-by: Tom Tomey --- gdb/aarch64-fbsd-tdep.c | 2 +- gdb/aarch64-linux-tdep.c | 2 +- gdb/aarch64-tdep.c | 34 ++-- gdb/ada-lang.c | 10 +- gdb/ada-lang.h | 4 +- gdb/alpha-linux-tdep.c | 2 +- gdb/alpha-mdebug-tdep.c | 16 +- gdb/alpha-netbsd-tdep.c | 2 +- gdb/alpha-obsd-tdep.c | 2 +- gdb/alpha-tdep.c | 22 +-- gdb/alpha-tdep.h | 2 +- gdb/amd64-darwin-tdep.c | 2 +- gdb/amd64-fbsd-tdep.c | 2 +- gdb/amd64-linux-tdep.c | 6 +- gdb/amd64-netbsd-tdep.c | 4 +- gdb/amd64-obsd-tdep.c | 12 +- gdb/amd64-sol2-tdep.c | 2 +- gdb/amd64-tdep.c | 34 ++-- gdb/amd64-tdep.h | 2 +- gdb/amd64-windows-tdep.c | 12 +- gdb/arc-linux-tdep.c | 4 +- gdb/arc-tdep.c | 20 +- gdb/arc-tdep.h | 4 +- gdb/arch-utils.c | 6 +- gdb/arch-utils.h | 8 +- gdb/arm-fbsd-tdep.c | 2 +- gdb/arm-linux-tdep.c | 14 +- gdb/arm-obsd-tdep.c | 2 +- gdb/arm-tdep.c | 64 +++--- gdb/arm-tdep.h | 4 +- gdb/arm-wince-tdep.c | 2 +- gdb/avr-tdep.c | 14 +- gdb/ax-gdb.c | 2 +- gdb/bfin-linux-tdep.c | 2 +- gdb/bfin-tdep.c | 12 +- gdb/blockframe.c | 8 +- gdb/bpf-tdep.c | 8 +- gdb/break-catch-throw.c | 2 +- gdb/breakpoint.c | 18 +- gdb/c-lang.c | 2 +- gdb/cli/cli-cmds.c | 2 +- gdb/compile/compile-c-symbols.c | 2 +- gdb/compile/compile-cplus-symbols.c | 2 +- gdb/compile/compile-loc2c.c | 2 +- gdb/cp-abi.c | 2 +- gdb/cp-abi.h | 6 +- gdb/cris-tdep.c | 36 ++-- gdb/csky-linux-tdep.c | 4 +- gdb/csky-tdep.c | 22 +-- gdb/defs.h | 2 +- gdb/dtrace-probe.c | 4 +- gdb/dummy-frame.c | 8 +- gdb/dummy-frame.h | 2 +- gdb/dwarf2/expr.c | 20 +- gdb/dwarf2/expr.h | 6 +- gdb/dwarf2/frame-tailcall.c | 41 ++-- gdb/dwarf2/frame-tailcall.h | 6 +- gdb/dwarf2/frame.c | 39 ++-- gdb/dwarf2/frame.h | 12 +- gdb/dwarf2/loc.c | 38 ++-- gdb/dwarf2/loc.h | 8 +- gdb/elfread.c | 2 +- gdb/eval.c | 2 +- gdb/extension-priv.h | 2 +- gdb/extension.c | 2 +- gdb/extension.h | 4 +- gdb/f-valprint.c | 2 +- gdb/findvar.c | 26 +-- gdb/frame-base.c | 8 +- gdb/frame-base.h | 12 +- gdb/frame-unwind.c | 24 +-- gdb/frame-unwind.h | 36 ++-- gdb/frame.c | 292 ++++++++++++++-------------- gdb/frame.h | 152 +++++++-------- gdb/frv-linux-tdep.c | 10 +- gdb/frv-tdep.c | 10 +- gdb/ft32-tdep.c | 8 +- gdb/gcore.c | 2 +- gdb/gdbarch-components.py | 30 +-- gdb/gdbarch-gen.h | 60 +++--- gdb/gdbarch-selftests.c | 2 +- gdb/gdbarch.c | 30 +-- gdb/gdbtypes.h | 5 +- gdb/gnu-v3-abi.c | 2 +- gdb/guile/scm-frame.c | 2 +- gdb/h8300-tdep.c | 12 +- gdb/hppa-bsd-tdep.c | 2 +- gdb/hppa-linux-tdep.c | 8 +- gdb/hppa-netbsd-tdep.c | 4 +- gdb/hppa-tdep.c | 32 +-- gdb/hppa-tdep.h | 8 +- gdb/i386-bsd-tdep.c | 2 +- gdb/i386-darwin-tdep.c | 4 +- gdb/i386-darwin-tdep.h | 2 +- gdb/i386-fbsd-tdep.c | 2 +- gdb/i386-gnu-tdep.c | 6 +- gdb/i386-linux-tdep.c | 10 +- gdb/i386-netbsd-tdep.c | 4 +- gdb/i386-nto-tdep.c | 4 +- gdb/i386-obsd-tdep.c | 10 +- gdb/i386-sol2-tdep.c | 2 +- gdb/i386-tdep.c | 54 ++--- gdb/i386-tdep.h | 10 +- gdb/i386-windows-tdep.c | 2 +- gdb/i387-tdep.c | 6 +- gdb/i387-tdep.h | 8 +- gdb/ia64-libunwind-tdep.c | 12 +- gdb/ia64-libunwind-tdep.h | 12 +- gdb/ia64-tdep.c | 50 ++--- gdb/ia64-tdep.h | 4 +- gdb/infcall.c | 4 +- gdb/infcmd.c | 28 +-- gdb/inferior.h | 6 +- gdb/infrun.c | 32 +-- gdb/infrun.h | 4 +- gdb/inline-frame.c | 14 +- gdb/inline-frame.h | 4 +- gdb/iq2000-tdep.c | 10 +- gdb/jit.c | 12 +- gdb/language.c | 6 +- gdb/language.h | 8 +- gdb/lm32-tdep.c | 8 +- gdb/loongarch-linux-tdep.c | 4 +- gdb/loongarch-tdep.c | 8 +- gdb/loongarch-tdep.h | 2 +- gdb/m32c-tdep.c | 10 +- gdb/m32r-linux-tdep.c | 14 +- gdb/m32r-tdep.c | 8 +- gdb/m68hc11-tdep.c | 16 +- gdb/m68k-linux-tdep.c | 12 +- gdb/m68k-tdep.c | 18 +- gdb/m68k-tdep.h | 2 +- gdb/macroscope.c | 2 +- gdb/mep-tdep.c | 8 +- gdb/mi/mi-cmd-stack.c | 22 +-- gdb/mi/mi-main.c | 10 +- gdb/microblaze-linux-tdep.c | 4 +- gdb/microblaze-tdep.c | 10 +- gdb/minsyms.c | 2 +- gdb/mips-fbsd-tdep.c | 4 +- gdb/mips-linux-tdep.c | 22 +-- gdb/mips-netbsd-tdep.c | 2 +- gdb/mips-sde-tdep.c | 12 +- gdb/mips-tdep.c | 96 ++++----- gdb/mips-tdep.h | 2 +- gdb/mips64-obsd-tdep.c | 2 +- gdb/mn10300-linux-tdep.c | 4 +- gdb/mn10300-tdep.c | 8 +- gdb/moxie-tdep.c | 8 +- gdb/msp430-tdep.c | 10 +- gdb/nds32-tdep.c | 20 +- gdb/nios2-linux-tdep.c | 4 +- gdb/nios2-tdep.c | 22 +-- gdb/nios2-tdep.h | 2 +- gdb/objc-lang.c | 10 +- gdb/observable.h | 2 +- gdb/or1k-linux-tdep.c | 4 +- gdb/or1k-tdep.c | 12 +- gdb/ppc-fbsd-tdep.c | 8 +- gdb/ppc-linux-tdep.c | 12 +- gdb/ppc-netbsd-tdep.c | 2 +- gdb/ppc-obsd-tdep.c | 8 +- gdb/ppc-tdep.h | 4 +- gdb/ppc64-tdep.c | 20 +- gdb/ppc64-tdep.h | 4 +- gdb/printcmd.c | 4 +- gdb/probe.c | 4 +- gdb/probe.h | 4 +- gdb/python/py-event.h | 2 +- gdb/python/py-finishbreakpoint.c | 4 +- gdb/python/py-frame.c | 42 ++-- gdb/python/py-framefilter.c | 22 +-- gdb/python/py-inferior.c | 2 +- gdb/python/py-infevents.c | 4 +- gdb/python/py-symbol.c | 6 +- gdb/python/py-unwind.c | 12 +- gdb/python/python-internal.h | 6 +- gdb/record-btrace.c | 26 +-- gdb/riscv-fbsd-tdep.c | 2 +- gdb/riscv-linux-tdep.c | 6 +- gdb/riscv-tdep.c | 12 +- gdb/riscv-tdep.h | 2 +- gdb/rl78-tdep.c | 12 +- gdb/rs6000-aix-tdep.c | 10 +- gdb/rs6000-tdep.c | 34 ++-- gdb/rx-tdep.c | 16 +- gdb/s12z-tdep.c | 10 +- gdb/s390-linux-tdep.c | 8 +- gdb/s390-tdep.c | 38 ++-- gdb/s390-tdep.h | 2 +- gdb/sentinel-frame.c | 6 +- gdb/sh-linux-tdep.c | 6 +- gdb/sh-tdep.c | 16 +- gdb/skip.c | 2 +- gdb/sol2-tdep.c | 2 +- gdb/sol2-tdep.h | 2 +- gdb/solib-svr4.c | 4 +- gdb/sparc-linux-tdep.c | 6 +- gdb/sparc-netbsd-tdep.c | 12 +- gdb/sparc-obsd-tdep.c | 8 +- gdb/sparc-sol2-tdep.c | 8 +- gdb/sparc-tdep.c | 20 +- gdb/sparc-tdep.h | 12 +- gdb/sparc64-fbsd-tdep.c | 8 +- gdb/sparc64-linux-tdep.c | 8 +- gdb/sparc64-netbsd-tdep.c | 10 +- gdb/sparc64-obsd-tdep.c | 16 +- gdb/sparc64-sol2-tdep.c | 8 +- gdb/sparc64-tdep.c | 10 +- gdb/sparc64-tdep.h | 4 +- gdb/stack.c | 104 +++++----- gdb/stack.h | 4 +- gdb/stap-probe.c | 4 +- gdb/std-regs.c | 8 +- gdb/symfile.h | 2 +- gdb/symtab.h | 10 +- gdb/tic6x-linux-tdep.c | 4 +- gdb/tic6x-tdep.c | 22 +-- gdb/tic6x-tdep.h | 2 +- gdb/tilegx-linux-tdep.c | 2 +- gdb/tilegx-tdep.c | 12 +- gdb/top.c | 2 +- gdb/tracepoint.c | 2 +- gdb/trad-frame.c | 10 +- gdb/trad-frame.h | 10 +- gdb/tramp-frame.c | 10 +- gdb/tramp-frame.h | 6 +- gdb/tui/tui-disasm.c | 2 +- gdb/tui/tui-disasm.h | 2 +- gdb/tui/tui-hooks.c | 6 +- gdb/tui/tui-regs.c | 8 +- gdb/tui/tui-regs.h | 4 +- gdb/tui/tui-source.c | 4 +- gdb/tui/tui-source.h | 2 +- gdb/tui/tui-stack.c | 4 +- gdb/tui/tui-stack.h | 4 +- gdb/tui/tui-winsource.c | 4 +- gdb/tui/tui-winsource.h | 2 +- gdb/user-regs.c | 4 +- gdb/user-regs.h | 6 +- gdb/v850-tdep.c | 10 +- gdb/valops.c | 10 +- gdb/value.c | 4 +- gdb/value.h | 16 +- gdb/varobj.c | 8 +- gdb/vax-tdep.c | 14 +- gdb/xstormy16-tdep.c | 12 +- gdb/xtensa-tdep.c | 22 +-- gdb/z80-tdep.c | 6 +- 249 files changed, 1527 insertions(+), 1522 deletions(-) diff --git a/gdb/aarch64-fbsd-tdep.c b/gdb/aarch64-fbsd-tdep.c index 4a6b4115234..f37729a4d01 100644 --- a/gdb/aarch64-fbsd-tdep.c +++ b/gdb/aarch64-fbsd-tdep.c @@ -80,7 +80,7 @@ static const struct regcache_map_entry aarch64_fbsd_fpregmap[] = static void aarch64_fbsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 15773c75da8..0954e219a25 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -283,7 +283,7 @@ aarch64_linux_restore_vreg (struct trad_frame_cache *cache, int num_regs, static void aarch64_linux_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 78bf1225e97..32e85794ca5 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -216,7 +216,7 @@ class instruction_reader : public abstract_instruction_reader static CORE_ADDR aarch64_frame_unmask_lr (aarch64_gdbarch_tdep *tdep, - struct frame_info *this_frame, CORE_ADDR addr) + frame_info_ptr this_frame, CORE_ADDR addr) { if (tdep->has_pauth () && frame_unwind_register_unsigned (this_frame, @@ -236,7 +236,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 *frame, CORE_ADDR pc) +aarch64_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc) { if (pc != 0 && get_frame_pc_masked (frame)) return "PAC"; @@ -927,7 +927,7 @@ aarch64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) cache CACHE. */ static void -aarch64_scan_prologue (struct frame_info *this_frame, +aarch64_scan_prologue (frame_info_ptr this_frame, struct aarch64_prologue_cache *cache) { CORE_ADDR block_addr = get_frame_address_in_block (this_frame); @@ -981,7 +981,7 @@ aarch64_scan_prologue (struct frame_info *this_frame, not available. */ static void -aarch64_make_prologue_cache_1 (struct frame_info *this_frame, +aarch64_make_prologue_cache_1 (frame_info_ptr this_frame, struct aarch64_prologue_cache *cache) { CORE_ADDR unwound_fp; @@ -1016,7 +1016,7 @@ aarch64_make_prologue_cache_1 (struct frame_info *this_frame, *THIS_CACHE. */ static struct aarch64_prologue_cache * -aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache) +aarch64_make_prologue_cache (frame_info_ptr this_frame, void **this_cache) { struct aarch64_prologue_cache *cache; @@ -1043,7 +1043,7 @@ aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache) /* Implement the "stop_reason" frame_unwind method. */ static enum unwind_stop_reason -aarch64_prologue_frame_unwind_stop_reason (struct frame_info *this_frame, +aarch64_prologue_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct aarch64_prologue_cache *cache @@ -1069,7 +1069,7 @@ aarch64_prologue_frame_unwind_stop_reason (struct frame_info *this_frame, PC and the caller's SP when we were called. */ static void -aarch64_prologue_this_id (struct frame_info *this_frame, +aarch64_prologue_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct aarch64_prologue_cache *cache @@ -1084,7 +1084,7 @@ aarch64_prologue_this_id (struct frame_info *this_frame, /* Implement the "prev_register" frame_unwind method. */ static struct value * -aarch64_prologue_prev_register (struct frame_info *this_frame, +aarch64_prologue_prev_register (frame_info_ptr this_frame, void **this_cache, int prev_regnum) { struct aarch64_prologue_cache *cache @@ -1150,7 +1150,7 @@ static frame_unwind aarch64_prologue_unwind = *THIS_CACHE. */ static struct aarch64_prologue_cache * -aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache) +aarch64_make_stub_cache (frame_info_ptr this_frame, void **this_cache) { struct aarch64_prologue_cache *cache; @@ -1180,7 +1180,7 @@ aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache) /* Implement the "stop_reason" frame_unwind method. */ static enum unwind_stop_reason -aarch64_stub_frame_unwind_stop_reason (struct frame_info *this_frame, +aarch64_stub_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct aarch64_prologue_cache *cache @@ -1195,7 +1195,7 @@ aarch64_stub_frame_unwind_stop_reason (struct frame_info *this_frame, /* Our frame ID for a stub frame is the current SP and LR. */ static void -aarch64_stub_this_id (struct frame_info *this_frame, +aarch64_stub_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct aarch64_prologue_cache *cache @@ -1211,7 +1211,7 @@ aarch64_stub_this_id (struct frame_info *this_frame, static int aarch64_stub_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR addr_in_block; @@ -1242,7 +1242,7 @@ static frame_unwind aarch64_stub_unwind = /* Return the frame base address of *THIS_FRAME. */ static CORE_ADDR -aarch64_normal_frame_base (struct frame_info *this_frame, void **this_cache) +aarch64_normal_frame_base (frame_info_ptr this_frame, void **this_cache) { struct aarch64_prologue_cache *cache = aarch64_make_prologue_cache (this_frame, this_cache); @@ -1263,7 +1263,7 @@ static frame_base aarch64_normal_base = *THIS_FRAME. */ static struct value * -aarch64_dwarf2_prev_register (struct frame_info *this_frame, +aarch64_dwarf2_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { gdbarch *arch = get_frame_arch (this_frame); @@ -1291,7 +1291,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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { aarch64_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2491,7 +2491,7 @@ aarch64_return_value (struct gdbarch *gdbarch, struct value *func_value, /* Implement the "get_longjmp_target" gdbarch method. */ static int -aarch64_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +aarch64_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { CORE_ADDR jb_addr; gdb_byte buf[X_REGISTER_SIZE]; @@ -2921,7 +2921,7 @@ aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache, /* Callback function for user_reg_add. */ static struct value * -value_of_aarch64_user_reg (struct frame_info *frame, const void *baton) +value_of_aarch64_user_reg (frame_info_ptr frame, const void *baton) { const int *reg_p = (const int *) baton; diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index ac23eb5938c..0e3f0daa416 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -11840,7 +11840,7 @@ ada_exception_support_info_sniffer (void) to most users. */ static int -is_known_support_routine (struct frame_info *frame) +is_known_support_routine (frame_info_ptr frame) { enum language func_lang; int i; @@ -11899,7 +11899,7 @@ is_known_support_routine (struct frame_info *frame) part of the Ada run-time, starting from FI and moving upward. */ void -ada_find_printable_frame (struct frame_info *fi) +ada_find_printable_frame (frame_info_ptr fi) { for (; fi != NULL; fi = get_prev_frame (fi)) { @@ -11933,7 +11933,7 @@ static CORE_ADDR ada_unhandled_exception_name_addr_from_raise (void) { int frame_level; - struct frame_info *fi; + frame_info_ptr fi; struct ada_inferior_data *data = get_ada_inferior_data (current_inferior ()); /* To determine the name of this exception, we need to select @@ -13048,7 +13048,7 @@ ada_add_standard_exceptions (compiled_regex *preg, static void ada_add_exceptions_from_frame (compiled_regex *preg, - struct frame_info *frame, + frame_info_ptr frame, std::vector *exceptions) { const struct block *block = get_frame_block (frame, 0); @@ -13477,7 +13477,7 @@ public: struct value *read_var_value (struct symbol *var, const struct block *var_block, - struct frame_info *frame) const override + frame_info_ptr frame) const override { /* The only case where default_read_var_value is not sufficient is when VAR is a renaming... */ diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 0dcdb56c198..df648c2297e 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -20,7 +20,7 @@ #if !defined (ADA_LANG_H) #define ADA_LANG_H 1 -struct frame_info; +class frame_info_ptr; struct inferior; struct type_print_options; struct parser_state; @@ -334,7 +334,7 @@ extern enum ada_renaming_category ada_parse_renaming (struct symbol *, const char **, int *, const char **); -extern void ada_find_printable_frame (struct frame_info *fi); +extern void ada_find_printable_frame (frame_info_ptr fi); extern char *ada_breakpoint_rewrite (char *, int *); diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c index c103aafc1ff..3a6a9aea160 100644 --- a/gdb/alpha-linux-tdep.c +++ b/gdb/alpha-linux-tdep.c @@ -126,7 +126,7 @@ alpha_linux_pc_in_sigtramp (struct gdbarch *gdbarch, } static CORE_ADDR -alpha_linux_sigcontext_addr (struct frame_info *this_frame) +alpha_linux_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR pc; diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c index 10169c76c37..01f84f7fc3e 100644 --- a/gdb/alpha-mdebug-tdep.c +++ b/gdb/alpha-mdebug-tdep.c @@ -187,7 +187,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 (struct frame_info *this_frame, +alpha_mdebug_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { struct alpha_mdebug_unwind_cache *info; @@ -264,7 +264,7 @@ alpha_mdebug_frame_unwind_cache (struct frame_info *this_frame, frame. This will be used to create a new GDB frame struct. */ static void -alpha_mdebug_frame_this_id (struct frame_info *this_frame, +alpha_mdebug_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -277,7 +277,7 @@ alpha_mdebug_frame_this_id (struct frame_info *this_frame, /* Retrieve the value of REGNUM in FRAME. Don't give up! */ static struct value * -alpha_mdebug_frame_prev_register (struct frame_info *this_frame, +alpha_mdebug_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct alpha_mdebug_unwind_cache *info @@ -308,7 +308,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, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_address_in_block (this_frame); @@ -345,7 +345,7 @@ static const struct frame_unwind alpha_mdebug_frame_unwind = }; static CORE_ADDR -alpha_mdebug_frame_base_address (struct frame_info *this_frame, +alpha_mdebug_frame_base_address (frame_info_ptr this_frame, void **this_prologue_cache) { struct alpha_mdebug_unwind_cache *info @@ -355,7 +355,7 @@ alpha_mdebug_frame_base_address (struct frame_info *this_frame, } static CORE_ADDR -alpha_mdebug_frame_locals_address (struct frame_info *this_frame, +alpha_mdebug_frame_locals_address (frame_info_ptr this_frame, void **this_prologue_cache) { struct alpha_mdebug_unwind_cache *info @@ -365,7 +365,7 @@ alpha_mdebug_frame_locals_address (struct frame_info *this_frame, } static CORE_ADDR -alpha_mdebug_frame_args_address (struct frame_info *this_frame, +alpha_mdebug_frame_args_address (frame_info_ptr this_frame, void **this_prologue_cache) { struct alpha_mdebug_unwind_cache *info @@ -382,7 +382,7 @@ static const struct frame_base alpha_mdebug_frame_base = { }; static const struct frame_base * -alpha_mdebug_frame_base_sniffer (struct frame_info *this_frame) +alpha_mdebug_frame_base_sniffer (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_address_in_block (this_frame); struct mdebug_extra_func_info *proc_desc; diff --git a/gdb/alpha-netbsd-tdep.c b/gdb/alpha-netbsd-tdep.c index 72d7019377f..ae2deca2c85 100644 --- a/gdb/alpha-netbsd-tdep.c +++ b/gdb/alpha-netbsd-tdep.c @@ -235,7 +235,7 @@ alphanbsd_pc_in_sigtramp (struct gdbarch *gdbarch, } static CORE_ADDR -alphanbsd_sigcontext_addr (struct frame_info *frame) +alphanbsd_sigcontext_addr (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 diff --git a/gdb/alpha-obsd-tdep.c b/gdb/alpha-obsd-tdep.c index c0d672c3f72..41c376c6503 100644 --- a/gdb/alpha-obsd-tdep.c +++ b/gdb/alpha-obsd-tdep.c @@ -69,7 +69,7 @@ alphaobsd_pc_in_sigtramp (struct gdbarch *gdbarch, } static CORE_ADDR -alphaobsd_sigcontext_addr (struct frame_info *this_frame) +alphaobsd_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR pc = get_frame_pc (this_frame); diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 9b3dbca8cde..646d4270636 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -234,7 +234,7 @@ alpha_convert_register_p (struct gdbarch *gdbarch, int regno, } static int -alpha_register_to_value (struct frame_info *frame, int regnum, +alpha_register_to_value (frame_info_ptr frame, int regnum, struct type *valtype, gdb_byte *out, int *optimizedp, int *unavailablep) { @@ -261,7 +261,7 @@ alpha_register_to_value (struct frame_info *frame, int regnum, } static void -alpha_value_to_register (struct frame_info *frame, int regnum, +alpha_value_to_register (frame_info_ptr frame, int regnum, struct type *valtype, const gdb_byte *in) { gdb_byte out[ALPHA_REGISTER_SIZE]; @@ -844,7 +844,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 (struct frame_info *frame, CORE_ADDR *pc) +alpha_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { struct gdbarch *gdbarch = get_frame_arch (frame); alpha_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -875,7 +875,7 @@ struct alpha_sigtramp_unwind_cache }; static struct alpha_sigtramp_unwind_cache * -alpha_sigtramp_frame_unwind_cache (struct frame_info *this_frame, +alpha_sigtramp_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { struct alpha_sigtramp_unwind_cache *info; @@ -916,7 +916,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 (struct frame_info *this_frame, +alpha_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -958,7 +958,7 @@ alpha_sigtramp_frame_this_id (struct frame_info *this_frame, /* Retrieve the value of REGNUM in FRAME. Don't give up! */ static struct value * -alpha_sigtramp_frame_prev_register (struct frame_info *this_frame, +alpha_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct alpha_sigtramp_unwind_cache *info @@ -983,7 +983,7 @@ alpha_sigtramp_frame_prev_register (struct frame_info *this_frame, static int alpha_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1225,7 +1225,7 @@ alpha_heuristic_analyze_probing_loop (struct gdbarch *gdbarch, CORE_ADDR *pc, } static struct alpha_heuristic_unwind_cache * -alpha_heuristic_frame_unwind_cache (struct frame_info *this_frame, +alpha_heuristic_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache, CORE_ADDR start_pc) { @@ -1402,7 +1402,7 @@ alpha_heuristic_frame_unwind_cache (struct frame_info *this_frame, frame. This will be used to create a new GDB frame struct. */ static void -alpha_heuristic_frame_this_id (struct frame_info *this_frame, +alpha_heuristic_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -1415,7 +1415,7 @@ alpha_heuristic_frame_this_id (struct frame_info *this_frame, /* Retrieve the value of REGNUM in FRAME. Don't give up! */ static struct value * -alpha_heuristic_frame_prev_register (struct frame_info *this_frame, +alpha_heuristic_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct alpha_heuristic_unwind_cache *info @@ -1442,7 +1442,7 @@ static const struct frame_unwind alpha_heuristic_frame_unwind = }; static CORE_ADDR -alpha_heuristic_frame_base_address (struct frame_info *this_frame, +alpha_heuristic_frame_base_address (frame_info_ptr this_frame, void **this_prologue_cache) { struct alpha_heuristic_unwind_cache *info diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h index bc4a8407249..c12d7ec92ae 100644 --- a/gdb/alpha-tdep.h +++ b/gdb/alpha-tdep.h @@ -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) (struct frame_info *) = nullptr; + CORE_ADDR (*sigcontext_addr) (frame_info_ptr ) = nullptr; /* Does the PC fall in a signal trampoline. */ /* NOTE: cagney/2004-04-30: Do not copy/clone this code. Instead diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c index 718bf4996e5..86819cf148f 100644 --- a/gdb/amd64-darwin-tdep.c +++ b/gdb/amd64-darwin-tdep.c @@ -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 (struct frame_info *this_frame) +amd64_darwin_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/amd64-fbsd-tdep.c b/gdb/amd64-fbsd-tdep.c index 8e40283d838..960bb0b5942 100644 --- a/gdb/amd64-fbsd-tdep.c +++ b/gdb/amd64-fbsd-tdep.c @@ -169,7 +169,7 @@ const struct regset amd64_fbsd_segbases_regset = static void amd64_fbsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 35703a36785..07c1669f91e 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -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 (struct frame_info *this_frame) +amd64_linux_sigtramp_start (frame_info_ptr this_frame) { struct gdbarch *gdbarch; const gdb_byte *sigtramp_code; @@ -175,7 +175,7 @@ amd64_linux_sigtramp_start (struct frame_info *this_frame) routine. */ static int -amd64_linux_sigtramp_p (struct frame_info *this_frame) +amd64_linux_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; @@ -201,7 +201,7 @@ amd64_linux_sigtramp_p (struct frame_info *this_frame) address of the associated sigcontext structure. */ static CORE_ADDR -amd64_linux_sigcontext_addr (struct frame_info *this_frame) +amd64_linux_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/amd64-netbsd-tdep.c b/gdb/amd64-netbsd-tdep.c index 59d723caa55..ec6906c12fb 100644 --- a/gdb/amd64-netbsd-tdep.c +++ b/gdb/amd64-netbsd-tdep.c @@ -35,7 +35,7 @@ routine. */ static int -amd64nbsd_sigtramp_p (struct frame_info *this_frame) +amd64nbsd_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; @@ -48,7 +48,7 @@ amd64nbsd_sigtramp_p (struct frame_info *this_frame) return the address of the associated mcontext structure. */ static CORE_ADDR -amd64nbsd_mcontext_addr (struct frame_info *this_frame) +amd64nbsd_mcontext_addr (frame_info_ptr this_frame) { CORE_ADDR addr; diff --git a/gdb/amd64-obsd-tdep.c b/gdb/amd64-obsd-tdep.c index f0bc7c474a6..22cf7f5d6c2 100644 --- a/gdb/amd64-obsd-tdep.c +++ b/gdb/amd64-obsd-tdep.c @@ -45,7 +45,7 @@ static const int amd64obsd_page_size = 4096; routine. */ static int -amd64obsd_sigtramp_p (struct frame_info *this_frame) +amd64obsd_sigtramp_p (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 (struct frame_info *this_frame) address of the associated sigcontext structure. */ static CORE_ADDR -amd64obsd_sigcontext_addr (struct frame_info *this_frame) +amd64obsd_sigcontext_addr (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 (struct frame_info *this_frame, void **this_cache) +amd64obsd_trapframe_cache (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 (struct frame_info *this_frame, void **this_cache) } static void -amd64obsd_trapframe_this_id (struct frame_info *this_frame, +amd64obsd_trapframe_this_id (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 (struct frame_info *this_frame, } static struct value * -amd64obsd_trapframe_prev_register (struct frame_info *this_frame, +amd64obsd_trapframe_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct trad_frame_cache *cache = @@ -383,7 +383,7 @@ amd64obsd_trapframe_prev_register (struct frame_info *this_frame, static int amd64obsd_trapframe_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { ULONGEST cs; diff --git a/gdb/amd64-sol2-tdep.c b/gdb/amd64-sol2-tdep.c index ce96eb045ec..f62240fcd55 100644 --- a/gdb/amd64-sol2-tdep.c +++ b/gdb/amd64-sol2-tdep.c @@ -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 (struct frame_info *this_frame) +amd64_sol2_mcontext_addr (frame_info_ptr this_frame) { CORE_ADDR sp, ucontext_addr; diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index ea2b3b1ecc3..ccdceeef0e5 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2560,7 +2560,7 @@ amd64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) /* Normal frames. */ static void -amd64_frame_cache_1 (struct frame_info *this_frame, +amd64_frame_cache_1 (frame_info_ptr this_frame, struct amd64_frame_cache *cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2629,7 +2629,7 @@ amd64_frame_cache_1 (struct frame_info *this_frame, } static struct amd64_frame_cache * -amd64_frame_cache (struct frame_info *this_frame, void **this_cache) +amd64_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct amd64_frame_cache *cache; @@ -2653,7 +2653,7 @@ amd64_frame_cache (struct frame_info *this_frame, void **this_cache) } static enum unwind_stop_reason -amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +amd64_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct amd64_frame_cache *cache = @@ -2670,7 +2670,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, } static void -amd64_frame_this_id (struct frame_info *this_frame, void **this_cache, +amd64_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct amd64_frame_cache *cache = @@ -2688,7 +2688,7 @@ amd64_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -amd64_frame_prev_register (struct frame_info *this_frame, void **this_cache, +amd64_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2742,7 +2742,7 @@ amd64_gen_return_address (struct gdbarch *gdbarch, on both platforms. */ static struct amd64_frame_cache * -amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) +amd64_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); i386_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2782,7 +2782,7 @@ amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) } static enum unwind_stop_reason -amd64_sigtramp_frame_unwind_stop_reason (struct frame_info *this_frame, +amd64_sigtramp_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct amd64_frame_cache *cache = @@ -2795,7 +2795,7 @@ amd64_sigtramp_frame_unwind_stop_reason (struct frame_info *this_frame, } static void -amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +amd64_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct amd64_frame_cache *cache = @@ -2813,7 +2813,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -amd64_sigtramp_frame_prev_register (struct frame_info *this_frame, +amd64_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { /* Make sure we've initialized the cache. */ @@ -2824,7 +2824,7 @@ amd64_sigtramp_frame_prev_register (struct frame_info *this_frame, static int amd64_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { gdbarch *arch = get_frame_arch (this_frame); @@ -2866,7 +2866,7 @@ static const struct frame_unwind amd64_sigtramp_frame_unwind = static CORE_ADDR -amd64_frame_base_address (struct frame_info *this_frame, void **this_cache) +amd64_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct amd64_frame_cache *cache = amd64_frame_cache (this_frame, this_cache); @@ -2911,7 +2911,7 @@ amd64_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc) static int amd64_epilogue_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { if (frame_relative_level (this_frame) == 0) @@ -2922,7 +2922,7 @@ amd64_epilogue_frame_sniffer (const struct frame_unwind *self, } static struct amd64_frame_cache * -amd64_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) +amd64_epilogue_frame_cache (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); @@ -2963,7 +2963,7 @@ amd64_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) } static enum unwind_stop_reason -amd64_epilogue_frame_unwind_stop_reason (struct frame_info *this_frame, +amd64_epilogue_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct amd64_frame_cache *cache @@ -2976,7 +2976,7 @@ amd64_epilogue_frame_unwind_stop_reason (struct frame_info *this_frame, } static void -amd64_epilogue_frame_this_id (struct frame_info *this_frame, +amd64_epilogue_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -3001,7 +3001,7 @@ static const struct frame_unwind amd64_epilogue_frame_unwind = }; static struct frame_id -amd64_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +amd64_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR fp; @@ -3064,7 +3064,7 @@ const struct regset amd64_fpregset = success. */ static int -amd64_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +amd64_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { gdb_byte buf[8]; CORE_ADDR jb_addr; diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h index c18766e71c4..df85c60c19c 100644 --- a/gdb/amd64-tdep.h +++ b/gdb/amd64-tdep.h @@ -22,7 +22,7 @@ #define AMD64_TDEP_H struct gdbarch; -struct frame_info; +class frame_info_ptr; struct regcache; #include "i386-tdep.h" diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c index 8573e4c0676..0cc5feec2a4 100644 --- a/gdb/amd64-windows-tdep.c +++ b/gdb/amd64-windows-tdep.c @@ -513,7 +513,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 (struct frame_info *this_frame, +amd64_windows_frame_decode_epilogue (frame_info_ptr this_frame, struct amd64_windows_frame_cache *cache) { /* According to MSDN an epilogue "must consist of either an add RSP,constant @@ -693,7 +693,7 @@ amd64_windows_frame_decode_epilogue (struct frame_info *this_frame, /* Decode and execute unwind insns at UNWIND_INFO. */ static void -amd64_windows_frame_decode_insns (struct frame_info *this_frame, +amd64_windows_frame_decode_insns (frame_info_ptr this_frame, struct amd64_windows_frame_cache *cache, CORE_ADDR unwind_info) { @@ -1073,7 +1073,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 (struct frame_info *this_frame, void **this_cache) +amd64_windows_frame_cache (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); @@ -1118,7 +1118,7 @@ amd64_windows_frame_cache (struct frame_info *this_frame, void **this_cache) using the standard Windows x64 SEH info. */ static struct value * -amd64_windows_frame_prev_register (struct frame_info *this_frame, +amd64_windows_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1164,7 +1164,7 @@ amd64_windows_frame_prev_register (struct frame_info *this_frame, the standard Windows x64 SEH info. */ static void -amd64_windows_frame_this_id (struct frame_info *this_frame, void **this_cache, +amd64_windows_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct amd64_windows_frame_cache *cache = @@ -1230,7 +1230,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 (struct frame_info *frame, CORE_ADDR pc) +amd64_windows_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { CORE_ADDR destination = 0; struct gdbarch *gdbarch = get_frame_arch (frame); diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c index d72bdaf24ac..da7f4758c19 100644 --- a/gdb/arc-linux-tdep.c +++ b/gdb/arc-linux-tdep.c @@ -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 (struct frame_info *this_frame) +arc_linux_is_sigtramp (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 (struct frame_info *this_frame) etc) in GDB hardcode values. */ static CORE_ADDR -arc_linux_sigcontext_addr (struct frame_info *this_frame) +arc_linux_sigcontext_addr (frame_info_ptr this_frame) { const int ucontext_offset = 0x80; const int sigcontext_offset = 0x14; diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index ee5cd87407e..edca4d0803d 100644 --- a/gdb/arc-tdep.c +++ b/gdb/arc-tdep.c @@ -997,7 +997,7 @@ arc_store_return_value (struct gdbarch *gdbarch, struct type *type, /* Implement the "get_longjmp_target" gdbarch method. */ static int -arc_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +arc_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { arc_debug_printf ("called"); @@ -1061,7 +1061,7 @@ arc_return_value (struct gdbarch *gdbarch, struct value *function, frame pointer. */ static CORE_ADDR -arc_frame_base_address (struct frame_info *this_frame, void **prologue_cache) +arc_frame_base_address (frame_info_ptr this_frame, void **prologue_cache) { return (CORE_ADDR) get_frame_register_unsigned (this_frame, ARC_FP_REGNUM); } @@ -1642,7 +1642,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 (struct frame_info *this_frame) +arc_make_frame_cache (frame_info_ptr this_frame) { arc_debug_printf ("called"); @@ -1709,7 +1709,7 @@ arc_make_frame_cache (struct frame_info *this_frame) /* Implement the "this_id" frame_unwind method. */ static void -arc_frame_this_id (struct frame_info *this_frame, void **this_cache, +arc_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { arc_debug_printf ("called"); @@ -1754,7 +1754,7 @@ arc_frame_this_id (struct frame_info *this_frame, void **this_cache, /* Implement the "prev_register" frame_unwind method. */ static struct value * -arc_frame_prev_register (struct frame_info *this_frame, +arc_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { if (*this_cache == NULL) @@ -1791,7 +1791,7 @@ arc_frame_prev_register (struct frame_info *this_frame, static void arc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, - struct frame_info *info) + frame_info_ptr info) { if (regnum == gdbarch_pc_regnum (gdbarch)) /* The return address column. */ @@ -1805,7 +1805,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 (struct frame_info *this_frame) +arc_make_sigtramp_frame_cache (frame_info_ptr this_frame) { arc_debug_printf ("called"); @@ -1844,7 +1844,7 @@ arc_make_sigtramp_frame_cache (struct frame_info *this_frame) frames. */ static void -arc_sigtramp_frame_this_id (struct frame_info *this_frame, +arc_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { arc_debug_printf ("called"); @@ -1863,7 +1863,7 @@ arc_sigtramp_frame_this_id (struct frame_info *this_frame, /* Get a register from a signal handler frame. */ static struct value * -arc_sigtramp_frame_prev_register (struct frame_info *this_frame, +arc_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { arc_debug_printf ("regnum = %d", regnum); @@ -1881,7 +1881,7 @@ arc_sigtramp_frame_prev_register (struct frame_info *this_frame, static int arc_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { arc_debug_printf ("called"); diff --git a/gdb/arc-tdep.h b/gdb/arc-tdep.h index eba435f62f0..56e0c49ae71 100644 --- a/gdb/arc-tdep.h +++ b/gdb/arc-tdep.h @@ -131,10 +131,10 @@ struct arc_gdbarch_tdep : gdbarch_tdep_base bool has_hw_loops = false; /* Detect sigtramp. */ - bool (*is_sigtramp) (struct frame_info *) = nullptr; + bool (*is_sigtramp) (frame_info_ptr ) = nullptr; /* Get address of sigcontext for sigtramp. */ - CORE_ADDR (*sigcontext_addr) (struct frame_info *) = nullptr; + CORE_ADDR (*sigcontext_addr) (frame_info_ptr ) = nullptr; /* Offset of registers in `struct sigcontext'. */ const int *sc_reg_offset = nullptr; diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 77269425ddc..100348444c0 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -132,7 +132,7 @@ default_get_memtag (struct gdbarch *gdbarch, struct value *address, } CORE_ADDR -generic_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) +generic_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { return 0; } @@ -158,7 +158,7 @@ generic_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc) int default_code_of_frame_writable (struct gdbarch *gdbarch, - struct frame_info *frame) + frame_info_ptr frame) { return 1; } @@ -1077,7 +1077,7 @@ default_type_align (struct gdbarch *gdbarch, struct type *type) /* See arch-utils.h. */ std::string -default_get_pc_address_flags (frame_info *frame, CORE_ADDR pc) +default_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc) { return ""; } diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index f850e5fd6e7..f6229f434fd 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -22,7 +22,7 @@ #include "gdbarch.h" -struct frame_info; +class frame_info_ptr; struct minimal_symbol; struct type; struct gdbarch_info; @@ -154,7 +154,7 @@ struct value *default_get_memtag (struct gdbarch *gdbarch, struct value *address, memtag_type tag_type); -extern CORE_ADDR generic_skip_trampoline_code (struct frame_info *frame, +extern CORE_ADDR generic_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc); extern CORE_ADDR generic_skip_solib_resolver (struct gdbarch *gdbarch, @@ -167,7 +167,7 @@ extern int generic_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc); extern int default_code_of_frame_writable (struct gdbarch *gdbarch, - struct frame_info *frame); + frame_info_ptr frame); /* By default, registers are not convertible. */ extern int generic_convert_register_p (struct gdbarch *gdbarch, int regnum, @@ -291,7 +291,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 *frame, +extern std::string default_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc); /* Default implementation of gdbarch read_core_file_mappings method. */ diff --git a/gdb/arm-fbsd-tdep.c b/gdb/arm-fbsd-tdep.c index 61c8f0cecad..dabbceb743a 100644 --- a/gdb/arm-fbsd-tdep.c +++ b/gdb/arm-fbsd-tdep.c @@ -97,7 +97,7 @@ static const struct regcache_map_entry arm_fbsd_vfpregmap[] = static void arm_fbsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 1feb69fe6dd..86ab5794b37 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -277,7 +277,7 @@ static struct arm_get_next_pcs_ops arm_linux_get_next_pcs_ops = { }; static void -arm_linux_sigtramp_cache (struct frame_info *this_frame, +arm_linux_sigtramp_cache (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 (struct frame_info *this_frame, /* See arm-linux.h for stack layout details. */ static void arm_linux_sigreturn_init (const struct tramp_frame *self, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { @@ -755,7 +755,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 (struct frame_info *frame, +arm_linux_sigreturn_return_addr (frame_info_ptr frame, unsigned long svc_number, CORE_ADDR *pc, int *is_thumb) { @@ -975,7 +975,7 @@ arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs, { CORE_ADDR return_to = 0; - struct frame_info *frame; + frame_info_ptr frame; unsigned int svc_number = displaced_read_reg (regs, dsc, 7); int is_sigreturn = 0; int is_thumb; @@ -1687,7 +1687,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 (struct frame_info *frame, CORE_ADDR pc) +arm_linux_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { CORE_ADDR target_pc = arm_skip_stub (frame, pc); diff --git a/gdb/arm-obsd-tdep.c b/gdb/arm-obsd-tdep.c index 634c76b7561..697f0756112 100644 --- a/gdb/arm-obsd-tdep.c +++ b/gdb/arm-obsd-tdep.c @@ -30,7 +30,7 @@ static void armobsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *cache, CORE_ADDR func) { diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index d357066653b..041e6afefed 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -329,7 +329,7 @@ reconstruct_t_bit(struct gdbarch *gdbarch, CORE_ADDR lr, ULONGEST psr) static inline void arm_cache_init_sp (int regnum, CORE_ADDR* member, struct arm_prologue_cache *cache, - struct frame_info *frame) + frame_info_ptr frame) { CORE_ADDR val = get_frame_register_unsigned (frame, regnum); if (val == cache->sp) @@ -352,7 +352,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, struct frame_info *frame) +arm_cache_init (struct arm_prologue_cache *cache, frame_info_ptr frame) { struct gdbarch *gdbarch = get_frame_arch (frame); arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -578,7 +578,7 @@ arm_is_thumb (struct regcache *regcache) frame. */ int -arm_frame_is_thumb (struct frame_info *frame) +arm_frame_is_thumb (frame_info_ptr frame) { /* Check the architecture of FRAME. */ struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2119,7 +2119,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch, } static void -arm_scan_prologue (struct frame_info *this_frame, +arm_scan_prologue (frame_info_ptr this_frame, struct arm_prologue_cache *cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2216,7 +2216,7 @@ arm_scan_prologue (struct frame_info *this_frame, } static struct arm_prologue_cache * -arm_make_prologue_cache (struct frame_info *this_frame) +arm_make_prologue_cache (frame_info_ptr this_frame) { int reg; struct arm_prologue_cache *cache; @@ -2250,7 +2250,7 @@ arm_make_prologue_cache (struct frame_info *this_frame) /* Implementation of the stop_reason hook for arm_prologue frames. */ static enum unwind_stop_reason -arm_prologue_unwind_stop_reason (struct frame_info *this_frame, +arm_prologue_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct arm_prologue_cache *cache; @@ -2278,7 +2278,7 @@ arm_prologue_unwind_stop_reason (struct frame_info *this_frame, and the caller's SP when we were called. */ static void -arm_prologue_this_id (struct frame_info *this_frame, +arm_prologue_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -2306,7 +2306,7 @@ arm_prologue_this_id (struct frame_info *this_frame, } static struct value * -arm_prologue_prev_register (struct frame_info *this_frame, +arm_prologue_prev_register (frame_info_ptr this_frame, void **this_cache, int prev_regnum) { @@ -2702,7 +2702,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 (struct frame_info *this_frame, gdb_byte *entry) +arm_exidx_fill_cache (frame_info_ptr this_frame, gdb_byte *entry) { CORE_ADDR vsp = 0; int vsp_valid = 0; @@ -3000,7 +3000,7 @@ arm_exidx_fill_cache (struct frame_info *this_frame, gdb_byte *entry) static int arm_exidx_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -3099,7 +3099,7 @@ struct frame_unwind arm_exidx_unwind = { }; static struct arm_prologue_cache * -arm_make_epilogue_frame_cache (struct frame_info *this_frame) +arm_make_epilogue_frame_cache (frame_info_ptr this_frame) { struct arm_prologue_cache *cache; int reg; @@ -3131,7 +3131,7 @@ arm_make_epilogue_frame_cache (struct frame_info *this_frame) 'struct frame_uwnind' for epilogue unwinder. */ static void -arm_epilogue_frame_this_id (struct frame_info *this_frame, +arm_epilogue_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -3159,7 +3159,7 @@ arm_epilogue_frame_this_id (struct frame_info *this_frame, 'struct frame_uwnind' for epilogue unwinder. */ static struct value * -arm_epilogue_frame_prev_register (struct frame_info *this_frame, +arm_epilogue_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { if (*this_cache == NULL) @@ -3178,7 +3178,7 @@ static int thumb_stack_frame_destroyed_p (struct gdbarch *gdbarch, static int arm_epilogue_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { if (frame_relative_level (this_frame) == 0) @@ -3235,7 +3235,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 (struct frame_info *frame, CORE_ADDR pc) +arm_skip_bx_reg (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'. */ @@ -3267,7 +3267,7 @@ arm_skip_bx_reg (struct frame_info *frame, CORE_ADDR pc) } static struct arm_prologue_cache * -arm_make_stub_cache (struct frame_info *this_frame) +arm_make_stub_cache (frame_info_ptr this_frame) { struct arm_prologue_cache *cache; @@ -3286,7 +3286,7 @@ arm_make_stub_cache (struct frame_info *this_frame) /* Our frame ID for a stub frame is the current SP and LR. */ static void -arm_stub_this_id (struct frame_info *this_frame, +arm_stub_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -3304,7 +3304,7 @@ arm_stub_this_id (struct frame_info *this_frame, static int arm_stub_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR addr_in_block; @@ -3342,7 +3342,7 @@ struct frame_unwind arm_stub_unwind = { returned. */ static struct arm_prologue_cache * -arm_m_exception_cache (struct frame_info *this_frame) +arm_m_exception_cache (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -3693,7 +3693,7 @@ arm_m_exception_cache (struct frame_info *this_frame) 'struct frame_uwnind'. */ static void -arm_m_exception_this_id (struct frame_info *this_frame, +arm_m_exception_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -3714,7 +3714,7 @@ arm_m_exception_this_id (struct frame_info *this_frame, 'struct frame_uwnind'. */ static struct value * -arm_m_exception_prev_register (struct frame_info *this_frame, +arm_m_exception_prev_register (frame_info_ptr this_frame, void **this_cache, int prev_regnum) { @@ -3779,7 +3779,7 @@ arm_m_exception_prev_register (struct frame_info *this_frame, static int arm_m_exception_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -3806,7 +3806,7 @@ struct frame_unwind arm_m_exception_unwind = }; static CORE_ADDR -arm_normal_frame_base (struct frame_info *this_frame, void **this_cache) +arm_normal_frame_base (frame_info_ptr this_frame, void **this_cache) { struct arm_prologue_cache *cache; @@ -3827,7 +3827,7 @@ struct frame_base arm_normal_base = { }; static struct value * -arm_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache, +arm_dwarf2_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch * gdbarch = get_frame_arch (this_frame); @@ -3925,7 +3925,7 @@ arm_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache, if (override_with_sp_value) { /* Use value of SP from previous frame. */ - struct frame_info *prev_frame = get_prev_frame (this_frame); + frame_info_ptr prev_frame = get_prev_frame (this_frame); if (prev_frame) val = get_frame_register_unsigned (prev_frame, ARM_SP_REGNUM); else @@ -4710,7 +4710,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, - struct frame_info *frame, const char *args) + frame_info_ptr frame, const char *args) { unsigned long status = get_frame_register_unsigned (frame, ARM_FPS_REGNUM); int type; @@ -5054,7 +5054,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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -9099,7 +9099,7 @@ arm_return_value (struct gdbarch *gdbarch, struct value *function, static int -arm_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +arm_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { struct gdbarch *gdbarch = get_frame_arch (frame); arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -9171,7 +9171,7 @@ arm_is_sgstubs_section (struct obj_section *sec) return the target PC. Otherwise return 0. */ CORE_ADDR -arm_skip_stub (struct frame_info *frame, CORE_ADDR pc) +arm_skip_stub (frame_info_ptr frame, CORE_ADDR pc) { const char *name; int namelen; @@ -9720,7 +9720,7 @@ arm_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache, } static struct value * -value_of_arm_user_reg (struct frame_info *frame, const void *baton) +value_of_arm_user_reg (frame_info_ptr frame, const void *baton) { const int *reg_p = (const int *) baton; return value_of_register (*reg_p, frame); @@ -9814,7 +9814,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, struct frame_info *frame) +arm_code_of_frame_writable (struct gdbarch *gdbarch, frame_info_ptr frame) { arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -9842,7 +9842,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 *frame, CORE_ADDR pc) +arm_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc) { if (get_frame_pc_masked (frame)) return "PAC"; diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h index 67dd1151da4..47b0270c5c2 100644 --- a/gdb/arm-tdep.h +++ b/gdb/arm-tdep.h @@ -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 (struct frame_info *, CORE_ADDR); +CORE_ADDR arm_skip_stub (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 arm_software_single_step (struct regcache *); int arm_is_thumb (struct regcache *regcache); -int arm_frame_is_thumb (struct frame_info *frame); +int arm_frame_is_thumb (frame_info_ptr frame); extern void arm_displaced_step_fixup (struct gdbarch *, displaced_step_copy_insn_closure *, diff --git a/gdb/arm-wince-tdep.c b/gdb/arm-wince-tdep.c index 5063b308809..6ec3c04b5a8 100644 --- a/gdb/arm-wince-tdep.c +++ b/gdb/arm-wince-tdep.c @@ -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 (struct frame_info *frame, CORE_ADDR pc) +arm_pe_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 2d8f91f3240..41ffa046b40 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -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 (struct frame_info *this_frame, +avr_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR start_pc, current_pc; @@ -1059,7 +1059,7 @@ avr_frame_unwind_cache (struct frame_info *this_frame, } static CORE_ADDR -avr_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +avr_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { ULONGEST pc; @@ -1069,7 +1069,7 @@ avr_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) } static CORE_ADDR -avr_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) +avr_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame) { ULONGEST sp; @@ -1082,7 +1082,7 @@ avr_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) frame. This will be used to create a new GDB frame struct. */ static void -avr_frame_this_id (struct frame_info *this_frame, +avr_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -1107,7 +1107,7 @@ avr_frame_this_id (struct frame_info *this_frame, } static struct value * -avr_frame_prev_register (struct frame_info *this_frame, +avr_frame_prev_register (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 (struct frame_info *this_frame, void **this_cache) +avr_frame_base_address (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, struct frame_info *this_frame) +avr_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { ULONGEST base; diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index a52a5bf2596..3a223b34ba3 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -2567,7 +2567,7 @@ maint_agent_eval_command (const char *exp, int from_tty) static void maint_agent_printf_command (const char *cmdrest, int from_tty) { - struct frame_info *fi = get_current_frame (); /* need current scope */ + frame_info_ptr fi = get_current_frame (); /* need current scope */ const char *format_start, *format_end; /* We don't deal with overlay debugging at the moment. We need to diff --git a/gdb/bfin-linux-tdep.c b/gdb/bfin-linux-tdep.c index 6c4023da9f5..873cb017e82 100644 --- a/gdb/bfin-linux-tdep.c +++ b/gdb/bfin-linux-tdep.c @@ -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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index dc1ee51d103..cdaa8111472 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -288,7 +288,7 @@ bfin_alloc_frame_cache (void) } static struct bfin_frame_cache * -bfin_frame_cache (struct frame_info *this_frame, void **this_cache) +bfin_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct bfin_frame_cache *cache; int i; @@ -340,7 +340,7 @@ bfin_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -bfin_frame_this_id (struct frame_info *this_frame, +bfin_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -355,7 +355,7 @@ bfin_frame_this_id (struct frame_info *this_frame, } static struct value * -bfin_frame_prev_register (struct frame_info *this_frame, +bfin_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { @@ -726,7 +726,7 @@ bfin_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, } static CORE_ADDR -bfin_frame_base_address (struct frame_info *this_frame, void **this_cache) +bfin_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct bfin_frame_cache *cache = bfin_frame_cache (this_frame, this_cache); @@ -734,7 +734,7 @@ bfin_frame_base_address (struct frame_info *this_frame, void **this_cache) } static CORE_ADDR -bfin_frame_local_address (struct frame_info *this_frame, void **this_cache) +bfin_frame_local_address (frame_info_ptr this_frame, void **this_cache) { struct bfin_frame_cache *cache = bfin_frame_cache (this_frame, this_cache); @@ -742,7 +742,7 @@ bfin_frame_local_address (struct frame_info *this_frame, void **this_cache) } static CORE_ADDR -bfin_frame_args_address (struct frame_info *this_frame, void **this_cache) +bfin_frame_args_address (frame_info_ptr this_frame, void **this_cache) { struct bfin_frame_cache *cache = bfin_frame_cache (this_frame, this_cache); diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 1c9e5db7eac..a1b4a476b0f 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -52,7 +52,7 @@ slot instruction. */ const struct block * -get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block) +get_frame_block (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 (struct frame_info *frame) +get_frame_function (frame_info_ptr frame) { const struct block *bl = get_frame_block (frame, 0); @@ -460,13 +460,13 @@ find_gnu_ifunc_target_type (CORE_ADDR resolver_funaddr) at least as old as the selected frame. Return NULL if there is no such frame. If BLOCK is NULL, just return NULL. */ -struct frame_info * +frame_info_ptr block_innermost_frame (const struct block *block) { if (block == NULL) return NULL; - frame_info *frame = get_selected_frame (); + frame_info_ptr frame = get_selected_frame (); while (frame != NULL) { const struct block *frame_block = get_frame_block (frame, NULL); diff --git a/gdb/bpf-tdep.c b/gdb/bpf-tdep.c index 64c9f03512b..ea7c1147378 100644 --- a/gdb/bpf-tdep.c +++ b/gdb/bpf-tdep.c @@ -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 (struct frame_info *this_frame, +bpf_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -165,7 +165,7 @@ bpf_frame_this_id (struct frame_info *this_frame, /* Return the reason why we can't unwind past THIS_FRAME. */ static enum unwind_stop_reason -bpf_frame_unwind_stop_reason (struct frame_info *this_frame, +bpf_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { return UNWIND_OUTERMOST; @@ -174,7 +174,7 @@ bpf_frame_unwind_stop_reason (struct frame_info *this_frame, /* Ask THIS_FRAME to unwind its register. */ static struct value * -bpf_frame_prev_register (struct frame_info *this_frame, +bpf_frame_prev_register (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, struct frame_info *this_frame) +bpf_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR sp = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch)); diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index 2eb24f3b76c..6557ee71449 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -133,7 +133,7 @@ is_exception_catchpoint (breakpoint *bp) static void fetch_probe_arguments (struct value **arg0, struct value **arg1) { - struct frame_info *frame = get_selected_frame (_("No frame selected")); + frame_info_ptr frame = get_selected_frame (_("No frame selected")); CORE_ADDR pc = get_frame_pc (frame); struct bound_probe pc_probe; unsigned n_args; diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 2eabdd63c2e..e9aee6315fa 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1944,7 +1944,7 @@ update_watchpoint (struct watchpoint *b, int reparse) within_current_scope = 1; else { - struct frame_info *fi = get_current_frame (); + frame_info_ptr fi = get_current_frame (); struct gdbarch *frame_arch = get_frame_arch (fi); CORE_ADDR frame_pc = get_frame_pc (fi); @@ -4971,7 +4971,7 @@ static wp_check_result watchpoint_check (bpstat *bs) { struct watchpoint *b; - struct frame_info *fr; + frame_info_ptr fr; int within_current_scope; /* BS is built from an existing struct breakpoint. */ @@ -4988,7 +4988,7 @@ watchpoint_check (bpstat *bs) within_current_scope = 1; else { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); struct gdbarch *frame_arch = get_frame_arch (frame); CORE_ADDR frame_pc = get_frame_pc (frame); @@ -5385,7 +5385,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread) select_frame (get_current_frame ()); else { - struct frame_info *frame; + frame_info_ptr frame; /* For local watchpoint expressions, which particular instance of a local is being watched matters, so we @@ -7482,9 +7482,9 @@ check_longjmp_breakpoint_for_call_dummy (struct thread_info *tp) original dummy frame, hence frame_id_inner can't be used. See the comments on frame_id_inner for more details. */ bool unwind_finished_unexpectedly = false; - for (struct frame_info *fi = get_current_frame (); fi != nullptr; ) + for (frame_info_ptr fi = get_current_frame (); fi != nullptr; ) { - struct frame_info *prev = get_prev_frame (fi); + frame_info_ptr prev = get_prev_frame (fi); if (prev == nullptr) { /* FI is the last stack frame. Why did this frame not @@ -10081,7 +10081,7 @@ watch_command_1 (const char *arg, int accessflag, int from_tty, if (*tok) error (_("Junk at end of command.")); - frame_info *wp_frame = block_innermost_frame (exp_valid_block); + frame_info_ptr wp_frame = block_innermost_frame (exp_valid_block); /* Save this because create_internal_breakpoint below invalidates 'wp_frame'. */ @@ -10472,7 +10472,7 @@ until_break_fsm::do_async_reply_reason () void until_break_command (const char *arg, int from_tty, int anywhere) { - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *frame_gdbarch; struct frame_id stack_frame_id; struct frame_id caller_frame_id; @@ -13526,7 +13526,7 @@ insert_single_step_breakpoints (struct gdbarch *gdbarch) if (!next_pcs.empty ()) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); const address_space *aspace = get_frame_address_space (frame); for (CORE_ADDR pc : next_pcs) diff --git a/gdb/c-lang.c b/gdb/c-lang.c index 86e0af7c91b..88ccc8aaf41 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -975,7 +975,7 @@ public: /* See language.h. */ - CORE_ADDR skip_trampoline (struct frame_info *fi, + CORE_ADDR skip_trampoline (frame_info_ptr fi, CORE_ADDR pc) const override { return cplus_skip_trampoline (fi, pc); diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index c78b93f57b5..fe4041662ef 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1466,7 +1466,7 @@ print_disassembly (struct gdbarch *gdbarch, const char *name, static void disassemble_current_function (gdb_disassembly_flags flags) { - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; CORE_ADDR low, high, pc; const char *name; diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index dd892b31116..3a5d70bfeb0 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -144,7 +144,7 @@ convert_one_symbol (compile_c_instance *context, by their name. */ { struct value *val; - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; if (symbol_read_needs_frame (sym.symbol)) { diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index ef2a1f57603..4d3f1602322 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -138,7 +138,7 @@ convert_one_symbol (compile_cplus_instance *instance, by their name. */ { struct value *val; - struct frame_info *frame = nullptr; + frame_info_ptr frame = nullptr; if (symbol_read_needs_frame (sym.symbol)) { diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c index 3ce0bfab45f..3864228ef37 100644 --- a/gdb/compile/compile-loc2c.c +++ b/gdb/compile/compile-loc2c.c @@ -633,7 +633,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream, offset by hand seemed too hackish. */ if (is_tls) { - struct frame_info *frame = get_selected_frame (NULL); + frame_info_ptr frame = get_selected_frame (NULL); struct value *val; if (frame == NULL) diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c index f9ba559f12c..f10117491ec 100644 --- a/gdb/cp-abi.c +++ b/gdb/cp-abi.c @@ -152,7 +152,7 @@ cplus_make_method_ptr (struct type *type, gdb_byte *contents, } CORE_ADDR -cplus_skip_trampoline (struct frame_info *frame, +cplus_skip_trampoline (frame_info_ptr frame, CORE_ADDR stop_pc) { if (current_cp_abi.skip_trampoline == NULL) diff --git a/gdb/cp-abi.h b/gdb/cp-abi.h index c53b02d509c..bc85f6dc187 100644 --- a/gdb/cp-abi.h +++ b/gdb/cp-abi.h @@ -27,7 +27,7 @@ struct fn_field; struct type; struct value; struct ui_file; -struct frame_info; +class frame_info_ptr; /* The functions here that attempt to determine what sort of thing a mangled name refers to may well be revised in the future. It would @@ -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 (struct frame_info *frame, +CORE_ADDR cplus_skip_trampoline (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) (struct frame_info *, CORE_ADDR); + CORE_ADDR (*skip_trampoline) (frame_info_ptr , CORE_ADDR); struct language_pass_by_ref_info (*pass_by_reference) (struct type *type); }; diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 51c4e30e12b..4a2f14ad076 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -193,7 +193,7 @@ static const unsigned short rt_sigtramp_code[] = the routine. Otherwise, return 0. */ static CORE_ADDR -cris_sigtramp_start (struct frame_info *this_frame) +cris_sigtramp_start (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 (struct frame_info *this_frame) the routine. Otherwise, return 0. */ static CORE_ADDR -cris_rt_sigtramp_start (struct frame_info *this_frame) +cris_rt_sigtramp_start (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 (struct frame_info *this_frame) return the address of the associated sigcontext structure. */ static CORE_ADDR -cris_sigcontext_addr (struct frame_info *this_frame) +cris_sigcontext_addr (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 (struct frame_info *this_frame, +cris_sigtramp_frame_unwind_cache (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 (struct frame_info *this_frame, } static void -cris_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache, +cris_sigtramp_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, /* Forward declaration. */ -static struct value *cris_frame_prev_register (struct frame_info *this_frame, +static struct value *cris_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum); static struct value * -cris_sigtramp_frame_prev_register (struct frame_info *this_frame, +cris_sigtramp_frame_prev_register (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 (struct frame_info *this_frame, static int cris_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { cris_gdbarch_tdep *tdep = 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct cris_unwind_cache *info); static CORE_ADDR crisv32_scan_prologue (CORE_ADDR pc, - struct frame_info *this_frame, + 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 (struct frame_info *this_frame, +cris_frame_unwind_cache (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 (struct frame_info *this_frame, frame. This will be used to create a new GDB frame struct. */ static void -cris_frame_this_id (struct frame_info *this_frame, +cris_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -755,7 +755,7 @@ cris_frame_this_id (struct frame_info *this_frame, } static struct value * -cris_frame_prev_register (struct frame_info *this_frame, +cris_frame_prev_register (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 (struct frame_info *this_frame, void **this_cache) +cris_frame_base_address (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, struct frame_info *this_frame, +cris_scan_prologue (CORE_ADDR pc, 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, struct frame_info *this_frame, } static CORE_ADDR -crisv32_scan_prologue (CORE_ADDR pc, struct frame_info *this_frame, +crisv32_scan_prologue (CORE_ADDR pc, 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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { /* The return address column. */ if (regnum == gdbarch_pc_regnum (gdbarch)) diff --git a/gdb/csky-linux-tdep.c b/gdb/csky-linux-tdep.c index ea306cded09..8df3eaa2026 100644 --- a/gdb/csky-linux-tdep.c +++ b/gdb/csky-linux-tdep.c @@ -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, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index cc8812003c8..e377e37b26e 100644 --- a/gdb/csky-tdep.c +++ b/gdb/csky-tdep.c @@ -941,7 +941,7 @@ csky_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR limit_pc, CORE_ADDR end_pc, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct csky_unwind_cache *this_cache, lr_type_t lr_type) { @@ -2046,7 +2046,7 @@ csky_analyze_lr_type (struct gdbarch *gdbarch, /* Heuristic unwinder. */ static struct csky_unwind_cache * -csky_frame_unwind_cache (struct frame_info *this_frame) +csky_frame_unwind_cache (frame_info_ptr this_frame) { CORE_ADDR prologue_start, prologue_end, func_end, prev_pc, block_addr; struct csky_unwind_cache *cache; @@ -2105,7 +2105,7 @@ csky_frame_unwind_cache (struct frame_info *this_frame) /* Implement the this_id function for the normal unwinder. */ static void -csky_frame_this_id (struct frame_info *this_frame, +csky_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { struct csky_unwind_cache *cache; @@ -2126,7 +2126,7 @@ csky_frame_this_id (struct frame_info *this_frame, /* Implement the prev_register function for the normal unwinder. */ static struct value * -csky_frame_prev_register (struct frame_info *this_frame, +csky_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct csky_unwind_cache *cache; @@ -2155,7 +2155,7 @@ static const struct frame_unwind csky_unwind_cache = { }; static CORE_ADDR -csky_check_long_branch (struct frame_info *frame, CORE_ADDR pc) +csky_check_long_branch (frame_info_ptr frame, CORE_ADDR pc) { gdb_byte buf[8]; struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2192,7 +2192,7 @@ csky_check_long_branch (struct frame_info *frame, CORE_ADDR pc) static int csky_stub_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR addr_in_block, pc; @@ -2223,7 +2223,7 @@ csky_stub_unwind_sniffer (const struct frame_unwind *self, } static struct csky_unwind_cache * -csky_make_stub_cache (struct frame_info *this_frame) +csky_make_stub_cache (frame_info_ptr this_frame) { struct csky_unwind_cache *cache; @@ -2235,7 +2235,7 @@ csky_make_stub_cache (struct frame_info *this_frame) } static void -csky_stub_this_id (struct frame_info *this_frame, +csky_stub_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -2250,7 +2250,7 @@ csky_stub_this_id (struct frame_info *this_frame, } static struct value * -csky_stub_prev_register (struct frame_info *this_frame, +csky_stub_prev_register (frame_info_ptr this_frame, void **this_cache, int prev_regnum) { @@ -2290,7 +2290,7 @@ static frame_unwind csky_stub_unwind = { for the normal unwinder. */ static CORE_ADDR -csky_frame_base_address (struct frame_info *this_frame, void **this_cache) +csky_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct csky_unwind_cache *cache; @@ -2313,7 +2313,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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { if (regnum == gdbarch_pc_regnum (gdbarch)) reg->how = DWARF2_FRAME_REG_RA; diff --git a/gdb/defs.h b/gdb/defs.h index e5b6c7878b1..0d9a39a59d0 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -284,7 +284,7 @@ enum return_value_convention struct symtab; struct breakpoint; -struct frame_info; +class frame_info_ptr; struct gdbarch; struct value; diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c index b1f6ce5039c..44f3de22a01 100644 --- a/gdb/dtrace-probe.c +++ b/gdb/dtrace-probe.c @@ -129,7 +129,7 @@ public: /* See probe.h. */ struct value *evaluate_argument (unsigned n, - struct frame_info *frame) override; + frame_info_ptr frame) override; /* See probe.h. */ void compile_to_ax (struct agent_expr *aexpr, @@ -709,7 +709,7 @@ dtrace_probe::can_evaluate_arguments () const struct value * dtrace_probe::evaluate_argument (unsigned n, - struct frame_info *frame) + frame_info_ptr frame) { struct gdbarch *gdbarch = this->get_gdbarch (); struct dtrace_probe_arg *arg; diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index 2fef6eae562..42c4bf23431 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -288,7 +288,7 @@ struct dummy_frame_cache static int dummy_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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 (struct frame_info *this_frame, +dummy_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { @@ -364,7 +364,7 @@ dummy_frame_prev_register (struct frame_info *this_frame, dummy cache is located and saved in THIS_PROLOGUE_CACHE. */ static void -dummy_frame_this_id (struct frame_info *this_frame, +dummy_frame_this_id (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, struct frame_info *this_frame) +default_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR sp, pc; diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h index 80111f0a4db..213881e4eab 100644 --- a/gdb/dummy-frame.h +++ b/gdb/dummy-frame.h @@ -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, - struct frame_info *this_frame); + frame_info_ptr this_frame); #endif /* !defined (DUMMY_FRAME_H) */ diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index d3e3e97ba07..2df069602a3 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -49,7 +49,7 @@ static const registry::key dwarf_arch_cookie; /* Ensure that a FRAME is defined, throw an exception otherwise. */ static void -ensure_have_frame (frame_info *frame, const char *op_name) +ensure_have_frame (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 *frame, int reg) +read_addr_from_reg (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 &&pieces, - frame_info *frame) + frame_info_ptr frame) { piece_closure *c = new piece_closure; @@ -208,7 +208,7 @@ rw_pieced_value (value *v, value *from, bool check_optimized) { case DWARF_VALUE_REGISTER: { - frame_info *frame = frame_find_by_id (c->frame_id); + frame_info_ptr frame = frame_find_by_id (c->frame_id); gdbarch *arch = get_frame_arch (frame); int gdb_regnum = dwarf_reg_to_regnum_or_error (arch, p->v.regno); ULONGEST reg_bits = 8 * register_size (arch, gdb_regnum); @@ -550,7 +550,7 @@ indirect_pieced_value (value *value) } gdb_assert (piece != NULL && c->per_cu != nullptr); - frame_info *frame = get_selected_frame (_("No frame selected.")); + frame_info_ptr frame = get_selected_frame (_("No frame selected.")); /* This is an offset requested by GDB, such as value subscripts. However, due to how synthetic pointers are implemented, this is @@ -585,7 +585,7 @@ coerce_pieced_ref (const value *value) { const piece_closure *closure = (piece_closure *) value_computed_closure (value); - frame_info *frame + frame_info_ptr frame = get_selected_frame (_("No frame selected.")); /* gdb represents synthetic pointers as pieced values with a single @@ -675,7 +675,7 @@ sect_variable_value (sect_offset sect_off, } struct type *type = lookup_pointer_type (die_type); - frame_info *frame = get_selected_frame (_("No frame selected.")); + frame_info_ptr frame = get_selected_frame (_("No frame selected.")); return indirect_synthetic_pointer (sect_off, 0, per_cu, per_objfile, frame, type, true); } @@ -811,7 +811,7 @@ dwarf_expr_context::dwarf_call (cu_offset die_cu_off) { ensure_have_per_cu (this->m_per_cu, "DW_OP_call"); - frame_info *frame = this->m_frame; + frame_info_ptr frame = this->m_frame; auto get_pc_from_frame = [frame] () { @@ -866,7 +866,7 @@ dwarf_expr_context::push_dwarf_reg_entry_value (call_site_parameter_kind kind, dwarf2_per_cu_data *caller_per_cu; dwarf2_per_objfile *caller_per_objfile; - frame_info *caller_frame = get_prev_frame (this->m_frame); + frame_info_ptr caller_frame = get_prev_frame (this->m_frame); call_site_parameter *parameter = dwarf_expr_reg_to_entry_parameter (this->m_frame, kind, kind_u, &caller_per_cu, @@ -1070,7 +1070,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 *frame, + dwarf2_per_cu_data *per_cu, frame_info_ptr frame, const struct property_addr_info *addr_info, struct type *type, struct type *subobj_type, LONGEST subobj_offset) diff --git a/gdb/dwarf2/expr.h b/gdb/dwarf2/expr.h index 4ce9b734f77..6078dce0abc 100644 --- a/gdb/dwarf2/expr.h +++ b/gdb/dwarf2/expr.h @@ -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 *frame, + dwarf2_per_cu_data *per_cu, frame_info_ptr frame, const struct property_addr_info *addr_info = nullptr, struct type *type = nullptr, struct type *subobj_type = nullptr, @@ -196,7 +196,7 @@ private: dwarf2_per_objfile *m_per_objfile; /* Frame information used for the evaluation. */ - frame_info *m_frame = nullptr; + frame_info_ptr m_frame = nullptr; /* Compilation unit used for the evaluation. */ dwarf2_per_cu_data *m_per_cu = 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 *frame, int reg); +CORE_ADDR read_addr_from_reg (frame_info_ptr frame, int reg); void dwarf_expr_require_composition (const gdb_byte *, const gdb_byte *, const char *); diff --git a/gdb/dwarf2/frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c index 7f30a0d3126..a1e43cc18ed 100644 --- a/gdb/dwarf2/frame-tailcall.c +++ b/gdb/dwarf2/frame-tailcall.c @@ -39,7 +39,7 @@ static htab_t cache_htab; struct tailcall_cache { /* It must be the first one of this struct. It is the furthest callee. */ - struct frame_info *next_bottom_frame; + frame_info *next_bottom_frame; /* Reference count. The whole chain of virtual tail call frames shares one tailcall_cache. */ @@ -90,12 +90,12 @@ cache_eq (const void *arg1, const void *arg2) tailcall_cache. */ static struct tailcall_cache * -cache_new_ref1 (struct frame_info *next_bottom_frame) +cache_new_ref1 (frame_info_ptr next_bottom_frame) { struct tailcall_cache *cache = XCNEW (struct tailcall_cache); void **slot; - cache->next_bottom_frame = next_bottom_frame; + cache->next_bottom_frame = next_bottom_frame.get (); cache->refc = 1; slot = htab_find_slot (cache_htab, cache, INSERT); @@ -137,7 +137,7 @@ cache_unref (struct tailcall_cache *cache) return 0. */ static int -frame_is_tailcall (struct frame_info *fi) +frame_is_tailcall (frame_info_ptr fi) { return frame_unwinder_is (fi, &dwarf2_tailcall_frame_unwind); } @@ -146,9 +146,10 @@ frame_is_tailcall (struct frame_info *fi) call chain. Otherwise return NULL. No new reference is created. */ static struct tailcall_cache * -cache_find (struct frame_info *fi) +cache_find (frame_info_ptr fi) { struct tailcall_cache *cache; + struct tailcall_cache search; void **slot; while (frame_is_tailcall (fi)) @@ -157,7 +158,9 @@ cache_find (struct frame_info *fi) gdb_assert (fi != NULL); } - slot = htab_find_slot (cache_htab, &fi, NO_INSERT); + search.next_bottom_frame = fi.get(); + search.refc = 1; + slot = htab_find_slot (cache_htab, &search, NO_INSERT); if (slot == NULL) return NULL; @@ -170,11 +173,11 @@ cache_find (struct frame_info *fi) If THIS_FRAME is CACHE-> NEXT_BOTTOM_FRAME return -1. */ static int -existing_next_levels (struct frame_info *this_frame, +existing_next_levels (frame_info_ptr this_frame, struct tailcall_cache *cache) { int retval = (frame_relative_level (this_frame) - - frame_relative_level (cache->next_bottom_frame) - 1); + - frame_relative_level (frame_info_ptr (cache->next_bottom_frame)) - 1); gdb_assert (retval >= -1); @@ -207,11 +210,11 @@ pretended_chain_levels (struct call_site_chain *chain) Specific virtual tail call frames are tracked by INLINE_DEPTH. */ static void -tailcall_frame_this_id (struct frame_info *this_frame, void **this_cache, +tailcall_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache; - struct frame_info *next_frame; + frame_info_ptr next_frame; /* Tail call does not make sense for a sentinel frame. */ next_frame = get_next_frame (this_frame); @@ -229,7 +232,7 @@ tailcall_frame_this_id (struct frame_info *this_frame, void **this_cache, CACHE. */ static CORE_ADDR -pretend_pc (struct frame_info *this_frame, struct tailcall_cache *cache) +pretend_pc (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; @@ -261,7 +264,7 @@ pretend_pc (struct frame_info *this_frame, struct tailcall_cache *cache) frames unwind the NULL case differently. */ struct value * -dwarf2_tailcall_prev_register_first (struct frame_info *this_frame, +dwarf2_tailcall_prev_register_first (frame_info_ptr this_frame, void **tailcall_cachep, int regnum) { struct gdbarch *this_gdbarch = get_frame_arch (this_frame); @@ -291,7 +294,7 @@ dwarf2_tailcall_prev_register_first (struct frame_info *this_frame, dwarf2_tailcall_prev_register_first. */ static struct value * -tailcall_frame_prev_register (struct frame_info *this_frame, +tailcall_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache; @@ -313,9 +316,9 @@ tailcall_frame_prev_register (struct frame_info *this_frame, static int tailcall_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + frame_info_ptr this_frame, void **this_cache) { - struct frame_info *next_frame; + frame_info_ptr next_frame; int next_levels; struct tailcall_cache *cache; @@ -360,7 +363,7 @@ tailcall_frame_sniffer (const struct frame_unwind *self, address pushed on the stack. */ void -dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, +dwarf2_tailcall_sniffer_first (frame_info_ptr this_frame, void **tailcall_cachep, const LONGEST *entry_cfa_sp_offsetp) { @@ -444,7 +447,7 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, TAILCALL_FRAME. */ static void -tailcall_frame_dealloc_cache (struct frame_info *self, void *this_cache) +tailcall_frame_dealloc_cache (frame_info *self, void *this_cache) { struct tailcall_cache *cache = (struct tailcall_cache *) this_cache; @@ -455,12 +458,12 @@ tailcall_frame_dealloc_cache (struct frame_info *self, void *this_cache) call frames have gdbarch of the bottom (callee) frame. */ static struct gdbarch * -tailcall_frame_prev_arch (struct frame_info *this_frame, +tailcall_frame_prev_arch (frame_info_ptr this_frame, void **this_prologue_cache) { struct tailcall_cache *cache = (struct tailcall_cache *) *this_prologue_cache; - return get_frame_arch (cache->next_bottom_frame); + return get_frame_arch (frame_info_ptr (cache->next_bottom_frame)); } /* Virtual tail call frame unwinder if dwarf2_tailcall_sniffer_first finds diff --git a/gdb/dwarf2/frame-tailcall.h b/gdb/dwarf2/frame-tailcall.h index e55a59dfbc2..c849bfb070e 100644 --- a/gdb/dwarf2/frame-tailcall.h +++ b/gdb/dwarf2/frame-tailcall.h @@ -20,18 +20,18 @@ #ifndef DWARF2_FRAME_TAILCALL_H #define DWARF2_FRAME_TAILCALL_H 1 -struct frame_info; +class frame_info_ptr; struct frame_unwind; /* The tail call frame unwinder. */ extern void - dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, + dwarf2_tailcall_sniffer_first (frame_info_ptr this_frame, void **tailcall_cachep, const LONGEST *entry_cfa_sp_offsetp); extern struct value * - dwarf2_tailcall_prev_register_first (struct frame_info *this_frame, + dwarf2_tailcall_prev_register_first (frame_info_ptr this_frame, void **tailcall_cachep, int regnum); extern const struct frame_unwind dwarf2_tailcall_frame_unwind; diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index 0e681f006cd..83565ea7c99 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -226,7 +226,7 @@ register %s (#%d) at %s"), static CORE_ADDR execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size, - struct frame_info *this_frame, CORE_ADDR initial, + 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); @@ -583,17 +583,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, - struct frame_info *this_frame); + 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 *, - struct frame_info *) + frame_info_ptr) = dwarf2_frame_default_init_reg; /* Check whether the THIS_FRAME is a signal trampoline. */ - int (*signal_frame_p) (struct gdbarch *, struct frame_info *) = nullptr; + int (*signal_frame_p) (struct gdbarch *, frame_info_ptr) = nullptr; /* Convert .eh_frame register number to DWARF register number, or adjust .debug_frame register number. */ @@ -619,7 +619,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, - struct frame_info *this_frame) + 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 @@ -660,7 +660,7 @@ void dwarf2_frame_set_init_reg (struct gdbarch *gdbarch, void (*init_reg) (struct gdbarch *, int, struct dwarf2_frame_state_reg *, - struct frame_info *)) + frame_info_ptr )) { struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch); @@ -672,7 +672,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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch); @@ -685,7 +685,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 *, - struct frame_info *)) + frame_info_ptr )) { struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch); @@ -697,7 +697,7 @@ dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch, static int dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch, - struct frame_info *this_frame) + frame_info_ptr this_frame) { struct dwarf2_frame_ops *ops = get_frame_ops (gdbarch); @@ -866,7 +866,7 @@ struct dwarf2_frame_cache }; static struct dwarf2_frame_cache * -dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache) +dwarf2_frame_cache (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); @@ -1095,7 +1095,7 @@ incomplete CFI data; unspecified registers (e.g., %s) at %s"), } static enum unwind_stop_reason -dwarf2_frame_unwind_stop_reason (struct frame_info *this_frame, +dwarf2_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct dwarf2_frame_cache *cache @@ -1111,7 +1111,7 @@ dwarf2_frame_unwind_stop_reason (struct frame_info *this_frame, } static void -dwarf2_frame_this_id (struct frame_info *this_frame, void **this_cache, +dwarf2_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct dwarf2_frame_cache *cache = @@ -1126,7 +1126,7 @@ dwarf2_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -dwarf2_frame_prev_register (struct frame_info *this_frame, void **this_cache, +dwarf2_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1226,9 +1226,10 @@ dwarf2_frame_prev_register (struct frame_info *this_frame, void **this_cache, call frames chain. */ static void -dwarf2_frame_dealloc_cache (struct frame_info *self, void *this_cache) +dwarf2_frame_dealloc_cache (frame_info *self, void *this_cache) { - struct dwarf2_frame_cache *cache = dwarf2_frame_cache (self, &this_cache); + struct dwarf2_frame_cache *cache + = dwarf2_frame_cache (frame_info_ptr (self), &this_cache); if (cache->tailcall_cache) dwarf2_tailcall_frame_unwind.dealloc_cache (self, cache->tailcall_cache); @@ -1236,7 +1237,7 @@ dwarf2_frame_dealloc_cache (struct frame_info *self, void *this_cache) static int dwarf2_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + frame_info_ptr this_frame, void **this_cache) { if (!dwarf2_frame_unwinders_enabled_p) return 0; @@ -1312,7 +1313,7 @@ dwarf2_append_unwinders (struct gdbarch *gdbarch) response to the "info frame" command. */ static CORE_ADDR -dwarf2_frame_base_address (struct frame_info *this_frame, void **this_cache) +dwarf2_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct dwarf2_frame_cache *cache = dwarf2_frame_cache (this_frame, this_cache); @@ -1329,7 +1330,7 @@ static const struct frame_base dwarf2_frame_base = }; const struct frame_base * -dwarf2_frame_base_sniffer (struct frame_info *this_frame) +dwarf2_frame_base_sniffer (frame_info_ptr this_frame) { CORE_ADDR block_addr = get_frame_address_in_block (this_frame); @@ -1344,7 +1345,7 @@ dwarf2_frame_base_sniffer (struct frame_info *this_frame) DW_OP_call_frame_cfa. */ CORE_ADDR -dwarf2_frame_cfa (struct frame_info *this_frame) +dwarf2_frame_cfa (frame_info_ptr this_frame) { if (frame_unwinder_is (this_frame, &record_btrace_tailcall_frame_unwind) || frame_unwinder_is (this_frame, &record_btrace_frame_unwind)) diff --git a/gdb/dwarf2/frame.h b/gdb/dwarf2/frame.h index 04ec1e06c48..653156fa509 100644 --- a/gdb/dwarf2/frame.h +++ b/gdb/dwarf2/frame.h @@ -23,7 +23,7 @@ #define DWARF2_FRAME_H 1 struct gdbarch; -struct frame_info; +class frame_info_ptr; struct dwarf2_per_cu_data; struct agent_expr; struct axs_value; @@ -78,7 +78,7 @@ struct dwarf2_frame_state_reg const gdb_byte *start; ULONGEST len; } exp; - struct value *(*fn) (struct frame_info *this_frame, void **this_cache, + struct value *(*fn) (frame_info_ptr this_frame, void **this_cache, int regnum); } loc; enum dwarf2_frame_reg_rule how; @@ -208,7 +208,7 @@ extern bool dwarf2_frame_unwinders_enabled_p; extern void dwarf2_frame_set_init_reg (struct gdbarch *gdbarch, void (*init_reg) (struct gdbarch *, int, struct dwarf2_frame_state_reg *, - struct frame_info *)); + frame_info_ptr )); /* Set the architecture-specific signal trampoline recognition function for GDBARCH to SIGNAL_FRAME_P. */ @@ -216,7 +216,7 @@ extern void dwarf2_frame_set_init_reg (struct gdbarch *gdbarch, extern void dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch, int (*signal_frame_p) (struct gdbarch *, - struct frame_info *)); + frame_info_ptr )); /* Set the architecture-specific adjustment of .eh_frame and .debug_frame register numbers. */ @@ -234,11 +234,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 (struct frame_info *this_frame); + dwarf2_frame_base_sniffer (frame_info_ptr this_frame); /* Compute the DWARF CFA for a frame. */ -CORE_ADDR dwarf2_frame_cfa (struct frame_info *this_frame); +CORE_ADDR dwarf2_frame_cfa (frame_info_ptr this_frame); /* Find the CFA information for PC. diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index ad45d57a654..791648d6e7e 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -48,7 +48,7 @@ #include "gdbsupport/byte-vector.h" static struct value *dwarf2_evaluate_loc_desc_full - (struct type *type, struct frame_info *frame, const gdb_byte *data, + (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, struct type *subobj_type, LONGEST subobj_byte_offset, bool as_lval = true); @@ -488,7 +488,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, struct frame_info *frame) +locexpr_get_frame_base (struct symbol *framefunc, frame_info_ptr frame) { struct gdbarch *gdbarch; struct type *type; @@ -545,7 +545,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, struct frame_info *frame) +loclist_get_frame_base (struct symbol *framefunc, frame_info_ptr frame) { struct gdbarch *gdbarch; struct type *type; @@ -638,7 +638,7 @@ void call_site_target::iterate_over_addresses (struct gdbarch *call_site_gdbarch, const struct call_site *call_site, - struct frame_info *caller_frame, + frame_info_ptr caller_frame, iterate_ftype callback) const { switch (m_loc_kind) @@ -1126,7 +1126,7 @@ call_site_parameter_matches (struct call_site_parameter *parameter, /* See loc.h. */ struct call_site_parameter * -dwarf_expr_reg_to_entry_parameter (struct frame_info *frame, +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, @@ -1134,7 +1134,7 @@ dwarf_expr_reg_to_entry_parameter (struct frame_info *frame, { CORE_ADDR func_addr, caller_pc; struct gdbarch *gdbarch; - struct frame_info *caller_frame; + frame_info_ptr caller_frame; struct call_site *call_site; int iparams; /* Initialize it just to avoid a GCC false warning. */ @@ -1251,7 +1251,7 @@ dwarf_expr_reg_to_entry_parameter (struct frame_info *frame, static struct value * dwarf_entry_parameter_to_value (struct call_site_parameter *parameter, CORE_ADDR deref_size, struct type *type, - struct frame_info *caller_frame, + frame_info_ptr caller_frame, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile) { @@ -1333,13 +1333,13 @@ static const struct lval_funcs entry_data_value_funcs = cannot resolve the parameter for any reason. */ static struct value * -value_of_dwarf_reg_entry (struct type *type, struct frame_info *frame, +value_of_dwarf_reg_entry (struct type *type, frame_info_ptr frame, enum call_site_parameter_kind kind, union call_site_parameter_u kind_u) { struct type *checked_type = check_typedef (type); struct type *target_type = checked_type->target_type (); - struct frame_info *caller_frame = get_prev_frame (frame); + frame_info_ptr caller_frame = get_prev_frame (frame); struct value *outer_val, *target_val, *val; struct call_site_parameter *parameter; dwarf2_per_cu_data *caller_per_cu; @@ -1389,7 +1389,7 @@ value_of_dwarf_reg_entry (struct type *type, struct frame_info *frame, cannot resolve the parameter for any reason. */ static struct value * -value_of_dwarf_block_entry (struct type *type, struct frame_info *frame, +value_of_dwarf_block_entry (struct type *type, frame_info_ptr frame, const gdb_byte *block, size_t block_len) { union call_site_parameter_u kind_u; @@ -1450,7 +1450,7 @@ struct value * indirect_synthetic_pointer (sect_offset die, LONGEST byte_offset, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, - struct frame_info *frame, struct type *type, + frame_info_ptr frame, struct type *type, bool resolve_abstract_p) { /* Fetch the location expression of the DIE we're pointing to. */ @@ -1490,7 +1490,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, struct frame_info *frame, +dwarf2_evaluate_loc_desc_full (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, @@ -1555,7 +1555,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, passes 0 as the byte_offset. */ struct value * -dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame, +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) @@ -1578,7 +1578,7 @@ dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame, static int dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, - struct frame_info *frame, + frame_info_ptr frame, const struct property_addr_info *addr_stack, CORE_ADDR *valp, gdb::array_view push_values, @@ -1639,7 +1639,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, bool dwarf2_evaluate_property (const struct dynamic_prop *prop, - struct frame_info *frame, + frame_info_ptr frame, const struct property_addr_info *addr_stack, CORE_ADDR *value, gdb::array_view push_values) @@ -3044,7 +3044,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, struct frame_info *frame) +locexpr_read_variable (struct symbol *symbol, frame_info_ptr frame) { struct dwarf2_locexpr_baton *dlbaton = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol); @@ -3062,7 +3062,7 @@ locexpr_read_variable (struct symbol *symbol, struct frame_info *frame) will be thrown. */ static struct value * -locexpr_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame) +locexpr_read_variable_at_entry (struct symbol *symbol, frame_info_ptr frame) { struct dwarf2_locexpr_baton *dlbaton = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol); @@ -3877,7 +3877,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, struct frame_info *frame) +loclist_read_variable (struct symbol *symbol, frame_info_ptr frame) { struct dwarf2_loclist_baton *dlbaton = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol); @@ -3902,7 +3902,7 @@ loclist_read_variable (struct symbol *symbol, struct frame_info *frame) if it cannot resolve the parameter for any reason. */ static struct value * -loclist_read_variable_at_entry (struct symbol *symbol, struct frame_info *frame) +loclist_read_variable_at_entry (struct symbol *symbol, frame_info_ptr frame) { struct dwarf2_loclist_baton *dlbaton = (struct dwarf2_loclist_baton *) SYMBOL_LOCATION_BATON (symbol); diff --git a/gdb/dwarf2/loc.h b/gdb/dwarf2/loc.h index a9834d32066..d6709f2e342 100644 --- a/gdb/dwarf2/loc.h +++ b/gdb/dwarf2/loc.h @@ -65,7 +65,7 @@ value *compute_var_value (const char *name); otherwise. */ struct call_site_parameter *dwarf_expr_reg_to_entry_parameter - (struct frame_info *frame, enum call_site_parameter_kind kind, + (frame_info_ptr frame, enum call_site_parameter_kind kind, union call_site_parameter_u kind_u, dwarf2_per_cu_data **per_cu_return, dwarf2_per_objfile **per_objfile_return); @@ -76,7 +76,7 @@ struct call_site_parameter *dwarf_expr_reg_to_entry_parameter be a value or a location description. */ struct value *dwarf2_evaluate_loc_desc (struct type *type, - struct frame_info *frame, + frame_info_ptr frame, const gdb_byte *data, size_t size, dwarf2_per_cu_data *per_cu, @@ -120,7 +120,7 @@ struct property_addr_info bottom of the stack. */ bool dwarf2_evaluate_property (const struct dynamic_prop *prop, - struct frame_info *frame, + frame_info_ptr frame, const struct property_addr_info *addr_stack, CORE_ADDR *value, gdb::array_view push_values = {}); @@ -293,7 +293,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, struct frame_info *frame, + dwarf2_per_objfile *per_objfile, frame_info_ptr frame, struct type *type, bool resolve_abstract_p = false); #endif /* DWARF2LOC_H */ diff --git a/gdb/elfread.c b/gdb/elfread.c index 8b0e3c30468..cea35fd4940 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -930,7 +930,7 @@ static void elf_gnu_ifunc_resolver_stop (code_breakpoint *b) { struct breakpoint *b_return; - struct frame_info *prev_frame = get_prev_frame (get_current_frame ()); + frame_info_ptr prev_frame = get_prev_frame (get_current_frame ()); struct frame_id prev_frame_id = get_stack_frame_id (prev_frame); CORE_ADDR prev_pc = get_frame_pc (prev_frame); int thread_id = inferior_thread ()->global_num; diff --git a/gdb/eval.c b/gdb/eval.c index 55e130d738d..d0a4a16ceb5 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -1099,7 +1099,7 @@ eval_op_var_entry_value (struct type *expect_type, struct expression *exp, error (_("Symbol \"%s\" does not have any specific entry value"), sym->print_name ()); - struct frame_info *frame = get_selected_frame (NULL); + frame_info_ptr frame = get_selected_frame (NULL); return SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry (sym, frame); } diff --git a/gdb/extension-priv.h b/gdb/extension-priv.h index 7c74e721c57..50e9337af6e 100644 --- a/gdb/extension-priv.h +++ b/gdb/extension-priv.h @@ -179,7 +179,7 @@ struct extension_language_ops or SCR_BT_COMPLETED on success. */ enum ext_lang_bt_status (*apply_frame_filter) (const struct extension_language_defn *, - struct frame_info *frame, frame_filter_flags flags, + 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); diff --git a/gdb/extension.c b/gdb/extension.c index 5a805bea00e..8cbd80f45d5 100644 --- a/gdb/extension.c +++ b/gdb/extension.c @@ -524,7 +524,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 (struct frame_info *frame, +apply_ext_lang_frame_filter (frame_info_ptr frame, frame_filter_flags flags, enum ext_lang_frame_args args_type, struct ui_out *out, diff --git a/gdb/extension.h b/gdb/extension.h index 47839ea50be..72cff218f5b 100644 --- a/gdb/extension.h +++ b/gdb/extension.h @@ -26,7 +26,7 @@ struct breakpoint; struct command_line; -struct frame_info; +class frame_info_ptr; struct language_defn; struct objfile; struct extension_language_defn; @@ -291,7 +291,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 - (struct frame_info *frame, frame_filter_flags flags, + (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); diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 37e597a0307..1742bbb5df2 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -660,7 +660,7 @@ info_common_command_for_block (const struct block *block, const char *comname, static void info_common_command (const char *comname, int from_tty) { - struct frame_info *fi; + frame_info_ptr fi; const struct block *block; int values_printed = 0; diff --git a/gdb/findvar.c b/gdb/findvar.c index b388d827ced..d45a1583b79 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -259,7 +259,7 @@ copy_integer_to_size (gdb_byte *dest, int dest_size, const gdb_byte *source, determined by register_type (). */ struct value * -value_of_register (int regnum, struct frame_info *frame) +value_of_register (int regnum, frame_info_ptr frame) { struct gdbarch *gdbarch = get_frame_arch (frame); struct value *reg_val; @@ -279,11 +279,11 @@ value_of_register (int regnum, struct frame_info *frame) determined by register_type (). The value is not fetched. */ struct value * -value_of_register_lazy (struct frame_info *frame, int regnum) +value_of_register_lazy (frame_info_ptr frame, int regnum) { struct gdbarch *gdbarch = get_frame_arch (frame); struct value *reg_val; - struct frame_info *next_frame; + frame_info_ptr next_frame; gdb_assert (regnum < gdbarch_num_cooked_regs (gdbarch)); @@ -403,8 +403,8 @@ symbol_read_needs_frame (struct symbol *sym) the static links points to and return it. Return NULL if we could not find such a frame. */ -static struct frame_info * -follow_static_link (struct frame_info *frame, +static frame_info_ptr +follow_static_link (frame_info_ptr frame, const struct dynamic_prop *static_link) { CORE_ADDR upper_frame_base; @@ -446,9 +446,9 @@ follow_static_link (struct frame_info *frame, For backward compatibility purposes (with old compilers), we then look for the first frame that can host it. */ -static struct frame_info * +static frame_info_ptr get_hosting_frame (struct symbol *var, const struct block *var_block, - struct frame_info *frame) + frame_info_ptr frame) { const struct block *frame_block = NULL; @@ -559,7 +559,7 @@ 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, - struct frame_info *frame) const + frame_info_ptr frame) const { struct value *v; struct type *type = var->type (); @@ -781,7 +781,7 @@ language_defn::read_var_value (struct symbol *var, struct value * read_var_value (struct symbol *var, const struct block *var_block, - struct frame_info *frame) + frame_info_ptr frame) { const struct language_defn *lang = language_def (var->language ()); @@ -798,7 +798,7 @@ default_value_from_register (struct gdbarch *gdbarch, struct type *type, { int len = type->length (); struct value *value = allocate_value (type); - struct frame_info *frame; + frame_info_ptr frame; VALUE_LVAL (value) = lval_register; frame = frame_find_by_id (frame_id); @@ -834,7 +834,7 @@ default_value_from_register (struct gdbarch *gdbarch, struct type *type, complete resulting value as optimized out. */ void -read_frame_register_value (struct value *value, struct frame_info *frame) +read_frame_register_value (struct value *value, frame_info_ptr frame) { struct gdbarch *gdbarch = get_frame_arch (frame); LONGEST offset = 0; @@ -874,7 +874,7 @@ read_frame_register_value (struct value *value, struct frame_info *frame) /* Return a value of type TYPE, stored in register REGNUM, in frame FRAME. */ struct value * -value_from_register (struct type *type, int regnum, struct frame_info *frame) +value_from_register (struct type *type, int regnum, frame_info_ptr frame) { struct gdbarch *gdbarch = get_frame_arch (frame); struct type *type1 = check_typedef (type); @@ -924,7 +924,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame) Will abort if register value is not available. */ CORE_ADDR -address_from_register (int regnum, struct frame_info *frame) +address_from_register (int regnum, frame_info_ptr frame) { struct gdbarch *gdbarch = get_frame_arch (frame); struct type *type = builtin_type (gdbarch)->builtin_data_ptr; diff --git a/gdb/frame-base.c b/gdb/frame-base.c index 06c6af4b8c7..fb577df5143 100644 --- a/gdb/frame-base.c +++ b/gdb/frame-base.c @@ -29,19 +29,19 @@ really need to override this. */ static CORE_ADDR -default_frame_base_address (struct frame_info *this_frame, void **this_cache) +default_frame_base_address (frame_info_ptr this_frame, void **this_cache) { return get_frame_base (this_frame); /* sigh! */ } static CORE_ADDR -default_frame_locals_address (struct frame_info *this_frame, void **this_cache) +default_frame_locals_address (frame_info_ptr this_frame, void **this_cache) { return default_frame_base_address (this_frame, this_cache); } static CORE_ADDR -default_frame_args_address (struct frame_info *this_frame, void **this_cache) +default_frame_args_address (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 (struct frame_info *this_frame) +frame_base_find_by_frame (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct frame_base_table *table = get_frame_base_table (gdbarch); diff --git a/gdb/frame-base.h b/gdb/frame-base.h index ba3d99cc02f..334a2e2c750 100644 --- a/gdb/frame-base.h +++ b/gdb/frame-base.h @@ -20,7 +20,7 @@ #if !defined (FRAME_BASE_H) #define FRAME_BASE_H 1 -struct frame_info; +class frame_info_ptr; struct frame_id; struct frame_unwind; struct frame_base; @@ -42,17 +42,17 @@ struct regcache; /* A generic base address. */ -typedef CORE_ADDR (frame_this_base_ftype) (struct frame_info *this_frame, +typedef CORE_ADDR (frame_this_base_ftype) (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) (struct frame_info *this_frame, +typedef CORE_ADDR (frame_this_locals_ftype) (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) (struct frame_info *this_frame, +typedef CORE_ADDR (frame_this_args_ftype) (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) (struct frame_info *this_frame); +typedef const struct frame_base *(frame_base_sniffer_ftype) (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 (struct frame_info *this_frame); +extern const struct frame_base *frame_base_find_by_frame (frame_info_ptr this_frame); #endif diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index 78e3f1d8bad..ed24e6e1747 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -121,7 +121,7 @@ frame_unwind_append_unwinder (struct gdbarch *gdbarch, unchanged and returns 0. */ static int -frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache, +frame_unwind_try_unwinder (frame_info_ptr this_frame, void **this_cache, const struct frame_unwind *unwinder) { int res = 0; @@ -181,7 +181,7 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache, by this function. Possibly initialize THIS_CACHE. */ void -frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache) +frame_unwind_find_by_frame (frame_info_ptr this_frame, void **this_cache) { FRAME_SCOPED_DEBUG_ENTER_EXIT; frame_debug_printf ("this_frame=%d", frame_relative_level (this_frame)); @@ -215,7 +215,7 @@ frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache) int default_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { return 1; @@ -224,7 +224,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 (struct frame_info *this_frame, +default_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct frame_id this_id = get_frame_id (this_frame); @@ -238,7 +238,7 @@ default_frame_unwind_stop_reason (struct frame_info *this_frame, /* See frame-unwind.h. */ CORE_ADDR -default_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +default_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { int pc_regnum = gdbarch_pc_regnum (gdbarch); CORE_ADDR pc = frame_unwind_register_unsigned (next_frame, pc_regnum); @@ -249,7 +249,7 @@ default_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) /* See frame-unwind.h. */ CORE_ADDR -default_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) +default_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame) { int sp_regnum = gdbarch_sp_regnum (gdbarch); return frame_unwind_register_unsigned (next_frame, sp_regnum); @@ -261,7 +261,7 @@ default_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) /* Return a value which indicates that FRAME did not save REGNUM. */ struct value * -frame_unwind_got_optimized (struct frame_info *frame, int regnum) +frame_unwind_got_optimized (frame_info_ptr frame, int regnum) { struct gdbarch *gdbarch = frame_unwind_arch (frame); struct type *type = register_type (gdbarch, regnum); @@ -273,7 +273,7 @@ frame_unwind_got_optimized (struct frame_info *frame, int regnum) register NEW_REGNUM. */ struct value * -frame_unwind_got_register (struct frame_info *frame, +frame_unwind_got_register (frame_info_ptr frame, int regnum, int new_regnum) { return value_of_register_lazy (frame, new_regnum); @@ -283,7 +283,7 @@ frame_unwind_got_register (struct frame_info *frame, ADDR. */ struct value * -frame_unwind_got_memory (struct frame_info *frame, int regnum, CORE_ADDR addr) +frame_unwind_got_memory (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); @@ -296,7 +296,7 @@ frame_unwind_got_memory (struct frame_info *frame, int regnum, CORE_ADDR addr) REGNUM has a known constant (computed) value of VAL. */ struct value * -frame_unwind_got_constant (struct frame_info *frame, int regnum, +frame_unwind_got_constant (frame_info_ptr frame, int regnum, ULONGEST val) { struct gdbarch *gdbarch = frame_unwind_arch (frame); @@ -310,7 +310,7 @@ frame_unwind_got_constant (struct frame_info *frame, int regnum, } struct value * -frame_unwind_got_bytes (struct frame_info *frame, int regnum, const gdb_byte *buf) +frame_unwind_got_bytes (frame_info_ptr frame, int regnum, const gdb_byte *buf) { struct gdbarch *gdbarch = frame_unwind_arch (frame); struct value *reg_val; @@ -326,7 +326,7 @@ frame_unwind_got_bytes (struct frame_info *frame, int regnum, const gdb_byte *bu CORE_ADDR to a target address if necessary. */ struct value * -frame_unwind_got_address (struct frame_info *frame, int regnum, +frame_unwind_got_address (frame_info_ptr frame, int regnum, CORE_ADDR addr) { struct gdbarch *gdbarch = frame_unwind_arch (frame); diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index af79c808301..84c90fdd143 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -21,7 +21,7 @@ #define FRAME_UNWIND_H 1 struct frame_data; -struct frame_info; +class frame_info_ptr; struct frame_id; struct frame_unwind; struct gdbarch; @@ -50,37 +50,37 @@ struct value; to set *THIS_PROLOGUE_CACHE to NULL. */ typedef int (frame_sniffer_ftype) (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache); typedef enum unwind_stop_reason (frame_unwind_stop_reason_ftype) - (struct frame_info *this_frame, void **this_prologue_cache); + (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, - struct frame_info *this_frame, + 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 (struct frame_info *this_frame, + default_frame_unwind_stop_reason (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, - struct frame_info *next_frame); + 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, - struct frame_info *next_frame); + 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) (struct frame_info *this_frame, +typedef void (frame_this_id_ftype) (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id); @@ -141,19 +141,19 @@ typedef void (frame_this_id_ftype) (struct frame_info *this_frame, allocated using FRAME_OBSTACK_ZALLOC(). */ typedef struct value * (frame_prev_register_ftype) - (struct frame_info *this_frame, void **this_prologue_cache, + (frame_info_ptr this_frame, void **this_prologue_cache, int regnum); /* Deallocate extra memory associated with the frame cache if any. */ -typedef void (frame_dealloc_cache_ftype) (struct frame_info *self, +typedef void (frame_dealloc_cache_ftype) (frame_info *self, void *this_cache); /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); use THIS frame, and implicitly the NEXT frame's register unwind method, return PREV frame's architecture. */ -typedef struct gdbarch *(frame_prev_arch_ftype) (struct frame_info *this_frame, +typedef struct gdbarch *(frame_prev_arch_ftype) (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 (struct frame_info *this_frame, +extern void frame_unwind_find_by_frame (frame_info_ptr this_frame, void **this_cache); /* Helper functions for value-based register unwinding. These return @@ -201,39 +201,39 @@ extern void frame_unwind_find_by_frame (struct frame_info *this_frame, /* Return a value which indicates that FRAME did not save REGNUM. */ -struct value *frame_unwind_got_optimized (struct frame_info *frame, +struct value *frame_unwind_got_optimized (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 (struct frame_info *frame, int regnum, +struct value *frame_unwind_got_register (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 (struct frame_info *frame, int regnum, +struct value *frame_unwind_got_memory (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 (struct frame_info *frame, int regnum, +struct value *frame_unwind_got_constant (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 (struct frame_info *frame, int regnum, +struct value *frame_unwind_got_bytes (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 (struct frame_info *frame, int regnum, +struct value *frame_unwind_got_address (frame_info_ptr frame, int regnum, CORE_ADDR addr); #endif diff --git a/gdb/frame.c b/gdb/frame.c index 44cb52910f9..e08b9c90065 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -51,7 +51,7 @@ The current frame, which is the innermost frame, can be found at sentinel_frame->prev. */ -static struct frame_info *sentinel_frame; +static frame_info *sentinel_frame; /* Number of calls to reinit_frame_cache. */ static unsigned int frame_cache_generation = 0; @@ -70,7 +70,7 @@ get_frame_cache_generation () /* The values behind the global "set backtrace ..." settings. */ set_backtrace_options user_set_backtrace_options; -static struct frame_info *get_prev_frame_raw (struct frame_info *this_frame); +static frame_info_ptr get_prev_frame_raw (frame_info_ptr this_frame); static const char *frame_stop_reason_symbol_string (enum unwind_stop_reason reason); /* Status of some values cached in the frame_info object. */ @@ -195,7 +195,7 @@ struct frame_info /* See frame.h. */ void -set_frame_previous_pc_masked (struct frame_info *frame) +set_frame_previous_pc_masked (frame_info_ptr frame) { frame->prev_pc.masked = true; } @@ -203,7 +203,7 @@ set_frame_previous_pc_masked (struct frame_info *frame) /* See frame.h. */ bool -get_frame_pc_masked (const struct frame_info *frame) +get_frame_pc_masked (frame_info_ptr frame) { gdb_assert (frame->next != nullptr); gdb_assert (frame->next->prev_pc.status == CC_VALUE); @@ -225,7 +225,7 @@ static htab_t frame_stash; static hashval_t frame_addr_hash (const void *ap) { - const struct frame_info *frame = (const struct frame_info *) ap; + const frame_info *frame = (const frame_info *) ap; const struct frame_id f_id = frame->this_id.value; hashval_t hash = 0; @@ -252,8 +252,8 @@ frame_addr_hash (const void *ap) static int frame_addr_hash_eq (const void *a, const void *b) { - const struct frame_info *f_entry = (const struct frame_info *) a; - const struct frame_info *f_element = (const struct frame_info *) b; + const frame_info *f_entry = (const frame_info *) a; + const frame_info *f_element = (const frame_info *) b; return f_entry->this_id.value == f_element->this_id.value; } @@ -280,8 +280,8 @@ frame_stash_add (frame_info *frame) /* Do not try to stash the sentinel frame. */ gdb_assert (frame->level >= 0); - frame_info **slot = (struct frame_info **) htab_find_slot (frame_stash, - frame, INSERT); + frame_info **slot = (frame_info **) htab_find_slot (frame_stash, + frame, INSERT); /* If we already have a frame in the stack with the same id, we either have a stack cycle (corrupted stack?), or some bug @@ -298,15 +298,15 @@ frame_stash_add (frame_info *frame) given frame ID. If found, return that frame. Otherwise return NULL. */ -static struct frame_info * +static frame_info_ptr frame_stash_find (struct frame_id id) { struct frame_info dummy; - struct frame_info *frame; + frame_info *frame; dummy.this_id.value = id; - frame = (struct frame_info *) htab_find (frame_stash, &dummy); - return frame; + frame = (frame_info *) htab_find (frame_stash, &dummy); + return frame_info_ptr (frame); } /* Internal function to invalidate the frame stash by removing all @@ -505,8 +505,8 @@ frame_info::to_string () const Return FRAME if FRAME is a non-artificial frame. Return NULL if FRAME is the start of an artificial-only chain. */ -static struct frame_info * -skip_artificial_frames (struct frame_info *frame) +static frame_info_ptr +skip_artificial_frames (frame_info_ptr frame) { /* Note we use get_prev_frame_always, and not get_prev_frame. The latter will truncate the frame chain, leading to this function @@ -526,8 +526,8 @@ skip_artificial_frames (struct frame_info *frame) return frame; } -struct frame_info * -skip_unwritable_frames (struct frame_info *frame) +frame_info_ptr +skip_unwritable_frames (frame_info_ptr frame) { while (gdbarch_code_of_frame_writable (get_frame_arch (frame), frame) == 0) { @@ -541,8 +541,8 @@ skip_unwritable_frames (struct frame_info *frame) /* See frame.h. */ -struct frame_info * -skip_tailcall_frames (struct frame_info *frame) +frame_info_ptr +skip_tailcall_frames (frame_info_ptr frame) { while (get_frame_type (frame) == TAILCALL_FRAME) { @@ -560,7 +560,7 @@ skip_tailcall_frames (struct frame_info *frame) frame. */ static void -compute_frame_id (struct frame_info *fi) +compute_frame_id (frame_info_ptr fi) { FRAME_SCOPED_DEBUG_ENTER_EXIT; @@ -606,7 +606,7 @@ compute_frame_id (struct frame_info *fi) frame. */ struct frame_id -get_frame_id (struct frame_info *fi) +get_frame_id (frame_info_ptr fi) { if (fi == NULL) return null_frame_id; @@ -629,7 +629,7 @@ get_frame_id (struct frame_info *fi) /* Since this is the first frame in the chain, this should always succeed. */ - bool stashed = frame_stash_add (fi); + bool stashed = frame_stash_add (fi.get ()); gdb_assert (stashed); } @@ -637,15 +637,15 @@ get_frame_id (struct frame_info *fi) } struct frame_id -get_stack_frame_id (struct frame_info *next_frame) +get_stack_frame_id (frame_info_ptr next_frame) { return get_frame_id (skip_artificial_frames (next_frame)); } struct frame_id -frame_unwind_caller_id (struct frame_info *next_frame) +frame_unwind_caller_id (frame_info_ptr next_frame) { - struct frame_info *this_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 @@ -866,10 +866,10 @@ frame_id_inner (struct gdbarch *gdbarch, struct frame_id l, struct frame_id r) return inner; } -struct frame_info * +frame_info_ptr frame_find_by_id (struct frame_id id) { - struct frame_info *frame, *prev_frame; + frame_info_ptr frame, prev_frame; /* ZERO denotes the null frame, let the caller decide what to do about it. Should it instead return get_current_frame()? */ @@ -878,7 +878,7 @@ frame_find_by_id (struct frame_id id) /* Check for the sentinel frame. */ if (id == sentinel_frame_id) - return sentinel_frame; + return frame_info_ptr (sentinel_frame); /* Try using the frame stash first. Finding it there removes the need to perform the search by looping over all frames, which can be very @@ -919,7 +919,7 @@ frame_find_by_id (struct frame_id id) } static CORE_ADDR -frame_unwind_pc (struct frame_info *this_frame) +frame_unwind_pc (frame_info_ptr this_frame) { if (this_frame->prev_pc.status == CC_UNKNOWN) { @@ -994,7 +994,7 @@ frame_unwind_pc (struct frame_info *this_frame) } CORE_ADDR -frame_unwind_caller_pc (struct frame_info *this_frame) +frame_unwind_caller_pc (frame_info_ptr this_frame) { this_frame = skip_artificial_frames (this_frame); @@ -1007,9 +1007,9 @@ frame_unwind_caller_pc (struct frame_info *this_frame) } bool -get_frame_func_if_available (frame_info *this_frame, CORE_ADDR *pc) +get_frame_func_if_available (frame_info_ptr this_frame, CORE_ADDR *pc) { - struct frame_info *next_frame = this_frame->next; + frame_info *next_frame = this_frame->next; if (next_frame->prev_func.status == CC_UNKNOWN) { @@ -1050,7 +1050,7 @@ get_frame_func_if_available (frame_info *this_frame, CORE_ADDR *pc) } CORE_ADDR -get_frame_func (struct frame_info *this_frame) +get_frame_func (frame_info_ptr this_frame) { CORE_ADDR pc; @@ -1061,7 +1061,7 @@ get_frame_func (struct frame_info *this_frame) } std::unique_ptr -frame_save_as_regcache (struct frame_info *this_frame) +frame_save_as_regcache (frame_info_ptr this_frame) { auto cooked_read = [this_frame] (int regnum, gdb_byte *buf) { @@ -1078,9 +1078,9 @@ frame_save_as_regcache (struct frame_info *this_frame) } void -frame_pop (struct frame_info *this_frame) +frame_pop (frame_info_ptr this_frame) { - struct frame_info *prev_frame; + frame_info_ptr prev_frame; if (get_frame_type (this_frame) == DUMMY_FRAME) { @@ -1127,7 +1127,7 @@ frame_pop (struct frame_info *this_frame) } void -frame_register_unwind (frame_info *next_frame, int regnum, +frame_register_unwind (frame_info_ptr next_frame, int regnum, int *optimizedp, int *unavailablep, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, gdb_byte *bufferp) @@ -1170,7 +1170,7 @@ frame_register_unwind (frame_info *next_frame, int regnum, } void -frame_register (struct frame_info *frame, int regnum, +frame_register (frame_info_ptr frame, int regnum, int *optimizedp, int *unavailablep, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, gdb_byte *bufferp) { @@ -1185,12 +1185,12 @@ frame_register (struct frame_info *frame, int regnum, /* Obtain the register value by unwinding the register from the next (more inner frame). */ gdb_assert (frame != NULL && frame->next != NULL); - frame_register_unwind (frame->next, regnum, optimizedp, unavailablep, - lvalp, addrp, realnump, bufferp); + frame_register_unwind (frame_info_ptr (frame->next), regnum, optimizedp, + unavailablep, lvalp, addrp, realnump, bufferp); } void -frame_unwind_register (frame_info *next_frame, int regnum, gdb_byte *buf) +frame_unwind_register (frame_info_ptr next_frame, int regnum, gdb_byte *buf) { int optimized; int unavailable; @@ -1210,14 +1210,14 @@ frame_unwind_register (frame_info *next_frame, int regnum, gdb_byte *buf) } void -get_frame_register (struct frame_info *frame, +get_frame_register (frame_info_ptr frame, int regnum, gdb_byte *buf) { - frame_unwind_register (frame->next, regnum, buf); + frame_unwind_register (frame_info_ptr (frame->next), regnum, buf); } struct value * -frame_unwind_register_value (frame_info *next_frame, int regnum) +frame_unwind_register_value (frame_info_ptr next_frame, int regnum) { FRAME_SCOPED_DEBUG_ENTER_EXIT; @@ -1280,13 +1280,13 @@ frame_unwind_register_value (frame_info *next_frame, int regnum) } struct value * -get_frame_register_value (struct frame_info *frame, int regnum) +get_frame_register_value (frame_info_ptr frame, int regnum) { - return frame_unwind_register_value (frame->next, regnum); + return frame_unwind_register_value (frame_info_ptr (frame->next), regnum); } LONGEST -frame_unwind_register_signed (frame_info *next_frame, int regnum) +frame_unwind_register_signed (frame_info_ptr next_frame, int regnum) { struct gdbarch *gdbarch = frame_unwind_arch (next_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1312,13 +1312,13 @@ frame_unwind_register_signed (frame_info *next_frame, int regnum) } LONGEST -get_frame_register_signed (struct frame_info *frame, int regnum) +get_frame_register_signed (frame_info_ptr frame, int regnum) { - return frame_unwind_register_signed (frame->next, regnum); + return frame_unwind_register_signed (frame_info_ptr (frame->next), regnum); } ULONGEST -frame_unwind_register_unsigned (frame_info *next_frame, int regnum) +frame_unwind_register_unsigned (frame_info_ptr next_frame, int regnum) { struct gdbarch *gdbarch = frame_unwind_arch (next_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1346,13 +1346,13 @@ frame_unwind_register_unsigned (frame_info *next_frame, int regnum) } ULONGEST -get_frame_register_unsigned (struct frame_info *frame, int regnum) +get_frame_register_unsigned (frame_info_ptr frame, int regnum) { - return frame_unwind_register_unsigned (frame->next, regnum); + return frame_unwind_register_unsigned (frame_info_ptr (frame->next), regnum); } bool -read_frame_register_unsigned (frame_info *frame, int regnum, +read_frame_register_unsigned (frame_info_ptr frame, int regnum, ULONGEST *val) { struct value *regval = get_frame_register_value (frame, regnum); @@ -1373,7 +1373,7 @@ read_frame_register_unsigned (frame_info *frame, int regnum, } void -put_frame_register (struct frame_info *frame, int regnum, +put_frame_register (frame_info_ptr frame, int regnum, const gdb_byte *buf) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -1411,7 +1411,7 @@ put_frame_register (struct frame_info *frame, int regnum, Returns 0 if the register value could not be found. */ bool -deprecated_frame_register_read (frame_info *frame, int regnum, +deprecated_frame_register_read (frame_info_ptr frame, int regnum, gdb_byte *myaddr) { int optimized; @@ -1427,7 +1427,7 @@ deprecated_frame_register_read (frame_info *frame, int regnum, } bool -get_frame_register_bytes (frame_info *frame, int regnum, +get_frame_register_bytes (frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view buffer, int *optimizedp, int *unavailablep) @@ -1485,8 +1485,9 @@ get_frame_register_bytes (frame_info *frame, int regnum, } else { - struct value *value = frame_unwind_register_value (frame->next, - regnum); + struct value *value + = frame_unwind_register_value (frame_info_ptr (frame->next), + regnum); gdb_assert (value != NULL); *optimizedp = value_optimized_out (value); *unavailablep = !value_entirely_available (value); @@ -1515,7 +1516,7 @@ get_frame_register_bytes (frame_info *frame, int regnum, } void -put_frame_register_bytes (struct frame_info *frame, int regnum, +put_frame_register_bytes (frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view buffer) { @@ -1544,8 +1545,9 @@ put_frame_register_bytes (struct frame_info *frame, int regnum, } else { - struct value *value = frame_unwind_register_value (frame->next, - regnum); + struct value *value + = frame_unwind_register_value (frame_info_ptr (frame->next), + regnum); gdb_assert (value != NULL); memcpy ((char *) value_contents_writeable (value).data () + offset, @@ -1564,10 +1566,10 @@ put_frame_register_bytes (struct frame_info *frame, int regnum, /* Create a sentinel frame. */ -static struct frame_info * +static frame_info * create_sentinel_frame (struct program_space *pspace, struct regcache *regcache) { - struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info); + frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info); frame->level = -1; frame->pspace = pspace; @@ -1605,12 +1607,12 @@ frame_obstack_zalloc (unsigned long size) return data; } -static struct frame_info *get_prev_frame_always_1 (struct frame_info *this_frame); +static frame_info_ptr get_prev_frame_always_1 (frame_info_ptr this_frame); -struct frame_info * +frame_info_ptr get_current_frame (void) { - struct frame_info *current_frame; + frame_info_ptr current_frame; /* First check, and report, the lack of registers. Having GDB report "No stack!" or "No memory" when the target doesn't even @@ -1642,7 +1644,7 @@ get_current_frame (void) want to leave with the current frame created and linked in -- we should never end up with the sentinel frame as outermost frame. */ - current_frame = get_prev_frame_always_1 (sentinel_frame); + current_frame = get_prev_frame_always_1 (frame_info_ptr (sentinel_frame)); gdb_assert (current_frame != NULL); return current_frame; @@ -1673,7 +1675,7 @@ static int selected_frame_level = -1; /* The cached frame_info object pointing to the selected frame. Looked up on demand by get_selected_frame. */ -static struct frame_info *selected_frame; +static frame_info_ptr selected_frame; /* See frame.h. */ @@ -1711,7 +1713,7 @@ restore_selected_frame (frame_id frame_id, int frame_level) void lookup_selected_frame (struct frame_id a_frame_id, int frame_level) { - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; int count; /* This either means there was no selected frame, or the selected @@ -1801,7 +1803,7 @@ has_stack_frames () /* See frame.h. */ -struct frame_info * +frame_info_ptr get_selected_frame (const char *message) { if (selected_frame == NULL) @@ -1820,7 +1822,7 @@ get_selected_frame (const char *message) the inferior does not have a frame; in that case it will return NULL instead of calling error(). */ -struct frame_info * +frame_info_ptr deprecated_safe_get_selected_frame (void) { if (!has_stack_frames ()) @@ -1831,7 +1833,7 @@ deprecated_safe_get_selected_frame (void) /* Select frame FI (or NULL - to invalidate the selected frame). */ void -select_frame (struct frame_info *fi) +select_frame (frame_info_ptr fi) { selected_frame = fi; selected_frame_level = frame_relative_level (fi); @@ -1905,10 +1907,10 @@ select_frame (struct frame_info *fi) /* Create an arbitrary (i.e. address specified by user) or innermost frame. Always returns a non-NULL value. */ -struct frame_info * +frame_info_ptr create_new_frame (CORE_ADDR addr, CORE_ADDR pc) { - struct frame_info *fi; + frame_info *fi; frame_debug_printf ("addr=%s, pc=%s", hex_string (addr), hex_string (pc)); @@ -1930,25 +1932,25 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc) /* Select/initialize both the unwind function and the frame's type based on the PC. */ - frame_unwind_find_by_frame (fi, &fi->prologue_cache); + frame_unwind_find_by_frame (frame_info_ptr (fi), &fi->prologue_cache); fi->this_id.p = frame_id_status::COMPUTED; fi->this_id.value = frame_id_build (addr, pc); frame_debug_printf (" -> %s", fi->to_string ().c_str ()); - return fi; + return frame_info_ptr (fi); } /* Return the frame that THIS_FRAME calls (NULL if THIS_FRAME is the innermost frame). Be careful to not fall off the bottom of the frame chain and onto the sentinel frame. */ -struct frame_info * -get_next_frame (struct frame_info *this_frame) +frame_info_ptr +get_next_frame (frame_info_ptr this_frame) { if (this_frame->level > 0) - return this_frame->next; + return frame_info_ptr (this_frame->next); else return NULL; } @@ -1957,8 +1959,8 @@ get_next_frame (struct frame_info *this_frame) innermost (i.e. current) frame, return the sentinel frame. Thus, unlike get_next_frame(), NULL will never be returned. */ -struct frame_info * -get_next_frame_sentinel_okay (struct frame_info *this_frame) +frame_info_ptr +get_next_frame_sentinel_okay (frame_info_ptr this_frame) { gdb_assert (this_frame != NULL); @@ -1969,7 +1971,7 @@ get_next_frame_sentinel_okay (struct frame_info *this_frame) is likely a coding error. */ gdb_assert (this_frame != sentinel_frame); - return this_frame->next; + return frame_info_ptr (this_frame->next); } /* Observer for the target_changed event. */ @@ -1985,12 +1987,10 @@ frame_observer_target_changed (struct target_ops *target) void reinit_frame_cache (void) { - struct frame_info *fi; - ++frame_cache_generation; /* Tear down all frame caches. */ - for (fi = sentinel_frame; fi != NULL; fi = fi->prev) + for (frame_info *fi = sentinel_frame; fi != NULL; fi = fi->prev) { if (fi->prologue_cache && fi->unwind->dealloc_cache) fi->unwind->dealloc_cache (fi, fi->prologue_cache); @@ -2020,7 +2020,7 @@ reinit_frame_cache (void) relative to this particular frame. */ static void -frame_register_unwind_location (struct frame_info *this_frame, int regnum, +frame_register_unwind_location (frame_info_ptr this_frame, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump) { @@ -2063,10 +2063,10 @@ frame_register_unwind_location (struct frame_info *this_frame, int regnum, then the frame_id of the inline frame, calculated based off the frame_id of the previous frame, should also be a duplicate. */ -static struct frame_info * -get_prev_frame_maybe_check_cycle (struct frame_info *this_frame) +static frame_info_ptr +get_prev_frame_maybe_check_cycle (frame_info_ptr this_frame) { - struct frame_info *prev_frame = get_prev_frame_raw (this_frame); + frame_info_ptr prev_frame = get_prev_frame_raw (this_frame); /* Don't compute the frame id of the current frame yet. Unwinding the sentinel frame can fail (e.g., if the thread is gone and we @@ -2120,7 +2120,7 @@ get_prev_frame_maybe_check_cycle (struct frame_info *this_frame) PREV_FRAME into the cache; if PREV_FRAME is unique then we do want it in the cache, but if it is a duplicate and CYCLE_DETECTION_P is false, then we don't want to unlink it. */ - if (!frame_stash_add (prev_frame) && cycle_detection_p) + if (!frame_stash_add (prev_frame.get ()) && cycle_detection_p) { /* Another frame with the same id was already in the stash. We just detected a cycle. */ @@ -2151,8 +2151,8 @@ get_prev_frame_maybe_check_cycle (struct frame_info *this_frame) TRY_CATCH block. Return the frame that called THIS_FRAME or NULL if there is no such frame. This may throw an exception. */ -static struct frame_info * -get_prev_frame_always_1 (struct frame_info *this_frame) +static frame_info_ptr +get_prev_frame_always_1 (frame_info_ptr this_frame) { FRAME_SCOPED_DEBUG_ENTER_EXIT; @@ -2178,7 +2178,7 @@ get_prev_frame_always_1 (struct frame_info *this_frame) frame_debug_printf (" -> nullptr // %s // cached", frame_stop_reason_symbol_string (this_frame->stop_reason)); - return this_frame->prev; + return frame_info_ptr (this_frame->prev); } /* If the frame unwinder hasn't been selected yet, we must do so @@ -2236,9 +2236,9 @@ get_prev_frame_always_1 (struct frame_info *this_frame) See the comment at frame_id_inner for details. */ if (get_frame_type (this_frame) == NORMAL_FRAME && this_frame->next->unwind->type == NORMAL_FRAME - && frame_id_inner (get_frame_arch (this_frame->next), + && frame_id_inner (get_frame_arch (frame_info_ptr (this_frame->next)), get_frame_id (this_frame), - get_frame_id (this_frame->next))) + get_frame_id (frame_info_ptr (this_frame->next)))) { CORE_ADDR this_pc_in_block; struct minimal_symbol *morestack_msym; @@ -2274,8 +2274,8 @@ get_prev_frame_always_1 (struct frame_info *this_frame) if (this_frame->level > 0 && gdbarch_pc_regnum (gdbarch) >= 0 && get_frame_type (this_frame) == NORMAL_FRAME - && (get_frame_type (this_frame->next) == NORMAL_FRAME - || get_frame_type (this_frame->next) == INLINE_FRAME)) + && (get_frame_type (frame_info_ptr (this_frame->next)) == NORMAL_FRAME + || get_frame_type (frame_info_ptr (this_frame->next)) == INLINE_FRAME)) { int optimized, realnum, nrealnum; enum lval_type lval, nlval; @@ -2307,10 +2307,10 @@ get_prev_frame_always_1 (struct frame_info *this_frame) Unlike get_prev_frame, this function always tries to unwind the frame. */ -struct frame_info * -get_prev_frame_always (struct frame_info *this_frame) +frame_info_ptr +get_prev_frame_always (frame_info_ptr this_frame) { - struct frame_info *prev_frame = NULL; + frame_info_ptr prev_frame = NULL; try { @@ -2347,10 +2347,10 @@ get_prev_frame_always (struct frame_info *this_frame) /* Construct a new "struct frame_info" and link it previous to this_frame. */ -static struct frame_info * -get_prev_frame_raw (struct frame_info *this_frame) +static frame_info_ptr +get_prev_frame_raw (frame_info_ptr this_frame) { - struct frame_info *prev_frame; + frame_info *prev_frame; /* Allocate the new frame but do not wire it in to the frame chain. Some (bad) code in INIT_FRAME_EXTRA_INFO tries to look along @@ -2391,17 +2391,17 @@ get_prev_frame_raw (struct frame_info *this_frame) /* Link it in. */ this_frame->prev = prev_frame; - prev_frame->next = this_frame; + prev_frame->next = this_frame.get (); frame_debug_printf (" -> %s", prev_frame->to_string ().c_str ()); - return prev_frame; + return frame_info_ptr (prev_frame); } /* Debug routine to print a NULL frame being returned. */ static void -frame_debug_got_null_frame (struct frame_info *this_frame, +frame_debug_got_null_frame (frame_info_ptr this_frame, const char *reason) { if (frame_debug) @@ -2416,7 +2416,7 @@ frame_debug_got_null_frame (struct frame_info *this_frame, /* Is this (non-sentinel) frame in the "main"() function? */ static bool -inside_main_func (frame_info *this_frame) +inside_main_func (frame_info_ptr this_frame) { if (current_program_space->symfile_object_file == nullptr) return false; @@ -2453,7 +2453,7 @@ inside_main_func (frame_info *this_frame) /* Test whether THIS_FRAME is inside the process entry point function. */ static bool -inside_entry_func (frame_info *this_frame) +inside_entry_func (frame_info_ptr this_frame) { CORE_ADDR entry_point; @@ -2472,8 +2472,8 @@ inside_entry_func (frame_info *this_frame) This function should not contain target-dependent tests, such as checking whether the program-counter is zero. */ -struct frame_info * -get_prev_frame (struct frame_info *this_frame) +frame_info_ptr +get_prev_frame (frame_info_ptr this_frame) { FRAME_SCOPED_DEBUG_ENTER_EXIT; @@ -2571,21 +2571,21 @@ get_prev_frame (struct frame_info *this_frame) } CORE_ADDR -get_frame_pc (struct frame_info *frame) +get_frame_pc (frame_info_ptr frame) { gdb_assert (frame->next != NULL); - return frame_unwind_pc (frame->next); + return frame_unwind_pc (frame_info_ptr (frame->next)); } bool -get_frame_pc_if_available (frame_info *frame, CORE_ADDR *pc) +get_frame_pc_if_available (frame_info_ptr frame, CORE_ADDR *pc) { gdb_assert (frame->next != NULL); try { - *pc = frame_unwind_pc (frame->next); + *pc = frame_unwind_pc (frame_info_ptr (frame->next)); } catch (const gdb_exception_error &ex) { @@ -2601,12 +2601,12 @@ get_frame_pc_if_available (frame_info *frame, CORE_ADDR *pc) /* Return an address that falls within THIS_FRAME's code block. */ CORE_ADDR -get_frame_address_in_block (struct frame_info *this_frame) +get_frame_address_in_block (frame_info_ptr this_frame) { /* A draft address. */ CORE_ADDR pc = get_frame_pc (this_frame); - struct frame_info *next_frame = this_frame->next; + frame_info_ptr next_frame (this_frame->next); /* Calling get_frame_pc returns the resume address for THIS_FRAME. Normally the resume address is inside the body of the function @@ -2648,7 +2648,7 @@ get_frame_address_in_block (struct frame_info *this_frame) "calling" normal function should not be adjusted either. */ while (get_frame_type (next_frame) == INLINE_FRAME) - next_frame = next_frame->next; + next_frame = frame_info_ptr (next_frame->next); if ((get_frame_type (next_frame) == NORMAL_FRAME || get_frame_type (next_frame) == TAILCALL_FRAME) @@ -2661,7 +2661,7 @@ get_frame_address_in_block (struct frame_info *this_frame) } bool -get_frame_address_in_block_if_available (frame_info *this_frame, +get_frame_address_in_block_if_available (frame_info_ptr this_frame, CORE_ADDR *pc) { @@ -2680,9 +2680,9 @@ get_frame_address_in_block_if_available (frame_info *this_frame, } symtab_and_line -find_frame_sal (frame_info *frame) +find_frame_sal (frame_info_ptr frame) { - struct frame_info *next_frame; + frame_info_ptr next_frame; int notcurrent; CORE_ADDR pc; @@ -2738,7 +2738,7 @@ find_frame_sal (frame_info *frame) /* Per "frame.h", return the ``address'' of the frame. Code should really be using get_frame_id(). */ CORE_ADDR -get_frame_base (struct frame_info *fi) +get_frame_base (frame_info_ptr fi) { return get_frame_id (fi).stack_addr; } @@ -2746,7 +2746,7 @@ get_frame_base (struct frame_info *fi) /* High-level offsets into the frame. Used by the debug info. */ CORE_ADDR -get_frame_base_address (struct frame_info *fi) +get_frame_base_address (frame_info_ptr fi) { if (get_frame_type (fi) != NORMAL_FRAME) return 0; @@ -2760,7 +2760,7 @@ get_frame_base_address (struct frame_info *fi) } CORE_ADDR -get_frame_locals_address (struct frame_info *fi) +get_frame_locals_address (frame_info_ptr fi) { if (get_frame_type (fi) != NORMAL_FRAME) return 0; @@ -2775,7 +2775,7 @@ get_frame_locals_address (struct frame_info *fi) } CORE_ADDR -get_frame_args_address (struct frame_info *fi) +get_frame_args_address (frame_info_ptr fi) { if (get_frame_type (fi) != NORMAL_FRAME) return 0; @@ -2793,7 +2793,7 @@ get_frame_args_address (struct frame_info *fi) otherwise. */ bool -frame_unwinder_is (frame_info *fi, const frame_unwind *unwinder) +frame_unwinder_is (frame_info_ptr fi, const frame_unwind *unwinder) { if (fi->unwind == nullptr) frame_unwind_find_by_frame (fi, &fi->prologue_cache); @@ -2805,7 +2805,7 @@ frame_unwinder_is (frame_info *fi, const frame_unwind *unwinder) or -1 for a NULL frame. */ int -frame_relative_level (struct frame_info *fi) +frame_relative_level (frame_info_ptr fi) { if (fi == NULL) return -1; @@ -2814,7 +2814,7 @@ frame_relative_level (struct frame_info *fi) } enum frame_type -get_frame_type (struct frame_info *frame) +get_frame_type (frame_info_ptr frame) { if (frame->unwind == NULL) /* Initialize the frame's unwinder because that's what @@ -2824,13 +2824,13 @@ get_frame_type (struct frame_info *frame) } struct program_space * -get_frame_program_space (struct frame_info *frame) +get_frame_program_space (frame_info_ptr frame) { return frame->pspace; } struct program_space * -frame_unwind_program_space (struct frame_info *this_frame) +frame_unwind_program_space (frame_info_ptr this_frame) { gdb_assert (this_frame); @@ -2841,7 +2841,7 @@ frame_unwind_program_space (struct frame_info *this_frame) } const address_space * -get_frame_address_space (struct frame_info *frame) +get_frame_address_space (frame_info_ptr frame) { return frame->aspace; } @@ -2849,14 +2849,14 @@ get_frame_address_space (struct frame_info *frame) /* Memory access methods. */ void -get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr, +get_frame_memory (frame_info_ptr this_frame, CORE_ADDR addr, gdb::array_view buffer) { read_memory (addr, buffer.data (), buffer.size ()); } LONGEST -get_frame_memory_signed (struct frame_info *this_frame, CORE_ADDR addr, +get_frame_memory_signed (frame_info_ptr this_frame, CORE_ADDR addr, int len) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2866,7 +2866,7 @@ get_frame_memory_signed (struct frame_info *this_frame, CORE_ADDR addr, } ULONGEST -get_frame_memory_unsigned (struct frame_info *this_frame, CORE_ADDR addr, +get_frame_memory_unsigned (frame_info_ptr this_frame, CORE_ADDR addr, int len) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2876,7 +2876,7 @@ get_frame_memory_unsigned (struct frame_info *this_frame, CORE_ADDR addr, } bool -safe_frame_unwind_memory (struct frame_info *this_frame, +safe_frame_unwind_memory (frame_info_ptr this_frame, CORE_ADDR addr, gdb::array_view buffer) { /* NOTE: target_read_memory returns zero on success! */ @@ -2886,13 +2886,13 @@ safe_frame_unwind_memory (struct frame_info *this_frame, /* Architecture methods. */ struct gdbarch * -get_frame_arch (struct frame_info *this_frame) +get_frame_arch (frame_info_ptr this_frame) { - return frame_unwind_arch (this_frame->next); + return frame_unwind_arch (frame_info_ptr (this_frame->next)); } struct gdbarch * -frame_unwind_arch (struct frame_info *next_frame) +frame_unwind_arch (frame_info_ptr next_frame) { if (!next_frame->prev_arch.p) { @@ -2918,7 +2918,7 @@ frame_unwind_arch (struct frame_info *next_frame) } struct gdbarch * -frame_unwind_caller_arch (struct frame_info *next_frame) +frame_unwind_caller_arch (frame_info_ptr next_frame) { next_frame = skip_artificial_frames (next_frame); @@ -2933,7 +2933,7 @@ frame_unwind_caller_arch (struct frame_info *next_frame) /* Gets the language of FRAME. */ enum language -get_frame_language (struct frame_info *frame) +get_frame_language (frame_info_ptr frame) { CORE_ADDR pc = 0; bool pc_p = false; @@ -2974,19 +2974,19 @@ get_frame_language (struct frame_info *frame) /* Stack pointer methods. */ CORE_ADDR -get_frame_sp (struct frame_info *this_frame) +get_frame_sp (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); /* NOTE drow/2008-06-28: gdbarch_unwind_sp could be converted to operate on THIS_FRAME now. */ - return gdbarch_unwind_sp (gdbarch, this_frame->next); + return gdbarch_unwind_sp (gdbarch, frame_info_ptr (this_frame->next)); } /* Return the reason why we can't unwind past FRAME. */ enum unwind_stop_reason -get_frame_unwind_stop_reason (struct frame_info *frame) +get_frame_unwind_stop_reason (frame_info_ptr frame) { /* Fill-in STOP_REASON. */ get_prev_frame_always (frame); @@ -3014,7 +3014,7 @@ unwind_stop_reason_to_string (enum unwind_stop_reason reason) } const char * -frame_stop_reason_string (struct frame_info *fi) +frame_stop_reason_string (frame_info_ptr fi) { gdb_assert (fi->prev_p); gdb_assert (fi->prev == NULL); @@ -3050,7 +3050,7 @@ frame_stop_reason_symbol_string (enum unwind_stop_reason reason) FRAME. */ void -frame_cleanup_after_sniffer (struct frame_info *frame) +frame_cleanup_after_sniffer (frame_info_ptr frame) { /* The sniffer should not allocate a prologue cache if it did not match this frame. */ @@ -3080,7 +3080,7 @@ frame_cleanup_after_sniffer (struct frame_info *frame) frame_cleanup_after_sniffer. */ void -frame_prepare_for_sniffer (struct frame_info *frame, +frame_prepare_for_sniffer (frame_info_ptr frame, const struct frame_unwind *unwind) { gdb_assert (frame->unwind == NULL); @@ -3126,7 +3126,7 @@ the rest of the stack trace."), static void maintenance_print_frame_id (const char *args, int from_tty) { - struct frame_info *frame; + frame_info_ptr frame; /* Use the currently selected frame, or select a frame based on the level number passed by the user. */ diff --git a/gdb/frame.h b/gdb/frame.h index 9ad2599331f..759cd32c5e3 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -111,7 +111,7 @@ enum frame_id_stack_status /* The frame object. */ -struct frame_info; +class frame_info_ptr; /* The frame object's ID. This provides a per-frame unique identifier that can be used to relocate a `struct frame_info' after a target @@ -324,7 +324,7 @@ enum frame_type /* On demand, create the inner most frame using information found in the inferior. If the inner most frame can't be created, throw an error. */ -extern struct frame_info *get_current_frame (void); +extern frame_info_ptr get_current_frame (void); /* Does the current target interface have enough state to be able to query the current inferior for frame info, and is the inferior in a @@ -349,11 +349,11 @@ extern void reinit_frame_cache (void); It should instead, when a thread has previously had its frame selected (but not resumed) and the frame cache invalidated, find and then return that thread's previously selected frame. */ -extern struct frame_info *get_selected_frame (const char *message = nullptr); +extern frame_info_ptr get_selected_frame (const char *message = nullptr); /* Select a specific frame. NULL implies re-select the inner most frame. */ -extern void select_frame (struct frame_info *); +extern void select_frame (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. @@ -385,23 +385,23 @@ extern void lookup_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 struct frame_info *get_prev_frame (struct frame_info *); -extern struct frame_info *get_next_frame (struct frame_info *); +extern frame_info_ptr get_prev_frame (frame_info_ptr ); +extern frame_info_ptr get_next_frame (frame_info_ptr ); /* Like get_next_frame(), but allows return of the sentinel frame. NULL is never returned. */ -extern struct frame_info *get_next_frame_sentinel_okay (struct frame_info *); +extern frame_info_ptr get_next_frame_sentinel_okay (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 struct frame_info *get_prev_frame_always (struct frame_info *); +extern frame_info_ptr get_prev_frame_always (frame_info_ptr ); /* Given a frame's ID, relocate the frame. Returns NULL if the frame is not found. */ -extern struct frame_info *frame_find_by_id (struct frame_id id); +extern frame_info_ptr frame_find_by_id (struct frame_id id); /* Base attributes of a frame: */ @@ -409,12 +409,12 @@ extern struct frame_info *frame_find_by_id (struct frame_id id); this frame. This replaced: frame->pc; */ -extern CORE_ADDR get_frame_pc (struct frame_info *); +extern CORE_ADDR get_frame_pc (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 *frame, CORE_ADDR *pc); +extern bool get_frame_pc_if_available (frame_info_ptr frame, CORE_ADDR *pc); /* An address (not necessarily aligned to an instruction boundary) that falls within THIS frame's code block. @@ -429,32 +429,32 @@ extern bool get_frame_pc_if_available (frame_info *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 (struct frame_info *this_frame); +extern CORE_ADDR get_frame_address_in_block (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 *this_frame, +extern bool get_frame_address_in_block_if_available (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 (struct frame_info *); +extern CORE_ADDR get_frame_sp (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 (struct frame_info *fi); +extern CORE_ADDR get_frame_func (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 *fi, CORE_ADDR *); +extern bool get_frame_func_if_available (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 @@ -474,12 +474,12 @@ extern bool get_frame_func_if_available (frame_info *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 *frame); +extern symtab_and_line find_frame_sal (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 (struct frame_info *); +void set_current_sal_from_frame (frame_info_ptr ); /* Return the frame base (what ever that is) (DEPRECATED). @@ -503,52 +503,52 @@ void set_current_sal_from_frame (struct frame_info *); This replaced: frame->frame; */ -extern CORE_ADDR get_frame_base (struct frame_info *); +extern CORE_ADDR get_frame_base (frame_info_ptr ); /* Return the per-frame unique identifer. 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 (struct frame_info *fi); -extern struct frame_id get_stack_frame_id (struct frame_info *fi); -extern struct frame_id frame_unwind_caller_id (struct frame_info *next_frame); +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); /* 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 (struct frame_info *); +extern CORE_ADDR get_frame_base_address (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 (struct frame_info *); +extern CORE_ADDR get_frame_locals_address (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 (struct frame_info *); +extern CORE_ADDR get_frame_args_address (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 (struct frame_info *fi); +extern int frame_relative_level (frame_info_ptr fi); /* Return the frame's type. */ -extern enum frame_type get_frame_type (struct frame_info *); +extern enum frame_type get_frame_type (frame_info_ptr ); /* Return the frame's program space. */ -extern struct program_space *get_frame_program_space (struct frame_info *); +extern struct program_space *get_frame_program_space (frame_info_ptr ); /* Unwind THIS frame's program space from the NEXT frame. */ -extern struct program_space *frame_unwind_program_space (struct frame_info *); +extern struct program_space *frame_unwind_program_space (frame_info_ptr ); class address_space; /* Return the frame's address space. */ -extern const address_space *get_frame_address_space (struct frame_info *); +extern const address_space *get_frame_address_space (frame_info_ptr ); /* For frames where we can not unwind further, describe why. */ @@ -568,7 +568,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 (struct frame_info *); +enum unwind_stop_reason get_frame_unwind_stop_reason (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. @@ -585,13 +585,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 (struct frame_info *); +const char *frame_stop_reason_string (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 *frame, int regnum, +extern void frame_register_unwind (frame_info_ptr frame, int regnum, int *optimizedp, int *unavailablep, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, @@ -603,23 +603,23 @@ extern void frame_register_unwind (frame_info *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 *next_frame, +extern void frame_unwind_register (frame_info_ptr next_frame, int regnum, gdb_byte *buf); -extern void get_frame_register (struct frame_info *frame, +extern void get_frame_register (frame_info_ptr frame, int regnum, gdb_byte *buf); -struct value *frame_unwind_register_value (frame_info *next_frame, +struct value *frame_unwind_register_value (frame_info_ptr next_frame, int regnum); -struct value *get_frame_register_value (struct frame_info *frame, +struct value *get_frame_register_value (frame_info_ptr frame, int regnum); -extern LONGEST frame_unwind_register_signed (frame_info *next_frame, +extern LONGEST frame_unwind_register_signed (frame_info_ptr next_frame, int regnum); -extern LONGEST get_frame_register_signed (struct frame_info *frame, +extern LONGEST get_frame_register_signed (frame_info_ptr frame, int regnum); -extern ULONGEST frame_unwind_register_unsigned (frame_info *frame, +extern ULONGEST frame_unwind_register_unsigned (frame_info_ptr frame, int regnum); -extern ULONGEST get_frame_register_unsigned (struct frame_info *frame, +extern ULONGEST get_frame_register_unsigned (frame_info_ptr frame, int regnum); /* Read a register from this, or unwind a register from the next @@ -627,7 +627,7 @@ extern ULONGEST get_frame_register_unsigned (struct frame_info *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 *frame, +extern bool read_frame_register_unsigned (frame_info_ptr frame, int regnum, ULONGEST *val); /* Get the value of the register that belongs to this FRAME. This @@ -635,7 +635,7 @@ extern bool read_frame_register_unsigned (frame_info *frame, (get_next_frame (FRAME))''. As per frame_register_unwind(), if VALUEP is NULL, the registers value is not fetched/computed. */ -extern void frame_register (struct frame_info *frame, int regnum, +extern void frame_register (frame_info_ptr frame, int regnum, int *optimizedp, int *unavailablep, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, @@ -644,21 +644,21 @@ extern void frame_register (struct frame_info *frame, int regnum, /* The reverse. Store a register value relative to the specified frame. Note: this call makes the frame's state undefined. The register and frame caches must be flushed. */ -extern void put_frame_register (struct frame_info *frame, int regnum, +extern void put_frame_register (frame_info_ptr frame, int regnum, const gdb_byte *buf); /* Read LEN bytes from one or multiple registers starting with REGNUM in frame 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 *frame, int regnum, +extern bool get_frame_register_bytes (frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view buffer, int *optimizedp, int *unavailablep); /* Write bytes from BUFFER to one or multiple registers starting with REGNUM in frame FRAME, starting at OFFSET. */ -extern void put_frame_register_bytes (struct frame_info *frame, int regnum, +extern void put_frame_register_bytes (frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view buffer); @@ -666,11 +666,11 @@ extern void put_frame_register_bytes (struct frame_info *frame, int regnum, calling frame. For GDB, `pc' is the resume address and not a specific register. */ -extern CORE_ADDR frame_unwind_caller_pc (struct frame_info *frame); +extern CORE_ADDR frame_unwind_caller_pc (frame_info_ptr frame); /* Discard the specified frame. Restoring the registers to the state of the caller. */ -extern void frame_pop (struct frame_info *frame); +extern void frame_pop (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 @@ -685,26 +685,26 @@ extern void frame_pop (struct frame_info *frame); If architecture / memory changes are always separated by special adaptor frames this should be ok. */ -extern void get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr, +extern void get_frame_memory (frame_info_ptr this_frame, CORE_ADDR addr, gdb::array_view buffer); -extern LONGEST get_frame_memory_signed (struct frame_info *this_frame, +extern LONGEST get_frame_memory_signed (frame_info_ptr this_frame, CORE_ADDR memaddr, int len); -extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame, +extern ULONGEST get_frame_memory_unsigned (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 *this_frame, CORE_ADDR addr, +extern bool safe_frame_unwind_memory (frame_info_ptr this_frame, CORE_ADDR addr, gdb::array_view buffer); /* Return this frame's architecture. */ -extern struct gdbarch *get_frame_arch (struct frame_info *this_frame); +extern struct gdbarch *get_frame_arch (frame_info_ptr this_frame); /* Return the previous frame's architecture. */ -extern struct gdbarch *frame_unwind_arch (frame_info *next_frame); +extern struct gdbarch *frame_unwind_arch (frame_info_ptr next_frame); /* Return the previous frame's architecture, skipping inline functions. */ -extern struct gdbarch *frame_unwind_caller_arch (struct frame_info *frame); +extern struct gdbarch *frame_unwind_caller_arch (frame_info_ptr frame); /* Values for the source flag to be used in print_frame_info (). @@ -744,9 +744,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 frame_save_as_regcache - (struct frame_info *this_frame); + (frame_info_ptr this_frame); -extern const struct block *get_frame_block (struct frame_info *, +extern const struct block *get_frame_block (frame_info_ptr , CORE_ADDR *addr_in_block); /* Return the `struct block' that belongs to the selected thread's @@ -777,32 +777,32 @@ extern const struct block *get_frame_block (struct frame_info *, extern const struct block *get_selected_block (CORE_ADDR *addr_in_block); -extern struct symbol *get_frame_function (struct frame_info *); +extern struct symbol *get_frame_function (frame_info_ptr ); extern CORE_ADDR get_pc_function_start (CORE_ADDR); -extern struct frame_info *find_relative_frame (struct frame_info *, int *); +extern frame_info_ptr find_relative_frame (frame_info_ptr , int *); /* Wrapper over print_stack_frame modifying current_uiout with UIOUT for the function call. */ extern void print_stack_frame_to_uiout (struct ui_out *uiout, - struct frame_info *, int print_level, + frame_info_ptr , int print_level, enum print_what print_what, int set_current_sal); -extern void print_stack_frame (struct frame_info *, int print_level, +extern void print_stack_frame (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, - struct frame_info *, int print_level, + frame_info_ptr , int print_level, enum print_what print_what, int args, int set_current_sal); -extern struct frame_info *block_innermost_frame (const struct block *); +extern frame_info_ptr block_innermost_frame (const struct block *); -extern bool deprecated_frame_register_read (frame_info *frame, int regnum, +extern bool deprecated_frame_register_read (frame_info_ptr frame, int regnum, gdb_byte *buf); /* From stack.c. */ @@ -874,10 +874,10 @@ struct frame_arg }; extern void read_frame_arg (const frame_print_options &fp_opts, - symbol *sym, frame_info *frame, + symbol *sym, frame_info_ptr frame, struct frame_arg *argp, struct frame_arg *entryargp); -extern void read_frame_local (struct symbol *sym, struct frame_info *frame, +extern void read_frame_local (struct symbol *sym, frame_info_ptr frame, struct frame_arg *argp); extern void info_args_command (const char *, int); @@ -890,13 +890,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 (struct frame_info *frame, +extern void frame_prepare_for_sniffer (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 (struct frame_info *frame); +extern void frame_cleanup_after_sniffer (frame_info_ptr frame); /* Notes (cagney/2002-11-27, drow/2003-09-06): @@ -928,31 +928,31 @@ extern void frame_cleanup_after_sniffer (struct frame_info *frame); This function calls get_selected_frame if the inferior should have a frame, or returns NULL otherwise. */ -extern struct frame_info *deprecated_safe_get_selected_frame (void); +extern frame_info_ptr deprecated_safe_get_selected_frame (void); /* Create a frame using the specified BASE and PC. */ -extern struct frame_info *create_new_frame (CORE_ADDR base, CORE_ADDR pc); +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 *fi, const frame_unwind *unwinder); +extern bool frame_unwinder_is (frame_info_ptr fi, const frame_unwind *unwinder); /* Return the language of FRAME. */ -extern enum language get_frame_language (struct frame_info *frame); +extern enum language get_frame_language (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 struct frame_info *skip_tailcall_frames (struct frame_info *frame); +extern frame_info_ptr skip_tailcall_frames (frame_info_ptr frame); /* Return the first frame above FRAME or FRAME of which the code is writable. */ -extern struct frame_info *skip_unwritable_frames (struct frame_info *frame); +extern frame_info_ptr skip_unwritable_frames (frame_info_ptr frame); /* Data for the "set backtrace" settings. */ @@ -984,11 +984,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 (struct frame_info *frame); +extern void set_frame_previous_pc_masked (frame_info_ptr frame); /* Get whether the PC value is masked for the given frame. */ -extern bool get_frame_pc_masked (const struct frame_info *frame); +extern bool get_frame_pc_masked (frame_info_ptr frame); #endif /* !defined (FRAME_H) */ diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c index b60af84e676..9a2593e10dc 100644 --- a/gdb/frv-linux-tdep.c +++ b/gdb/frv-linux-tdep.c @@ -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 (struct frame_info *this_frame, int regno, +frv_linux_sigcontext_reg_addr (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 (struct frame_info *this_frame, int regno, /* Signal trampolines. */ static struct trad_frame_cache * -frv_linux_sigtramp_frame_cache (struct frame_info *this_frame, +frv_linux_sigtramp_frame_cache (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 (struct frame_info *this_frame, } static void -frv_linux_sigtramp_frame_this_id (struct frame_info *this_frame, +frv_linux_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -307,7 +307,7 @@ frv_linux_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -frv_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, +frv_linux_sigtramp_frame_prev_register (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 (struct frame_info *this_frame, static int frv_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index a11277cf7d0..a72f999f139 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -504,7 +504,7 @@ is_argument_reg (int reg) prologue analysis. */ static CORE_ADDR frv_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct frv_unwind_cache *info) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1078,7 +1078,7 @@ frv_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) static struct frv_unwind_cache * -frv_frame_unwind_cache (struct frame_info *this_frame, +frv_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1363,7 +1363,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 (struct frame_info *this_frame, +frv_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { struct frv_unwind_cache *info @@ -1393,7 +1393,7 @@ frv_frame_this_id (struct frame_info *this_frame, } static struct value * -frv_frame_prev_register (struct frame_info *this_frame, +frv_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct frv_unwind_cache *info @@ -1412,7 +1412,7 @@ static const struct frame_unwind frv_frame_unwind = { }; static CORE_ADDR -frv_frame_base_address (struct frame_info *this_frame, void **this_cache) +frv_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct frv_unwind_cache *info = frv_frame_unwind_cache (this_frame, this_cache); diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c index 4105f650b2d..8da3dbae592 100644 --- a/gdb/ft32-tdep.c +++ b/gdb/ft32-tdep.c @@ -449,7 +449,7 @@ ft32_alloc_frame_cache (void) /* Populate a ft32_frame_cache object for this_frame. */ static struct ft32_frame_cache * -ft32_frame_cache (struct frame_info *this_frame, void **this_cache) +ft32_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct ft32_frame_cache *cache; CORE_ADDR current_pc; @@ -489,7 +489,7 @@ ft32_frame_cache (struct frame_info *this_frame, void **this_cache) frame. This will be used to create a new GDB frame struct. */ static void -ft32_frame_this_id (struct frame_info *this_frame, +ft32_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { struct ft32_frame_cache *cache = ft32_frame_cache (this_frame, @@ -505,7 +505,7 @@ ft32_frame_this_id (struct frame_info *this_frame, /* Get the value of register regnum in the previous stack frame. */ static struct value * -ft32_frame_prev_register (struct frame_info *this_frame, +ft32_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct ft32_frame_cache *cache = ft32_frame_cache (this_frame, @@ -537,7 +537,7 @@ static const struct frame_unwind ft32_frame_unwind = /* Return the base address of this_frame. */ static CORE_ADDR -ft32_frame_base_address (struct frame_info *this_frame, void **this_cache) +ft32_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct ft32_frame_cache *cache = ft32_frame_cache (this_frame, this_cache); diff --git a/gdb/gcore.c b/gdb/gcore.c index 519007714e5..ede78534bd8 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -198,7 +198,7 @@ default_gcore_target (void) static int derive_stack_segment (bfd_vma *bottom, bfd_vma *top) { - struct frame_info *fi, *tmp_fi; + frame_info_ptr fi, tmp_fi; gdb_assert (bottom); gdb_assert (top); diff --git a/gdb/gdbarch-components.py b/gdb/gdbarch-components.py index b8d7648d5ec..ba16f4a6a1a 100644 --- a/gdb/gdbarch-components.py +++ b/gdb/gdbarch-components.py @@ -613,7 +613,7 @@ frame. """, type="struct frame_id", name="dummy_id", - params=[("struct frame_info *", "this_frame")], + params=[("frame_info_ptr ", "this_frame")], predefault="default_dummy_id", invalid=False, ) @@ -676,7 +676,7 @@ Return true if the code of FRAME is writable. """, type="int", name="code_of_frame_writable", - params=[("struct frame_info *", "frame")], + params=[("frame_info_ptr ", "frame")], predefault="default_code_of_frame_writable", invalid=False, ) @@ -686,7 +686,7 @@ Method( name="print_registers_info", params=[ ("struct ui_file *", "file"), - ("struct frame_info *", "frame"), + ("frame_info_ptr ", "frame"), ("int", "regnum"), ("int", "all"), ], @@ -699,7 +699,7 @@ Method( name="print_float_info", params=[ ("struct ui_file *", "file"), - ("struct frame_info *", "frame"), + ("frame_info_ptr ", "frame"), ("const char *", "args"), ], predefault="default_print_float_info", @@ -711,7 +711,7 @@ Method( name="print_vector_info", params=[ ("struct ui_file *", "file"), - ("struct frame_info *", "frame"), + ("frame_info_ptr ", "frame"), ("const char *", "args"), ], predicate=True, @@ -755,7 +755,7 @@ FRAME corresponds to the longjmp frame. """, type="int", name="get_longjmp_target", - params=[("struct frame_info *", "frame"), ("CORE_ADDR *", "pc")], + params=[("frame_info_ptr ", "frame"), ("CORE_ADDR *", "pc")], predicate=True, invalid=True, ) @@ -778,7 +778,7 @@ Function( type="int", name="register_to_value", params=[ - ("struct frame_info *", "frame"), + ("frame_info_ptr ", "frame"), ("int", "regnum"), ("struct type *", "type"), ("gdb_byte *", "buf"), @@ -792,7 +792,7 @@ Function( type="void", name="value_to_register", params=[ - ("struct frame_info *", "frame"), + ("frame_info_ptr ", "frame"), ("int", "regnum"), ("struct type *", "type"), ("const gdb_byte *", "buf"), @@ -1065,7 +1065,7 @@ Value( Method( type="CORE_ADDR", name="unwind_pc", - params=[("struct frame_info *", "next_frame")], + params=[("frame_info_ptr ", "next_frame")], predefault="default_unwind_pc", invalid=False, ) @@ -1073,7 +1073,7 @@ Method( Method( type="CORE_ADDR", name="unwind_sp", - params=[("struct frame_info *", "next_frame")], + params=[("frame_info_ptr ", "next_frame")], predefault="default_unwind_sp", invalid=False, ) @@ -1085,7 +1085,7 @@ frame-base. Enable frame-base before frame-unwind. """, type="int", name="frame_num_args", - params=[("struct frame_info *", "frame")], + params=[("frame_info_ptr ", "frame")], predicate=True, invalid=True, ) @@ -1260,7 +1260,7 @@ further single-step is needed before the instruction finishes. """, type="int", name="single_step_through_delay", - params=[("struct frame_info *", "frame")], + params=[("frame_info_ptr ", "frame")], predicate=True, invalid=True, ) @@ -1280,7 +1280,7 @@ disassembler. Perhaps objdump can handle it? Function( type="CORE_ADDR", name="skip_trampoline_code", - params=[("struct frame_info *", "frame"), ("CORE_ADDR", "pc")], + params=[("frame_info_ptr ", "frame"), ("CORE_ADDR", "pc")], predefault="generic_skip_trampoline_code", invalid=False, ) @@ -1503,7 +1503,7 @@ Fetch the pointer to the ith function argument. type="CORE_ADDR", name="fetch_pointer_argument", params=[ - ("struct frame_info *", "frame"), + ("frame_info_ptr ", "frame"), ("int", "argi"), ("struct type *", "type"), ], @@ -2664,7 +2664,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 *", "frame"), ("CORE_ADDR", "pc")], + params=[("frame_info_ptr ", "frame"), ("CORE_ADDR", "pc")], predefault="default_get_pc_address_flags", invalid=False, ) diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index 383d84f8142..840de585869 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -315,8 +315,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, struct frame_info *this_frame); -extern struct frame_id gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_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); extern void set_gdbarch_dummy_id (struct gdbarch *gdbarch, gdbarch_dummy_id_ftype *dummy_id); /* Implement DUMMY_ID and PUSH_DUMMY_CALL, then delete @@ -342,22 +342,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, struct frame_info *frame); -extern int gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame); +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); 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, struct frame_info *frame, int regnum, int all); -extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); +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); 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, struct frame_info *frame, const char *args); -extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); +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); 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, struct frame_info *frame, const char *args); -extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); +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); 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 @@ -382,8 +382,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) (struct frame_info *frame, CORE_ADDR *pc); -extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc); +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); 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); @@ -393,12 +393,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) (struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep); -extern int gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep); +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); 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) (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf); -extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf); +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); 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 @@ -567,12 +567,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, struct frame_info *next_frame); -extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame); +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); 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, struct frame_info *next_frame); -extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame); +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); 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 @@ -580,8 +580,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) (struct frame_info *frame); -extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame); +typedef int (gdbarch_frame_num_args_ftype) (frame_info_ptr frame); +extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, 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); @@ -693,8 +693,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, struct frame_info *frame); -extern int gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame); +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); 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 @@ -704,8 +704,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) (struct frame_info *frame, CORE_ADDR pc); -extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc); +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); extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code); /* Vtable of solib operations functions. */ @@ -852,8 +852,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) (struct frame_info *frame, int argi, struct type *type); -extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type); +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); 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 @@ -1629,8 +1629,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 *frame, CORE_ADDR pc); -extern std::string gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_ADDR pc); +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); 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 */ diff --git a/gdb/gdbarch-selftests.c b/gdb/gdbarch-selftests.c index fa3f4d180cf..75d18111c0d 100644 --- a/gdb/gdbarch-selftests.c +++ b/gdb/gdbarch-selftests.c @@ -73,7 +73,7 @@ register_to_value_test (struct gdbarch *gdbarch) scoped_mock_context mockctx (gdbarch); - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); const int num_regs = gdbarch_num_cooked_regs (gdbarch); /* Test gdbarch methods register_to_value and value_to_register with diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 4b0c10be402..559e92dee58 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -2269,7 +2269,7 @@ set_gdbarch_register_type (struct gdbarch *gdbarch, } struct frame_id -gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +gdbarch_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->dummy_id != NULL); @@ -2368,7 +2368,7 @@ set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, } int -gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame) +gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, frame_info_ptr frame) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->code_of_frame_writable != NULL); @@ -2385,7 +2385,7 @@ set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, } void -gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) +gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, int regnum, int all) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_registers_info != NULL); @@ -2402,7 +2402,7 @@ set_gdbarch_print_registers_info (struct gdbarch *gdbarch, } void -gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) +gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_float_info != NULL); @@ -2426,7 +2426,7 @@ gdbarch_print_vector_info_p (struct gdbarch *gdbarch) } void -gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) +gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->print_vector_info != NULL); @@ -2501,7 +2501,7 @@ gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) } int -gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc) +gdbarch_get_longjmp_target (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR *pc) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_longjmp_target != NULL); @@ -2552,7 +2552,7 @@ set_gdbarch_convert_register_p (struct gdbarch *gdbarch, } int -gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep) +gdbarch_register_to_value (struct gdbarch *gdbarch, 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); @@ -2569,7 +2569,7 @@ set_gdbarch_register_to_value (struct gdbarch *gdbarch, } void -gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf) +gdbarch_value_to_register (struct gdbarch *gdbarch, frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *buf) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->value_to_register != NULL); @@ -3026,7 +3026,7 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, } CORE_ADDR -gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +gdbarch_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->unwind_pc != NULL); @@ -3043,7 +3043,7 @@ set_gdbarch_unwind_pc (struct gdbarch *gdbarch, } CORE_ADDR -gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) +gdbarch_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->unwind_sp != NULL); @@ -3067,7 +3067,7 @@ gdbarch_frame_num_args_p (struct gdbarch *gdbarch) } int -gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) +gdbarch_frame_num_args (struct gdbarch *gdbarch, frame_info_ptr frame) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->frame_num_args != NULL); @@ -3326,7 +3326,7 @@ gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch) } int -gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame) +gdbarch_single_step_through_delay (struct gdbarch *gdbarch, frame_info_ptr frame) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->single_step_through_delay != NULL); @@ -3360,7 +3360,7 @@ set_gdbarch_print_insn (struct gdbarch *gdbarch, } CORE_ADDR -gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc) +gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->skip_trampoline_code != NULL); @@ -3700,7 +3700,7 @@ gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) } CORE_ADDR -gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type) +gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, frame_info_ptr frame, int argi, struct type *type) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->fetch_pointer_argument != NULL); @@ -5357,7 +5357,7 @@ set_gdbarch_type_align (struct gdbarch *gdbarch, } std::string -gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_ADDR pc) +gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->get_pc_address_flags != NULL); diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 94d4b6684fb..19700a7153e 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -56,6 +56,7 @@ #include "dwarf2.h" #include "gdbsupport/gdb_obstack.h" #include "gmp-utils.h" +#include "frame-info.h" /* Forward declarations for prototypes. */ struct field; @@ -1901,7 +1902,7 @@ struct call_site_target void iterate_over_addresses (struct gdbarch *call_site_gdbarch, const struct call_site *call_site, - struct frame_info *caller_frame, + frame_info_ptr caller_frame, iterate_ftype callback) const; private: @@ -2008,7 +2009,7 @@ struct call_site throw NO_ENTRY_VALUE_ERROR. */ void iterate_over_addresses (struct gdbarch *call_site_gdbarch, - struct frame_info *caller_frame, + frame_info_ptr caller_frame, call_site_target::iterate_ftype callback) const { diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index ed604ce2674..2f000e634a4 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -1215,7 +1215,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 (struct frame_info *frame, CORE_ADDR stop_pc) +gnuv3_skip_trampoline (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); diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c index 77764944208..159603b8008 100644 --- a/gdb/guile/scm-frame.c +++ b/gdb/guile/scm-frame.c @@ -134,7 +134,7 @@ frscm_eq_frame_smob (const void *ap, const void *bp) const frame_smob *a = (const frame_smob *) ap; const frame_smob *b = (const frame_smob *) bp; - return (a->frame_id == b->frame_id + return (frame_id_eq (a->frame_id, b->frame_id) && a->inferior == b->inferior && a->inferior != NULL); } diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 8f8461fe61d..503c01bc8a9 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -404,7 +404,7 @@ h8300_analyze_prologue (struct gdbarch *gdbarch, } static struct h8300_frame_cache * -h8300_frame_cache (struct frame_info *this_frame, void **this_cache) +h8300_frame_cache (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 (struct frame_info *this_frame, void **this_cache) } static void -h8300_frame_this_id (struct frame_info *this_frame, void **this_cache, +h8300_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } static struct value * -h8300_frame_prev_register (struct frame_info *this_frame, void **this_cache, +h8300_frame_prev_register (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 (struct frame_info *this_frame, void **this_cache) +h8300_frame_base_address (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, - struct frame_info *frame, int regno) + 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, - struct frame_info *frame, int regno, int cpregs) + frame_info_ptr frame, int regno, int cpregs) { if (regno < 0) { diff --git a/gdb/hppa-bsd-tdep.c b/gdb/hppa-bsd-tdep.c index c405511529d..458c22085d7 100644 --- a/gdb/hppa-bsd-tdep.c +++ b/gdb/hppa-bsd-tdep.c @@ -107,7 +107,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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { if (regnum == HPPA_PCOQ_HEAD_REGNUM) reg->how = DWARF2_FRAME_REG_RA; diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c index f17d2ae6b02..2a1aa6c24b3 100644 --- a/gdb/hppa-linux-tdep.c +++ b/gdb/hppa-linux-tdep.c @@ -193,7 +193,7 @@ struct hppa_linux_sigtramp_unwind_cache }; static struct hppa_linux_sigtramp_unwind_cache * -hppa_linux_sigtramp_frame_unwind_cache (struct frame_info *this_frame, +hppa_linux_sigtramp_frame_unwind_cache (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 (struct frame_info *this_frame, } static void -hppa_linux_sigtramp_frame_this_id (struct frame_info *this_frame, +hppa_linux_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -278,7 +278,7 @@ hppa_linux_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -hppa_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, +hppa_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { @@ -296,7 +296,7 @@ hppa_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, we can find the beginning of the struct rt_sigframe. */ static int hppa_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); diff --git a/gdb/hppa-netbsd-tdep.c b/gdb/hppa-netbsd-tdep.c index 8b1a03b462e..3c5364cb370 100644 --- a/gdb/hppa-netbsd-tdep.c +++ b/gdb/hppa-netbsd-tdep.c @@ -64,7 +64,7 @@ static int hppanbsd_mc_reg_offset[] = }; static void hppanbsd_sigtramp_cache_init (const struct tramp_frame *, - struct frame_info *, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 2ab3095359b..9088225f206 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1830,7 +1830,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 (struct frame_info *this_frame) +hppa_find_unwind_entry_in_block (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_address_in_block (this_frame); @@ -1851,7 +1851,7 @@ struct hppa_frame_cache }; static struct hppa_frame_cache * -hppa_frame_cache (struct frame_info *this_frame, void **this_cache) +hppa_frame_cache (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); @@ -2252,7 +2252,7 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -hppa_frame_this_id (struct frame_info *this_frame, void **this_cache, +hppa_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct hppa_frame_cache *info; @@ -2265,7 +2265,7 @@ hppa_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -hppa_frame_prev_register (struct frame_info *this_frame, +hppa_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct hppa_frame_cache *info = hppa_frame_cache (this_frame, this_cache); @@ -2276,7 +2276,7 @@ hppa_frame_prev_register (struct frame_info *this_frame, static int hppa_frame_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + frame_info_ptr this_frame, void **this_cache) { if (hppa_find_unwind_entry_in_block (this_frame)) return 1; @@ -2304,7 +2304,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 (struct frame_info *this_frame, void **this_cache) +hppa_fallback_frame_cache (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); @@ -2377,7 +2377,7 @@ hppa_fallback_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -hppa_fallback_frame_this_id (struct frame_info *this_frame, void **this_cache, +hppa_fallback_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct hppa_frame_cache *info = @@ -2387,7 +2387,7 @@ hppa_fallback_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -hppa_fallback_frame_prev_register (struct frame_info *this_frame, +hppa_fallback_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct hppa_frame_cache *info @@ -2416,7 +2416,7 @@ struct hppa_stub_unwind_cache }; static struct hppa_stub_unwind_cache * -hppa_stub_frame_unwind_cache (struct frame_info *this_frame, +hppa_stub_frame_unwind_cache (frame_info_ptr this_frame, void **this_cache) { struct hppa_stub_unwind_cache *info; @@ -2437,7 +2437,7 @@ hppa_stub_frame_unwind_cache (struct frame_info *this_frame, } static void -hppa_stub_frame_this_id (struct frame_info *this_frame, +hppa_stub_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -2449,7 +2449,7 @@ hppa_stub_frame_this_id (struct frame_info *this_frame, } static struct value * -hppa_stub_frame_prev_register (struct frame_info *this_frame, +hppa_stub_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct hppa_stub_unwind_cache *info @@ -2464,7 +2464,7 @@ hppa_stub_frame_prev_register (struct frame_info *this_frame, static int hppa_stub_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_address_in_block (this_frame); @@ -2490,7 +2490,7 @@ static const struct frame_unwind hppa_stub_frame_unwind = { }; CORE_ADDR -hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +hppa_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { ULONGEST ipsw; CORE_ADDR pc; @@ -2707,7 +2707,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 (struct frame_info *frame, int argi, +hppa_fetch_pointer_argument (frame_info_ptr frame, int argi, struct type *type) { return get_frame_register_unsigned (frame, HPPA_R0_REGNUM + 26 - argi); @@ -2738,7 +2738,7 @@ hppa_find_global_pointer (struct gdbarch *gdbarch, struct value *function) } struct value * -hppa_frame_prev_register_helper (struct frame_info *this_frame, +hppa_frame_prev_register_helper (frame_info_ptr this_frame, trad_frame_saved_reg saved_regs[], int regnum) { @@ -2916,7 +2916,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 (struct frame_info *frame, CORE_ADDR pc) +hppa_skip_trampoline_code (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; diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h index c2c9e0e0b5e..d0e0d4d6a3a 100644 --- a/gdb/hppa-tdep.h +++ b/gdb/hppa-tdep.h @@ -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) (struct frame_info *this_frame, CORE_ADDR base, + void (*unwind_adjust_stub) (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,14 +201,14 @@ int hppa_extract_14 (unsigned); CORE_ADDR hppa_symbol_address(const char *sym); extern struct value * - hppa_frame_prev_register_helper (struct frame_info *this_frame, + hppa_frame_prev_register_helper (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, - struct frame_info *next_frame); + frame_info_ptr next_frame); extern struct bound_minimal_symbol hppa_lookup_stub_minimal_symbol (const char *name, @@ -216,6 +216,6 @@ extern struct bound_minimal_symbol extern int hppa_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc); -extern CORE_ADDR hppa_skip_trampoline_code (struct frame_info *, CORE_ADDR pc); +extern CORE_ADDR hppa_skip_trampoline_code (frame_info_ptr , CORE_ADDR pc); #endif /* hppa-tdep.h */ diff --git a/gdb/i386-bsd-tdep.c b/gdb/i386-bsd-tdep.c index dbbd3c786c3..dd91e302128 100644 --- a/gdb/i386-bsd-tdep.c +++ b/gdb/i386-bsd-tdep.c @@ -32,7 +32,7 @@ address of the associated sigcontext structure. */ static CORE_ADDR -i386bsd_sigcontext_addr (struct frame_info *this_frame) +i386bsd_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c index f562406ad2d..db2f47afc25 100644 --- a/gdb/i386-darwin-tdep.c +++ b/gdb/i386-darwin-tdep.c @@ -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 (struct frame_info *this_frame) +i386_darwin_sigcontext_addr (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 (struct frame_info *this_frame) int darwin_dwarf_signal_frame_p (struct gdbarch *gdbarch, - struct frame_info *this_frame) + frame_info_ptr this_frame) { return i386_sigtramp_p (this_frame); } diff --git a/gdb/i386-darwin-tdep.h b/gdb/i386-darwin-tdep.h index 4c1660b9bc6..2628ef49bc4 100644 --- a/gdb/i386-darwin-tdep.h +++ b/gdb/i386-darwin-tdep.h @@ -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 *, struct frame_info *); +int darwin_dwarf_signal_frame_p (struct gdbarch *, frame_info_ptr ); #endif /* I386_DARWIN_TDEP_H */ diff --git a/gdb/i386-fbsd-tdep.c b/gdb/i386-fbsd-tdep.c index b7a524db68c..eef124fca0c 100644 --- a/gdb/i386-fbsd-tdep.c +++ b/gdb/i386-fbsd-tdep.c @@ -156,7 +156,7 @@ const struct regset i386_fbsd_segbases_regset = static void i386_fbsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/i386-gnu-tdep.c b/gdb/i386-gnu-tdep.c index 3d97fe36a85..1ce4a2137e9 100644 --- a/gdb/i386-gnu-tdep.c +++ b/gdb/i386-gnu-tdep.c @@ -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 (struct frame_info *this_frame) +i386_gnu_sigtramp_start (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 (struct frame_info *this_frame) routine. */ static int -i386_gnu_sigtramp_p (struct frame_info *this_frame) +i386_gnu_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; @@ -97,7 +97,7 @@ i386_gnu_sigtramp_p (struct frame_info *this_frame) address of the associated sigcontext structure. */ static CORE_ADDR -i386_gnu_sigcontext_addr (struct frame_info *this_frame) +i386_gnu_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 6033104230f..5c2fed39868 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -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 (struct frame_info *this_frame) +i386_linux_sigtramp_start (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 (struct frame_info *this_frame) +i386_linux_rt_sigtramp_start (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 (struct frame_info *this_frame) routine. */ static int -i386_linux_sigtramp_p (struct frame_info *this_frame) +i386_linux_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; @@ -252,7 +252,7 @@ i386_linux_sigtramp_p (struct frame_info *this_frame) static int i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch, - struct frame_info *this_frame) + 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 (struct frame_info *this_frame) +i386_linux_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/i386-netbsd-tdep.c b/gdb/i386-netbsd-tdep.c index a9ebc3dd827..e0fc00e8b94 100644 --- a/gdb/i386-netbsd-tdep.c +++ b/gdb/i386-netbsd-tdep.c @@ -97,7 +97,7 @@ static int i386nbsd_mc_reg_offset[] = }; static void i386nbsd_sigtramp_cache_init (const struct tramp_frame *, - struct frame_info *, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c index 69d298c871f..99e7b648e16 100644 --- a/gdb/i386-nto-tdep.c +++ b/gdb/i386-nto-tdep.c @@ -270,7 +270,7 @@ i386nto_regset_fill (const struct regcache *regcache, int regset, char *data) routine. */ static int -i386nto_sigtramp_p (struct frame_info *this_frame) +i386nto_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; @@ -283,7 +283,7 @@ i386nto_sigtramp_p (struct frame_info *this_frame) address of the associated sigcontext structure. */ static CORE_ADDR -i386nto_sigcontext_addr (struct frame_info *this_frame) +i386nto_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/i386-obsd-tdep.c b/gdb/i386-obsd-tdep.c index 798094509c6..b1b0a83ed21 100644 --- a/gdb/i386-obsd-tdep.c +++ b/gdb/i386-obsd-tdep.c @@ -64,7 +64,7 @@ static const int i386obsd_sigreturn_offset[] = { routine. */ static int -i386obsd_sigtramp_p (struct frame_info *this_frame) +i386obsd_sigtramp_p (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 (struct frame_info *this_frame, void **this_cache) +i386obsd_trapframe_cache (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 (struct frame_info *this_frame, void **this_cache) } static void -i386obsd_trapframe_this_id (struct frame_info *this_frame, +i386obsd_trapframe_this_id (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 (struct frame_info *this_frame, } static struct value * -i386obsd_trapframe_prev_register (struct frame_info *this_frame, +i386obsd_trapframe_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct trad_frame_cache *cache = @@ -371,7 +371,7 @@ i386obsd_trapframe_prev_register (struct frame_info *this_frame, static int i386obsd_trapframe_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { ULONGEST cs; diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c index 5ee108d3578..f9df0f3d500 100644 --- a/gdb/i386-sol2-tdep.c +++ b/gdb/i386-sol2-tdep.c @@ -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 (struct frame_info *this_frame) +i386_sol2_mcontext_addr (frame_info_ptr this_frame) { CORE_ADDR sp, ucontext_addr; diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index a2f0017612b..59d4d7b976c 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -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, struct frame_info *next_frame) +i386_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { gdb_byte buf[8]; @@ -1977,7 +1977,7 @@ i386_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) /* Normal frames. */ static void -i386_frame_cache_1 (struct frame_info *this_frame, +i386_frame_cache_1 (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 (struct frame_info *this_frame, } static struct i386_frame_cache * -i386_frame_cache (struct frame_info *this_frame, void **this_cache) +i386_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct i386_frame_cache *cache; @@ -2102,7 +2102,7 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -i386_frame_this_id (struct frame_info *this_frame, void **this_cache, +i386_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } static enum unwind_stop_reason -i386_frame_unwind_stop_reason (struct frame_info *this_frame, +i386_frame_unwind_stop_reason (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 (struct frame_info *this_frame, } static struct value * -i386_frame_prev_register (struct frame_info *this_frame, void **this_cache, +i386_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache); @@ -2236,7 +2236,7 @@ i386_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc) static int i386_epilogue_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { if (frame_relative_level (this_frame) == 0) @@ -2247,7 +2247,7 @@ i386_epilogue_frame_sniffer (const struct frame_unwind *self, } static struct i386_frame_cache * -i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) +i386_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct i386_frame_cache *cache; CORE_ADDR sp; @@ -2282,7 +2282,7 @@ i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) } static enum unwind_stop_reason -i386_epilogue_frame_unwind_stop_reason (struct frame_info *this_frame, +i386_epilogue_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct i386_frame_cache *cache = @@ -2295,7 +2295,7 @@ i386_epilogue_frame_unwind_stop_reason (struct frame_info *this_frame, } static void -i386_epilogue_frame_this_id (struct frame_info *this_frame, +i386_epilogue_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -2309,7 +2309,7 @@ i386_epilogue_frame_this_id (struct frame_info *this_frame, } static struct value * -i386_epilogue_frame_prev_register (struct frame_info *this_frame, +i386_epilogue_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { /* Make sure we've initialized the cache. */ @@ -2391,7 +2391,7 @@ i386_in_stack_tramp_p (CORE_ADDR pc) static int i386_stack_tramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { if (frame_relative_level (this_frame) == 0) @@ -2431,7 +2431,7 @@ i386_gen_return_address (struct gdbarch *gdbarch, /* Signal trampolines. */ static struct i386_frame_cache * -i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) +i386_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); i386_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2480,7 +2480,7 @@ i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) } static enum unwind_stop_reason -i386_sigtramp_frame_unwind_stop_reason (struct frame_info *this_frame, +i386_sigtramp_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { struct i386_frame_cache *cache = @@ -2493,7 +2493,7 @@ i386_sigtramp_frame_unwind_stop_reason (struct frame_info *this_frame, } static void -i386_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache, +i386_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct i386_frame_cache *cache = @@ -2509,7 +2509,7 @@ i386_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -i386_sigtramp_frame_prev_register (struct frame_info *this_frame, +i386_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { /* Make sure we've initialized the cache. */ @@ -2520,7 +2520,7 @@ i386_sigtramp_frame_prev_register (struct frame_info *this_frame, static int i386_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { gdbarch *arch = get_frame_arch (this_frame); @@ -2562,7 +2562,7 @@ static const struct frame_unwind i386_sigtramp_frame_unwind = static CORE_ADDR -i386_frame_base_address (struct frame_info *this_frame, void **this_cache) +i386_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct i386_frame_cache *cache = i386_frame_cache (this_frame, this_cache); @@ -2578,7 +2578,7 @@ static const struct frame_base i386_frame_base = }; static struct frame_id -i386_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +i386_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR fp; @@ -2605,7 +2605,7 @@ i386_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) success. */ static int -i386_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +i386_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { gdb_byte buf[4]; CORE_ADDR sp, jb_addr; @@ -3827,7 +3827,7 @@ i386_convert_register_p (struct gdbarch *gdbarch, return its contents in TO. */ static int -i386_register_to_value (struct frame_info *frame, int regnum, +i386_register_to_value (frame_info_ptr frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep) { @@ -3867,7 +3867,7 @@ i386_register_to_value (struct frame_info *frame, int regnum, REGNUM in frame FRAME. */ static void -i386_value_to_register (struct frame_info *frame, int regnum, +i386_value_to_register (frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from) { int len = type->length (); @@ -4019,7 +4019,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 (struct frame_info *frame, +i386_pe_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc, char *name) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -4050,7 +4050,7 @@ i386_pe_skip_trampoline_code (struct frame_info *frame, routine. */ int -i386_sigtramp_p (struct frame_info *this_frame) +i386_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; @@ -4086,7 +4086,7 @@ i386_print_insn (bfd_vma pc, struct disassemble_info *info) routine. */ static int -i386_svr4_sigtramp_p (struct frame_info *this_frame) +i386_svr4_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; @@ -4101,7 +4101,7 @@ i386_svr4_sigtramp_p (struct frame_info *this_frame) address of the associated sigcontext (ucontext) structure. */ static CORE_ADDR -i386_svr4_sigcontext_addr (struct frame_info *this_frame) +i386_svr4_sigcontext_addr (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -4657,7 +4657,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 (struct frame_info *frame, int argi, +i386_fetch_pointer_argument (frame_info_ptr frame, int argi, struct type *type) { struct gdbarch *gdbarch = get_frame_arch (frame); diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index cd77e0308e0..72e10457b2a 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -24,7 +24,7 @@ #include "infrun.h" #include "expression.h" -struct frame_info; +class frame_info_ptr; struct gdbarch; struct reggroup; struct regset; @@ -223,10 +223,10 @@ struct i386_gdbarch_tdep : gdbarch_tdep_base CORE_ADDR sigtramp_end = 0; /* Detect sigtramp. */ - int (*sigtramp_p) (struct frame_info *) = nullptr; + int (*sigtramp_p) (frame_info_ptr ) = nullptr; /* Get address of sigcontext for sigtramp. */ - CORE_ADDR (*sigcontext_addr) (struct frame_info *) = nullptr; + CORE_ADDR (*sigcontext_addr) (frame_info_ptr ) = nullptr; /* Offset of registers in `struct sigcontext'. */ int *sc_reg_offset = 0; @@ -395,7 +395,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 (struct frame_info *frame, +extern CORE_ADDR i386_pe_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc, char *name); extern CORE_ADDR i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc); @@ -414,7 +414,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 (struct frame_info *this_frame); +extern int i386_sigtramp_p (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, diff --git a/gdb/i386-windows-tdep.c b/gdb/i386-windows-tdep.c index eda77a3d21f..4a9c5b3a192 100644 --- a/gdb/i386-windows-tdep.c +++ b/gdb/i386-windows-tdep.c @@ -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 (struct frame_info *frame, CORE_ADDR pc) +i386_windows_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { return i386_pe_skip_trampoline_code (frame, pc, NULL); } diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 42ed4eebc2c..a3c642b2643 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -202,7 +202,7 @@ print_i387_control_word (int control_p, void i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, const char *args) + frame_info_ptr frame, const char *args) { i386_gdbarch_tdep *tdep = 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 (struct frame_info *frame, int regnum, +i387_register_to_value (frame_info_ptr frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep) { @@ -380,7 +380,7 @@ i387_register_to_value (struct frame_info *frame, int regnum, REGNUM in frame FRAME. */ void -i387_value_to_register (struct frame_info *frame, int regnum, +i387_value_to_register (frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from) { struct gdbarch *gdbarch = get_frame_arch (frame); diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h index 698ff2ee206..3b223067c5d 100644 --- a/gdb/i387-tdep.h +++ b/gdb/i387-tdep.h @@ -21,7 +21,7 @@ #define I387_TDEP_H struct gdbarch; -struct frame_info; +class frame_info_ptr; struct regcache; struct type; struct ui_file; @@ -88,7 +88,7 @@ struct ui_file; extern void i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, + frame_info_ptr frame, const char *args); /* Return nonzero if a value of type TYPE stored in register REGNUM @@ -100,14 +100,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 (struct frame_info *frame, int regnum, +extern int i387_register_to_value (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 (struct frame_info *frame, int regnum, +extern void i387_value_to_register (frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from); diff --git a/gdb/ia64-libunwind-tdep.c b/gdb/ia64-libunwind-tdep.c index 4c788f20956..6fc75629631 100644 --- a/gdb/ia64-libunwind-tdep.c +++ b/gdb/ia64-libunwind-tdep.c @@ -153,7 +153,7 @@ libunwind_frame_set_descr (struct gdbarch *gdbarch, } static struct libunwind_frame_cache * -libunwind_frame_cache (struct frame_info *this_frame, void **this_cache) +libunwind_frame_cache (frame_info_ptr this_frame, void **this_cache) { unw_accessors_t *acc; unw_addr_space_t as; @@ -228,7 +228,7 @@ libunwind_frame_cache (struct frame_info *this_frame, void **this_cache) } void -libunwind_frame_dealloc_cache (struct frame_info *self, void *this_cache) +libunwind_frame_dealloc_cache (frame_info_ptr self, void *this_cache) { struct libunwind_frame_cache *cache = (struct libunwind_frame_cache *) this_cache; @@ -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, - struct frame_info *this_frame, void **this_cache) + 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 (struct frame_info *this_frame, void **this_cache, +libunwind_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } struct value * -libunwind_frame_prev_register (struct frame_info *this_frame, +libunwind_frame_prev_register (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, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { unw_cursor_t cursor; diff --git a/gdb/ia64-libunwind-tdep.h b/gdb/ia64-libunwind-tdep.h index 56425d0d754..a4e20f6eb3d 100644 --- a/gdb/ia64-libunwind-tdep.h +++ b/gdb/ia64-libunwind-tdep.h @@ -22,7 +22,7 @@ #ifndef IA64_LIBUNWIND_TDEP_H #define IA64_LIBUNWIND_TDEP_H 1 -struct frame_info; +class frame_info_ptr; struct frame_id; struct regcache; struct gdbarch; @@ -48,21 +48,21 @@ struct libunwind_descr }; int libunwind_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache); int libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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 (struct frame_info *this_frame, void **this_cache, +void libunwind_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id); -struct value *libunwind_frame_prev_register (struct frame_info *this_frame, +struct value *libunwind_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum); -void libunwind_frame_dealloc_cache (struct frame_info *self, void *cache); +void libunwind_frame_dealloc_cache (frame_info_ptr self, void *cache); int libunwind_is_initialized (void); diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 2bac2a64e9d..281c5f13ae9 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -1217,7 +1217,7 @@ ia64_convert_register_p (struct gdbarch *gdbarch, int regno, struct type *type) } static int -ia64_register_to_value (struct frame_info *frame, int regnum, +ia64_register_to_value (frame_info_ptr frame, int regnum, struct type *valtype, gdb_byte *out, int *optimizedp, int *unavailablep) { @@ -1238,7 +1238,7 @@ ia64_register_to_value (struct frame_info *frame, int regnum, } static void -ia64_value_to_register (struct frame_info *frame, int regnum, +ia64_value_to_register (frame_info_ptr frame, int regnum, struct type *valtype, const gdb_byte *in) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -1358,7 +1358,7 @@ ia64_alloc_frame_cache (void) static CORE_ADDR examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct ia64_frame_cache *cache) { CORE_ADDR next_pc; @@ -1839,7 +1839,7 @@ ia64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) /* Normal frames. */ static struct ia64_frame_cache * -ia64_frame_cache (struct frame_info *this_frame, void **this_cache) +ia64_frame_cache (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); @@ -1884,7 +1884,7 @@ ia64_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -ia64_frame_this_id (struct frame_info *this_frame, void **this_cache, +ia64_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1901,11 +1901,11 @@ ia64_frame_this_id (struct frame_info *this_frame, void **this_cache, paddress (gdbarch, this_id->code_addr), paddress (gdbarch, this_id->stack_addr), paddress (gdbarch, cache->bsp), - host_address_to_string (this_frame)); + host_address_to_string (this_frame.get ())); } static struct value * -ia64_frame_prev_register (struct frame_info *this_frame, void **this_cache, +ia64_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2173,7 +2173,7 @@ static const struct frame_unwind ia64_frame_unwind = /* Signal trampolines. */ static void -ia64_sigtramp_frame_init_saved_regs (struct frame_info *this_frame, +ia64_sigtramp_frame_init_saved_regs (frame_info_ptr this_frame, struct ia64_frame_cache *cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2227,7 +2227,7 @@ ia64_sigtramp_frame_init_saved_regs (struct frame_info *this_frame, } static struct ia64_frame_cache * -ia64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) +ia64_sigtramp_frame_cache (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); @@ -2258,7 +2258,7 @@ ia64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -ia64_sigtramp_frame_this_id (struct frame_info *this_frame, +ia64_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2275,11 +2275,11 @@ ia64_sigtramp_frame_this_id (struct frame_info *this_frame, paddress (gdbarch, this_id->code_addr), paddress (gdbarch, this_id->stack_addr), paddress (gdbarch, cache->bsp), - host_address_to_string (this_frame)); + host_address_to_string (this_frame.get ())); } static struct value * -ia64_sigtramp_frame_prev_register (struct frame_info *this_frame, +ia64_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct ia64_frame_cache *cache = @@ -2332,7 +2332,7 @@ ia64_sigtramp_frame_prev_register (struct frame_info *this_frame, static int ia64_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { gdbarch *arch = get_frame_arch (this_frame); @@ -2362,7 +2362,7 @@ static const struct frame_unwind ia64_sigtramp_frame_unwind = static CORE_ADDR -ia64_frame_base_address (struct frame_info *this_frame, void **this_cache) +ia64_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct ia64_frame_cache *cache = ia64_frame_cache (this_frame, this_cache); @@ -2483,7 +2483,7 @@ ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val, { int regnum = ia64_uw2gdb_regnum (uw_regnum); unw_word_t bsp, sof, cfm, psr, ip; - struct frame_info *this_frame = (struct frame_info *) arg; + struct frame_info *this_frame = (frame_info *) arg; struct gdbarch *gdbarch = get_frame_arch (this_frame); ia64_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2538,7 +2538,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); - struct frame_info *this_frame = (struct frame_info *) arg; + frame_info_ptr this_frame = (frame_info_ptr ) arg; /* We never call any libunwind routines that need to write registers. */ gdb_assert (!write); @@ -2891,7 +2891,7 @@ ia64_get_dyn_info_list (unw_addr_space_t as, /* Frame interface functions for libunwind. */ static void -ia64_libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache, +ia64_libunwind_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2925,7 +2925,7 @@ ia64_libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -ia64_libunwind_frame_prev_register (struct frame_info *this_frame, +ia64_libunwind_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { int reg = regnum; @@ -2998,7 +2998,7 @@ ia64_libunwind_frame_prev_register (struct frame_info *this_frame, static int ia64_libunwind_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { if (libunwind_is_initialized () @@ -3021,7 +3021,7 @@ static const struct frame_unwind ia64_libunwind_frame_unwind = }; static void -ia64_libunwind_sigtramp_frame_this_id (struct frame_info *this_frame, +ia64_libunwind_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -3057,7 +3057,7 @@ ia64_libunwind_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -ia64_libunwind_sigtramp_frame_prev_register (struct frame_info *this_frame, +ia64_libunwind_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -3084,7 +3084,7 @@ ia64_libunwind_sigtramp_frame_prev_register (struct frame_info *this_frame, static int ia64_libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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, struct frame_info *this_frame) +ia64_dummy_id (struct gdbarch *gdbarch, 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, struct frame_info *this_frame) } static CORE_ADDR -ia64_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +ia64_unwind_pc (struct gdbarch *gdbarch, 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 (struct frame_info *this_frame, ULONGEST cfm) +ia64_size_of_register_frame (frame_info_ptr this_frame, ULONGEST cfm) { return (cfm & 0x7f); } diff --git a/gdb/ia64-tdep.h b/gdb/ia64-tdep.h index f06974fd296..fed879a2907 100644 --- a/gdb/ia64-tdep.h +++ b/gdb/ia64-tdep.h @@ -201,7 +201,7 @@ #define IA64_NAT32_REGNUM (IA64_NAT0_REGNUM + 32) #define IA64_NAT127_REGNUM (IA64_NAT0_REGNUM + 127) -struct frame_info; +class frame_info_ptr; struct regcache; /* A struction containing pointers to all the target-dependent operations @@ -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) (struct frame_info *this_frame, ULONGEST cfm) + int (*size_of_register_frame) (frame_info_ptr this_frame, ULONGEST cfm) = nullptr; /* Determine the function address FADDR belongs to a shared library. diff --git a/gdb/infcall.c b/gdb/infcall.c index 34852191043..16e6b9e9355 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -673,7 +673,7 @@ run_inferior_call (std::unique_ptr sm, static CORE_ADDR reserve_stack_space (const type *values_type, CORE_ADDR &sp) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); struct gdbarch *gdbarch = get_frame_arch (frame); CORE_ADDR addr = 0; @@ -771,7 +771,7 @@ call_function_by_hand_dummy (struct value *function, CORE_ADDR real_pc; CORE_ADDR bp_addr; struct frame_id dummy_id; - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; ptid_t call_thread_ptid; struct gdb_exception e; diff --git a/gdb/infcmd.c b/gdb/infcmd.c index decd61111b7..cbff0cd0b0e 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -749,7 +749,7 @@ set_step_frame (thread_info *tp) inferior_ptid value. */ gdb_assert (inferior_ptid == tp->ptid); - frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); symtab_and_line sal = find_frame_sal (frame); set_step_info (tp, frame, sal); @@ -939,7 +939,7 @@ prepare_one_step (thread_info *tp, struct step_command_fsm *sm) if (sm->count > 0) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); set_step_frame (tp); @@ -1320,7 +1320,7 @@ until_next_fsm::do_async_reply_reason () static void until_next_command (int from_tty) { - struct frame_info *frame; + frame_info_ptr frame; CORE_ADDR pc; struct symbol *func; struct symtab_and_line sal; @@ -1711,7 +1711,7 @@ finish_backward (struct finish_command_fsm *sm) if (sal.pc != pc) { - struct frame_info *frame = get_selected_frame (NULL); + frame_info_ptr frame = get_selected_frame (NULL); struct gdbarch *gdbarch = get_frame_arch (frame); /* Set a step-resume at the function's entry point. Once that's @@ -1737,7 +1737,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, struct frame_info *frame) +finish_forward (struct finish_command_fsm *sm, frame_info_ptr frame) { struct frame_id frame_id = get_frame_id (frame); struct gdbarch *gdbarch = get_frame_arch (frame); @@ -1764,10 +1764,10 @@ finish_forward (struct finish_command_fsm *sm, struct frame_info *frame) /* Skip frames for "finish". */ -static struct frame_info * -skip_finish_frames (struct frame_info *frame) +static frame_info_ptr +skip_finish_frames (frame_info_ptr frame) { - struct frame_info *start; + frame_info_ptr start; do { @@ -1792,7 +1792,7 @@ skip_finish_frames (struct frame_info *frame) static void finish_command (const char *arg, int from_tty) { - struct frame_info *frame; + frame_info_ptr frame; int async_exec; struct finish_command_fsm *sm; struct thread_info *tp; @@ -2193,7 +2193,7 @@ default_print_one_register_info (struct ui_file *file, void default_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, + frame_info_ptr frame, int regnum, int print_all) { int i; @@ -2236,7 +2236,7 @@ default_print_registers_info (struct gdbarch *gdbarch, void registers_info (const char *addr_exp, int fpregs) { - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; if (!target_has_registers ()) @@ -2353,7 +2353,7 @@ info_registers_command (const char *addr_exp, int from_tty) static void print_vector_info (struct ui_file *file, - struct frame_info *frame, const char *args) + frame_info_ptr frame, const char *args) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2886,7 +2886,7 @@ interrupt_command (const char *args, int from_tty) void default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, const char *args) + frame_info_ptr frame, const char *args) { int regnum; int printed_something = 0; @@ -2907,7 +2907,7 @@ default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, static void info_float_command (const char *args, int from_tty) { - struct frame_info *frame; + frame_info_ptr frame; if (!target_has_registers ()) error (_("The program has no registers now.")); diff --git a/gdb/inferior.h b/gdb/inferior.h index 27765304ece..8877be38e36 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -25,7 +25,7 @@ #include struct target_waitstatus; -struct frame_info; +class frame_info_ptr; struct ui_file; struct type; struct gdbarch; @@ -156,7 +156,7 @@ extern void reopen_exec_file (void); extern void default_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, + 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, - struct frame_info *frame, + frame_info_ptr frame, const char *args); extern void child_terminal_info (struct target_ops *self, const char *, int); diff --git a/gdb/infrun.c b/gdb/infrun.c index db82e2a9bbb..cdfe02393f5 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -84,9 +84,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 (struct frame_info *); +static void insert_hp_step_resume_breakpoint_at_frame (frame_info_ptr ); -static void insert_step_resume_breakpoint_at_caller (struct frame_info *); +static void insert_step_resume_breakpoint_at_caller (frame_info_ptr ); static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR); @@ -3475,7 +3475,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 *, - struct frame_info *); + frame_info_ptr ); static void end_stepping_range (struct execution_control_state *ecs); static void stop_waiting (struct execution_control_state *ecs); @@ -4327,7 +4327,7 @@ fetch_inferior_event () /* See infrun.h. */ void -set_step_info (thread_info *tp, struct frame_info *frame, +set_step_info (thread_info *tp, frame_info_ptr frame, struct symtab_and_line sal) { /* This can be removed once this function no longer implicitly relies on the @@ -4559,7 +4559,7 @@ adjust_pc_after_break (struct thread_info *thread, } static bool -stepped_in_from (struct frame_info *frame, struct frame_id step_frame_id) +stepped_in_from (frame_info_ptr frame, struct frame_id step_frame_id) { for (frame = get_prev_frame (frame); frame != NULL; @@ -4584,7 +4584,7 @@ stepped_in_from (struct frame_info *frame, struct frame_id step_frame_id) static bool inline_frame_is_marked_for_skip (bool prev_frame, struct thread_info *tp) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); if (prev_frame) frame = get_prev_frame (frame); @@ -6118,7 +6118,7 @@ finish_step_over (struct execution_control_state *ecs) static void handle_signal_stop (struct execution_control_state *ecs) { - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; int stopped_by_watchpoint; enum stop_kind stop_soon; @@ -6629,7 +6629,7 @@ static void process_event_stop_test (struct execution_control_state *ecs) { struct symtab_and_line stop_pc_sal; - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; CORE_ADDR jmp_buf_pc; struct bpstat_what what; @@ -6700,7 +6700,7 @@ process_event_stop_test (struct execution_control_state *ecs) case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME: { - struct frame_info *init_frame; + frame_info_ptr init_frame; /* There are several cases to consider. @@ -7675,7 +7675,7 @@ restart_after_all_stop_detach (process_stratum_target *proc_target) static bool keep_going_stepped_thread (struct thread_info *tp) { - struct frame_info *frame; + frame_info_ptr frame; struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; @@ -7932,7 +7932,7 @@ insert_step_resume_breakpoint_at_sal (struct gdbarch *gdbarch, RETURN_FRAME.pc. */ static void -insert_hp_step_resume_breakpoint_at_frame (struct frame_info *return_frame) +insert_hp_step_resume_breakpoint_at_frame (frame_info_ptr return_frame) { gdb_assert (return_frame != NULL); @@ -7963,7 +7963,7 @@ insert_hp_step_resume_breakpoint_at_frame (struct frame_info *return_frame) of frame_unwind_caller_id for an example). */ static void -insert_step_resume_breakpoint_at_caller (struct frame_info *next_frame) +insert_step_resume_breakpoint_at_caller (frame_info_ptr next_frame) { /* We shouldn't have gotten here if we don't know where the call site is. */ @@ -8010,7 +8010,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, - struct frame_info *frame, + frame_info_ptr frame, struct symbol *sym) { try @@ -8054,7 +8054,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, - struct frame_info *frame) + frame_info_ptr frame) { struct value *arg_value; CORE_ADDR handler; @@ -8081,7 +8081,7 @@ insert_exception_resume_from_probe (struct thread_info *tp, static void check_exception_resume (struct execution_control_state *ecs, - struct frame_info *frame) + frame_info_ptr frame) { struct bound_probe probe; struct symbol *func; @@ -8740,7 +8740,7 @@ normal_stop (void) /* Pop the empty frame that contains the stack dummy. This also restores inferior state prior to the call (struct infcall_suspend_state). */ - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); gdb_assert (get_frame_type (frame) == DUMMY_FRAME); frame_pop (frame); diff --git a/gdb/infrun.h b/gdb/infrun.h index 0c7c55eabec..d1209a94a22 100644 --- a/gdb/infrun.h +++ b/gdb/infrun.h @@ -24,7 +24,7 @@ #include "gdbsupport/intrusive_list.h" struct target_waitstatus; -struct frame_info; +class frame_info_ptr; struct address_space; struct return_value_info; struct process_stratum_target; @@ -198,7 +198,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, - struct frame_info *frame, + frame_info_ptr frame, struct symtab_and_line sal); /* Several print_*_reason helper functions to print why the inferior diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c index 5cb6776aaff..5f4ab66609a 100644 --- a/gdb/inline-frame.c +++ b/gdb/inline-frame.c @@ -150,7 +150,7 @@ clear_inline_frame_state (thread_info *thread) } static void -inline_frame_this_id (struct frame_info *this_frame, +inline_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -163,7 +163,7 @@ inline_frame_this_id (struct frame_info *this_frame, function, there must be previous frames, so this is safe - as long as we're careful not to create any cycles. See related comments in get_prev_frame_always_1. */ - frame_info *prev_frame = get_prev_frame_always (this_frame); + frame_info_ptr prev_frame = get_prev_frame_always (this_frame); if (prev_frame == nullptr) error (_("failed to find previous frame when computing inline frame id")); *this_id = get_frame_id (prev_frame); @@ -186,7 +186,7 @@ inline_frame_this_id (struct frame_info *this_frame, } static struct value * -inline_frame_prev_register (struct frame_info *this_frame, void **this_cache, +inline_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { /* Use get_frame_register_value instead of @@ -208,13 +208,13 @@ inline_frame_prev_register (struct frame_info *this_frame, void **this_cache, static int inline_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR this_pc; const struct block *frame_block, *cur_block; int depth; - struct frame_info *next_frame; + frame_info_ptr next_frame; struct inline_state *state = find_inline_frame_state (inferior_thread ()); this_pc = get_frame_address_in_block (this_frame); @@ -441,9 +441,9 @@ inline_skipped_symbol (thread_info *thread) skip_inline_frames). */ int -frame_inlined_callees (struct frame_info *this_frame) +frame_inlined_callees (frame_info_ptr this_frame) { - struct frame_info *next_frame; + frame_info_ptr next_frame; int inline_count = 0; /* First count how many inlined functions at this PC have frames diff --git a/gdb/inline-frame.h b/gdb/inline-frame.h index d4822d49dbd..211a9eca956 100644 --- a/gdb/inline-frame.h +++ b/gdb/inline-frame.h @@ -20,7 +20,7 @@ #if !defined (INLINE_FRAME_H) #define INLINE_FRAME_H 1 -struct frame_info; +class frame_info_ptr; struct frame_unwind; struct bpstat; struct process_stratum_target; @@ -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 (struct frame_info *this_frame); +int frame_inlined_callees (frame_info_ptr this_frame); #endif /* !defined (INLINE_FRAME_H) */ diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c index ea0c129b85e..5861160243f 100644 --- a/gdb/iq2000-tdep.c +++ b/gdb/iq2000-tdep.c @@ -198,7 +198,7 @@ static CORE_ADDR iq2000_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR scan_start, CORE_ADDR scan_end, - struct frame_info *fi, + 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 (struct frame_info *this_frame, void **this_cache) +iq2000_frame_cache (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 (struct frame_info *this_frame, void **this_cache) } static struct value * -iq2000_frame_prev_register (struct frame_info *this_frame, void **this_cache, +iq2000_frame_prev_register (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 (struct frame_info *this_frame, void **this_cache, } static void -iq2000_frame_this_id (struct frame_info *this_frame, void **this_cache, +iq2000_frame_this_id (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 (struct frame_info *this_frame, void **this_cache) +iq2000_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame, this_cache); diff --git a/gdb/jit.c b/gdb/jit.c index d2d8cea2bda..f383e105b0e 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -930,7 +930,7 @@ struct jit_unwind_private std::unique_ptr regcache; /* The frame being unwound. */ - struct frame_info *this_frame; + frame_info_ptr this_frame; }; /* Sets the value of a particular register in this frame. */ @@ -991,7 +991,7 @@ jit_unwind_reg_get_impl (struct gdb_unwind_callbacks *cb, int regnum) saved register value. */ static void -jit_dealloc_cache (struct frame_info *this_frame, void *cache) +jit_dealloc_cache (frame_info *this_frame, void *cache) { struct jit_unwind_private *priv_data = (struct jit_unwind_private *) cache; delete priv_data; @@ -1007,7 +1007,7 @@ jit_dealloc_cache (struct frame_info *this_frame, void *cache) static int jit_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **cache) + frame_info_ptr this_frame, void **cache) { struct jit_unwind_private *priv_data; struct gdb_unwind_callbacks callbacks; @@ -1042,7 +1042,7 @@ jit_frame_sniffer (const struct frame_unwind *self, jit_debug_printf ("Could not unwind frame using JIT reader."); - jit_dealloc_cache (this_frame, *cache); + jit_dealloc_cache (this_frame.get (), *cache); *cache = NULL; return 0; @@ -1053,7 +1053,7 @@ jit_frame_sniffer (const struct frame_unwind *self, the loaded plugin. */ static void -jit_frame_this_id (struct frame_info *this_frame, void **cache, +jit_frame_this_id (frame_info_ptr this_frame, void **cache, struct frame_id *this_id) { struct jit_unwind_private priv; @@ -1082,7 +1082,7 @@ jit_frame_this_id (struct frame_info *this_frame, void **cache, the register from the cache. */ static struct value * -jit_frame_prev_register (struct frame_info *this_frame, void **cache, int reg) +jit_frame_prev_register (frame_info_ptr this_frame, void **cache, int reg) { struct jit_unwind_private *priv = (struct jit_unwind_private *) *cache; struct gdbarch *gdbarch; diff --git a/gdb/language.c b/gdb/language.c index c2217fe5249..d3cc14c3079 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -125,7 +125,7 @@ show_language_command (struct ui_file *file, int from_tty, if (has_stack_frames ()) { - struct frame_info *frame; + frame_info_ptr frame; frame = get_selected_frame (NULL); flang = get_frame_language (frame); @@ -160,7 +160,7 @@ set_language_command (const char *ignore, language_mode = language_mode_auto; try { - struct frame_info *frame; + frame_info_ptr frame; frame = get_selected_frame (NULL); flang = get_frame_language (frame); @@ -533,7 +533,7 @@ add_set_language_command () Return the result from the first that returns non-zero, or 0 if all `fail'. */ CORE_ADDR -skip_language_trampoline (struct frame_info *frame, CORE_ADDR pc) +skip_language_trampoline (frame_info_ptr frame, CORE_ADDR pc) { for (const auto &lang : language_defn::languages) { diff --git a/gdb/language.h b/gdb/language.h index c6812c52634..6482f371e22 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -30,7 +30,7 @@ /* Forward decls for prototypes. */ struct value; struct objfile; -struct frame_info; +class frame_info_ptr; struct ui_file; struct value_print_options; struct type_print_options; @@ -321,7 +321,7 @@ struct language_defn virtual struct value *read_var_value (struct symbol *var, const struct block *var_block, - struct frame_info *frame) const; + frame_info_ptr frame) const; /* Return information about whether TYPE should be passed (and returned) by reference at the language level. The default @@ -464,7 +464,7 @@ struct language_defn If that PC falls in a trampoline belonging to this language, return the address of the first pc in the real function, or 0 if it isn't a language tramp for this language. */ - virtual CORE_ADDR skip_trampoline (struct frame_info *fi, CORE_ADDR pc) const + virtual CORE_ADDR skip_trampoline (frame_info_ptr fi, CORE_ADDR pc) const { return (CORE_ADDR) 0; } @@ -782,7 +782,7 @@ extern const char *language_str (enum language); /* Check for a language-specific trampoline. */ -extern CORE_ADDR skip_language_trampoline (struct frame_info *, CORE_ADDR pc); +extern CORE_ADDR skip_language_trampoline (frame_info_ptr , CORE_ADDR pc); /* Return demangled language symbol, or NULL. */ extern gdb::unique_xmalloc_ptr language_demangle diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c index 7d3888afd7c..dd601320c3a 100644 --- a/gdb/lm32-tdep.c +++ b/gdb/lm32-tdep.c @@ -375,7 +375,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 (struct frame_info *this_frame, void **this_prologue_cache) +lm32_frame_cache (frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR current_pc; ULONGEST prev_sp; @@ -421,7 +421,7 @@ lm32_frame_cache (struct frame_info *this_frame, void **this_prologue_cache) } static void -lm32_frame_this_id (struct frame_info *this_frame, void **this_cache, +lm32_frame_this_id (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); @@ -434,7 +434,7 @@ lm32_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -lm32_frame_prev_register (struct frame_info *this_frame, +lm32_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct lm32_frame_cache *info; @@ -454,7 +454,7 @@ static const struct frame_unwind lm32_frame_unwind = { }; static CORE_ADDR -lm32_frame_base_address (struct frame_info *this_frame, void **this_cache) +lm32_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct lm32_frame_cache *info = lm32_frame_cache (this_frame, this_cache); diff --git a/gdb/loongarch-linux-tdep.c b/gdb/loongarch-linux-tdep.c index 883245bec7e..f4559b65b33 100644 --- a/gdb/loongarch-linux-tdep.c +++ b/gdb/loongarch-linux-tdep.c @@ -222,7 +222,7 @@ const struct regset loongarch_fpregset = static void loongarch_linux_rt_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { @@ -284,7 +284,7 @@ loongarch_iterate_over_regset_sections (struct gdbarch *gdbarch, instruction to be executed. */ static CORE_ADDR -loongarch_linux_syscall_next_pc (struct frame_info *frame) +loongarch_linux_syscall_next_pc (frame_info_ptr frame) { const CORE_ADDR pc = get_frame_pc (frame); ULONGEST a7 = get_frame_register_unsigned (frame, LOONGARCH_A7_REGNUM); diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c index 94677fb1632..8f72dd2c173 100644 --- a/gdb/loongarch-tdep.c +++ b/gdb/loongarch-tdep.c @@ -112,7 +112,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, struct frame_info *this_frame, + CORE_ADDR limit_pc, frame_info_ptr this_frame, struct trad_frame_cache *this_cache) { CORE_ADDR cur_pc = start_pc, prologue_end = 0; @@ -397,7 +397,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 (struct frame_info *this_frame, void **this_cache) +loongarch_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct trad_frame_cache *cache; CORE_ADDR pc; @@ -419,7 +419,7 @@ loongarch_frame_cache (struct frame_info *this_frame, void **this_cache) /* Implement the this_id callback for frame unwinder. */ static void -loongarch_frame_this_id (struct frame_info *this_frame, void **prologue_cache, +loongarch_frame_this_id (frame_info_ptr this_frame, void **prologue_cache, struct frame_id *this_id) { struct trad_frame_cache *info; @@ -431,7 +431,7 @@ loongarch_frame_this_id (struct frame_info *this_frame, void **prologue_cache, /* Implement the prev_register callback for frame unwinder. */ static struct value * -loongarch_frame_prev_register (struct frame_info *this_frame, +loongarch_frame_prev_register (frame_info_ptr this_frame, void **prologue_cache, int regnum) { struct trad_frame_cache *info; diff --git a/gdb/loongarch-tdep.h b/gdb/loongarch-tdep.h index c5527f7d148..42fe1f617a9 100644 --- a/gdb/loongarch-tdep.h +++ b/gdb/loongarch-tdep.h @@ -38,7 +38,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) (struct frame_info *frame) = nullptr; + CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr; }; #endif /* LOONGARCH_TDEP_H */ diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 2a458f85722..9b839c754dd 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -1851,7 +1851,7 @@ m32c_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) /* Stack unwinding. */ static struct m32c_prologue * -m32c_analyze_frame_prologue (struct frame_info *this_frame, +m32c_analyze_frame_prologue (frame_info_ptr this_frame, void **this_prologue_cache) { if (! *this_prologue_cache) @@ -1875,7 +1875,7 @@ m32c_analyze_frame_prologue (struct frame_info *this_frame, static CORE_ADDR -m32c_frame_base (struct frame_info *this_frame, +m32c_frame_base (frame_info_ptr this_frame, void **this_prologue_cache) { struct m32c_prologue *p @@ -1915,7 +1915,7 @@ m32c_frame_base (struct frame_info *this_frame, static void -m32c_this_id (struct frame_info *this_frame, +m32c_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -1928,7 +1928,7 @@ m32c_this_id (struct frame_info *this_frame, static struct value * -m32c_prev_register (struct frame_info *this_frame, +m32c_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { gdbarch *arch = get_frame_arch (this_frame); @@ -2306,7 +2306,7 @@ m32c_return_value (struct gdbarch *gdbarch, code sequence seems more fragile. */ static CORE_ADDR -m32c_skip_trampoline_code (struct frame_info *frame, CORE_ADDR stop_pc) +m32c_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR stop_pc) { struct gdbarch *gdbarch = get_frame_arch (frame); m32c_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c index 6606a64afa1..7174a10b021 100644 --- a/gdb/m32r-linux-tdep.c +++ b/gdb/m32r-linux-tdep.c @@ -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, struct frame_info *this_frame) +m32r_linux_sigtramp_start (CORE_ADDR pc, 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, struct frame_info *this_frame) +m32r_linux_rt_sigtramp_start (CORE_ADDR pc, frame_info_ptr this_frame) { gdb_byte buf[4]; @@ -173,7 +173,7 @@ m32r_linux_rt_sigtramp_start (CORE_ADDR pc, struct frame_info *this_frame) static int m32r_linux_pc_in_sigtramp (CORE_ADDR pc, const char *name, - struct frame_info *this_frame) + 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 (struct frame_info *this_frame, +m32r_linux_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct m32r_frame_cache *cache; @@ -266,7 +266,7 @@ m32r_linux_sigtramp_frame_cache (struct frame_info *this_frame, } static void -m32r_linux_sigtramp_frame_this_id (struct frame_info *this_frame, +m32r_linux_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -277,7 +277,7 @@ m32r_linux_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -m32r_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, +m32r_linux_sigtramp_frame_prev_register (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 (struct frame_info *this_frame, static int m32r_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_pc (this_frame); diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index aa65f5ad3ee..fc304757a60 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -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 (struct frame_info *this_frame, +m32r_frame_unwind_cache (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 (struct frame_info *this_frame, +m32r_frame_this_id (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 (struct frame_info *this_frame, } static struct value * -m32r_frame_prev_register (struct frame_info *this_frame, +m32r_frame_prev_register (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 (struct frame_info *this_frame, void **this_cache) +m32r_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct m32r_unwind_cache *info = m32r_frame_unwind_cache (this_frame, this_cache); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 343ecf5c262..c48fe4424b6 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -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 (struct frame_info *this_frame, +m68hc11_frame_unwind_cache (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 (struct frame_info *this_frame, frame. This will be used to create a new GDB frame struct. */ static void -m68hc11_frame_this_id (struct frame_info *this_frame, +m68hc11_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -899,7 +899,7 @@ m68hc11_frame_this_id (struct frame_info *this_frame, } static struct value * -m68hc11_frame_prev_register (struct frame_info *this_frame, +m68hc11_frame_prev_register (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 (struct frame_info *this_frame, void **this_cache) +m68hc11_frame_base_address (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 (struct frame_info *this_frame, void **this_cache) } static CORE_ADDR -m68hc11_frame_args_address (struct frame_info *this_frame, void **this_cache) +m68hc11_frame_args_address (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, struct frame_info *this_frame) +m68hc11_dummy_id (struct gdbarch *gdbarch, 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, struct frame_info *this_frame) /* Get and print the register from the given frame. */ static void m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, int regno) + 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, - struct frame_info *frame, int regno, int cpregs) + frame_info_ptr frame, int regno, int cpregs) { if (regno >= 0) { diff --git a/gdb/m68k-linux-tdep.c b/gdb/m68k-linux-tdep.c index 28401d3ecc6..9c6a41609ed 100644 --- a/gdb/m68k-linux-tdep.c +++ b/gdb/m68k-linux-tdep.c @@ -61,7 +61,7 @@ non-RT and RT signal trampolines. */ static int -m68k_linux_pc_in_sigtramp (struct frame_info *this_frame) +m68k_linux_pc_in_sigtramp (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 (struct frame_info *this_frame) +m68k_linux_get_sigtramp_info (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 (struct frame_info *this_frame) /* Signal trampolines. */ static struct trad_frame_cache * -m68k_linux_sigtramp_frame_cache (struct frame_info *this_frame, +m68k_linux_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct frame_id this_id; @@ -286,7 +286,7 @@ m68k_linux_sigtramp_frame_cache (struct frame_info *this_frame, } static void -m68k_linux_sigtramp_frame_this_id (struct frame_info *this_frame, +m68k_linux_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -296,7 +296,7 @@ m68k_linux_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -m68k_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, +m68k_linux_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { @@ -308,7 +308,7 @@ m68k_linux_sigtramp_frame_prev_register (struct frame_info *this_frame, static int m68k_linux_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { return m68k_linux_pc_in_sigtramp (this_frame); diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index d34dfb37d0f..002c7e0742f 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -202,7 +202,7 @@ m68k_convert_register_p (struct gdbarch *gdbarch, return its contents in TO. */ static int -m68k_register_to_value (struct frame_info *frame, int regnum, +m68k_register_to_value (frame_info_ptr frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep) { @@ -229,7 +229,7 @@ m68k_register_to_value (struct frame_info *frame, int regnum, REGNUM in frame FRAME. */ static void -m68k_value_to_register (struct frame_info *frame, int regnum, +m68k_value_to_register (frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from) { gdb_byte to[M68K_MAX_REGISTER_SIZE]; @@ -898,7 +898,7 @@ m68k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) } static CORE_ADDR -m68k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +m68k_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { gdb_byte buf[8]; @@ -909,7 +909,7 @@ m68k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) /* Normal frames. */ static struct m68k_frame_cache * -m68k_frame_cache (struct frame_info *this_frame, void **this_cache) +m68k_frame_cache (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); @@ -974,7 +974,7 @@ m68k_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -m68k_frame_this_id (struct frame_info *this_frame, void **this_cache, +m68k_frame_this_id (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); @@ -988,7 +988,7 @@ m68k_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -m68k_frame_prev_register (struct frame_info *this_frame, void **this_cache, +m68k_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct m68k_frame_cache *cache = m68k_frame_cache (this_frame, this_cache); @@ -1017,7 +1017,7 @@ static const struct frame_unwind m68k_frame_unwind = }; static CORE_ADDR -m68k_frame_base_address (struct frame_info *this_frame, void **this_cache) +m68k_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct m68k_frame_cache *cache = m68k_frame_cache (this_frame, this_cache); @@ -1033,7 +1033,7 @@ static const struct frame_base m68k_frame_base = }; static struct frame_id -m68k_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +m68k_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR fp; @@ -1050,7 +1050,7 @@ m68k_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) This routine returns true on success. */ static int -m68k_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +m68k_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { gdb_byte *buf; CORE_ADDR sp, jb_addr; diff --git a/gdb/m68k-tdep.h b/gdb/m68k-tdep.h index 785e3fdb84f..e22d624adaa 100644 --- a/gdb/m68k-tdep.h +++ b/gdb/m68k-tdep.h @@ -22,7 +22,7 @@ #include "gdbarch.h" -struct frame_info; +class frame_info_ptr; /* Register numbers of various important registers. */ diff --git a/gdb/macroscope.c b/gdb/macroscope.c index fe7f10e296a..c5fd91e6fd1 100644 --- a/gdb/macroscope.c +++ b/gdb/macroscope.c @@ -100,7 +100,7 @@ default_macro_scope (void) { struct symtab_and_line sal; gdb::unique_xmalloc_ptr ms; - struct frame_info *frame; + frame_info_ptr frame; CORE_ADDR pc; /* If there's a selected frame, use its PC. */ diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 67fc9f0cb45..a6416085fe4 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -1910,7 +1910,7 @@ typedef BP_MANIPULATION (mep_break_insn) mep_breakpoint; static struct mep_prologue * -mep_analyze_frame_prologue (struct frame_info *this_frame, +mep_analyze_frame_prologue (frame_info_ptr this_frame, void **this_prologue_cache) { if (! *this_prologue_cache) @@ -1940,7 +1940,7 @@ mep_analyze_frame_prologue (struct frame_info *this_frame, /* Given the next frame and a prologue cache, return this frame's base. */ static CORE_ADDR -mep_frame_base (struct frame_info *this_frame, +mep_frame_base (frame_info_ptr this_frame, void **this_prologue_cache) { struct mep_prologue *p @@ -1968,7 +1968,7 @@ mep_frame_base (struct frame_info *this_frame, static void -mep_frame_this_id (struct frame_info *this_frame, +mep_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -1978,7 +1978,7 @@ mep_frame_this_id (struct frame_info *this_frame, static struct value * -mep_frame_prev_register (struct frame_info *this_frame, +mep_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct mep_prologue *p diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 8acb9cd6fd9..7340b4c7110 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -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, - struct frame_info *fi, + frame_info_ptr fi, int skip_unavailable); /* True if we want to allow Python-based frame filters. */ @@ -61,7 +61,7 @@ mi_cmd_enable_frame_filters (const char *command, char **argv, int argc) /* Like apply_ext_lang_frame_filter, but take a print_values */ static enum ext_lang_bt_status -mi_apply_ext_lang_frame_filter (struct frame_info *frame, +mi_apply_ext_lang_frame_filter (frame_info_ptr frame, frame_filter_flags flags, enum print_values print_values, struct ui_out *out, @@ -87,7 +87,7 @@ mi_cmd_stack_list_frames (const char *command, char **argv, int argc) int frame_low; int frame_high; int i; - struct frame_info *fi; + frame_info_ptr fi; enum ext_lang_bt_status result = EXT_LANG_BT_ERROR; int raw_arg = 0; int oind = 0; @@ -189,7 +189,7 @@ mi_cmd_stack_info_depth (const char *command, char **argv, int argc) { int frame_high; int i; - struct frame_info *fi; + frame_info_ptr fi; if (argc > 1) error (_("-stack-info-depth: Usage: [MAX_DEPTH]")); @@ -216,7 +216,7 @@ mi_cmd_stack_info_depth (const char *command, char **argv, int argc) void mi_cmd_stack_list_locals (const char *command, char **argv, int argc) { - struct frame_info *frame; + frame_info_ptr frame; int raw_arg = 0; enum ext_lang_bt_status result = EXT_LANG_BT_ERROR; enum print_values print_value; @@ -295,7 +295,7 @@ mi_cmd_stack_list_args (const char *command, char **argv, int argc) int frame_low; int frame_high; int i; - struct frame_info *fi; + frame_info_ptr fi; enum print_values print_values; struct ui_out *uiout = current_uiout; int raw_arg = 0; @@ -408,7 +408,7 @@ mi_cmd_stack_list_args (const char *command, char **argv, int argc) void mi_cmd_stack_list_variables (const char *command, char **argv, int argc) { - struct frame_info *frame; + frame_info_ptr frame; int raw_arg = 0; enum ext_lang_bt_status result = EXT_LANG_BT_ERROR; enum print_values print_value; @@ -566,7 +566,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, - struct frame_info *fi, int skip_unavailable) + frame_info_ptr fi, int skip_unavailable) { const struct block *block; struct symbol *sym; @@ -692,7 +692,7 @@ list_args_or_locals (const frame_print_options &fp_opts, manual, this feature is supported here purely for backward compatibility. */ -static struct frame_info * +static frame_info_ptr parse_frame_specification (const char *frame_exp) { gdb_assert (frame_exp != NULL); @@ -706,7 +706,7 @@ parse_frame_specification (const char *frame_exp) struct value *arg = parse_and_eval (frame_exp); /* Assume ARG is an integer, and try using that to select a frame. */ - struct frame_info *fid; + frame_info_ptr fid; int level = value_as_long (arg); fid = find_relative_frame (get_current_frame (), &level); @@ -731,7 +731,7 @@ parse_frame_specification (const char *frame_exp) { if (id == get_frame_id (fid)) { - struct frame_info *prev_frame; + frame_info_ptr prev_frame; while (1) { diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 6d8e510619e..3db7a50648d 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -95,7 +95,7 @@ static void mi_execute_async_cli_command (const char *cli_command, char **argv, int argc); static bool register_changed_p (int regnum, readonly_detached_regcache *, readonly_detached_regcache *); -static void output_register (struct frame_info *, int regnum, int format, +static void output_register (frame_info_ptr , int regnum, int format, int skip_unavailable); /* Controls whether the frontend wants MI in async mode. */ @@ -1004,7 +1004,7 @@ void mi_cmd_data_list_register_values (const char *command, char **argv, int argc) { struct ui_out *uiout = current_uiout; - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; int regnum, numregs, format; int i; @@ -1089,7 +1089,7 @@ mi_cmd_data_list_register_values (const char *command, char **argv, int argc) unavailable. */ static void -output_register (struct frame_info *frame, int regnum, int format, +output_register (frame_info_ptr frame, int regnum, int format, int skip_unavailable) { struct ui_out *uiout = current_uiout; @@ -2077,7 +2077,7 @@ mi_cmd_execute (struct mi_parse *parse) gdb::optional frame_saver; if (parse->frame != -1) { - struct frame_info *fid; + frame_info_ptr fid; int frame = parse->frame; fid = find_relative_frame (get_current_frame (), &frame); @@ -2612,7 +2612,7 @@ mi_cmd_trace_frame_collected (const char *command, char **argv, int argc) the trace frame info, but instead consult the register cache for register availability. */ { - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; int regnum; int numregs; diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c index daa7ddf7e4d..768889a7480 100644 --- a/gdb/microblaze-linux-tdep.c +++ b/gdb/microblaze-linux-tdep.c @@ -62,7 +62,7 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, } static void -microblaze_linux_sigtramp_cache (struct frame_info *next_frame, +microblaze_linux_sigtramp_cache (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 (struct frame_info *next_frame, static void microblaze_linux_sighandler_cache_init (const struct tramp_frame *self, - struct frame_info *next_frame, + frame_info_ptr next_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 722de579868..7ed7116de76 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -368,7 +368,7 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, } static CORE_ADDR -microblaze_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +microblaze_unwind_pc (struct gdbarch *gdbarch, 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 (struct frame_info *next_frame, void **this_cache) +microblaze_frame_cache (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 (struct frame_info *next_frame, void **this_cache) } static void -microblaze_frame_this_id (struct frame_info *next_frame, void **this_cache, +microblaze_frame_this_id (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 (struct frame_info *next_frame, void **this_cache, } static struct value * -microblaze_frame_prev_register (struct frame_info *this_frame, +microblaze_frame_prev_register (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 = }; static CORE_ADDR -microblaze_frame_base_address (struct frame_info *next_frame, +microblaze_frame_base_address (frame_info_ptr next_frame, void **this_cache) { struct microblaze_frame_cache *cache = diff --git a/gdb/minsyms.c b/gdb/minsyms.c index c6abec81ce2..0da615564b6 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -1538,7 +1538,7 @@ lookup_solib_trampoline_symbol_by_pc (CORE_ADDR pc) a duplicate function in case this matters someday. */ CORE_ADDR -find_solib_trampoline_target (struct frame_info *frame, CORE_ADDR pc) +find_solib_trampoline_target (frame_info_ptr frame, CORE_ADDR pc) { struct minimal_symbol *tsymbol = lookup_solib_trampoline_symbol_by_pc (pc); diff --git a/gdb/mips-fbsd-tdep.c b/gdb/mips-fbsd-tdep.c index 05043d93e74..eae53108c03 100644 --- a/gdb/mips-fbsd-tdep.c +++ b/gdb/mips-fbsd-tdep.c @@ -275,7 +275,7 @@ mips_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch, static void mips_fbsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *cache, CORE_ADDR func) { diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 7dae1ca34de..1b3b5f88edb 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -93,7 +93,7 @@ enum #define MIPS_LINUX_JB_PC 0 static int -mips_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +mips_linux_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { CORE_ADDR jb_addr; struct gdbarch *gdbarch = get_frame_arch (frame); @@ -246,7 +246,7 @@ mips_fill_gregset_wrapper (const struct regset *regset, #define MIPS64_LINUX_JB_PC 0 static int -mips64_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +mips64_linux_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { CORE_ADDR jb_addr; struct gdbarch *gdbarch = get_frame_arch (frame); @@ -713,21 +713,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, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, CORE_ADDR *pc); static int micromips_linux_sigframe_validate (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, CORE_ADDR *pc); #define MIPS_NR_LINUX 4000 @@ -958,7 +958,7 @@ static const struct tramp_frame micromips_linux_n64_rt_sigframe = { static void mips_linux_o32_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { @@ -1153,7 +1153,7 @@ mips_linux_o32_sigframe_init (const struct tramp_frame *self, static void mips_linux_n32n64_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { @@ -1238,7 +1238,7 @@ mips_linux_n32n64_sigframe_init (const struct tramp_frame *self, static int mips_linux_sigframe_validate (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, CORE_ADDR *pc) { return mips_pc_is_mips (*pc); @@ -1248,7 +1248,7 @@ mips_linux_sigframe_validate (const struct tramp_frame *self, static int micromips_linux_sigframe_validate (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, CORE_ADDR *pc) { if (mips_pc_is_micromips (get_frame_arch (this_frame), *pc)) @@ -1293,7 +1293,7 @@ mips_linux_restart_reg_p (struct gdbarch *gdbarch) instruction to be executed. */ static CORE_ADDR -mips_linux_syscall_next_pc (struct frame_info *frame) +mips_linux_syscall_next_pc (frame_info_ptr frame) { CORE_ADDR pc = get_frame_pc (frame); ULONGEST v0 = get_frame_register_unsigned (frame, MIPS_V0_REGNUM); diff --git a/gdb/mips-netbsd-tdep.c b/gdb/mips-netbsd-tdep.c index 2179ca0bf5a..c13e1fd0802 100644 --- a/gdb/mips-netbsd-tdep.c +++ b/gdb/mips-netbsd-tdep.c @@ -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 (struct frame_info *frame, CORE_ADDR *pc) +mipsnbsd_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { struct gdbarch *gdbarch = get_frame_arch (frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/mips-sde-tdep.c b/gdb/mips-sde-tdep.c index de8e726d64f..7d69effd704 100644 --- a/gdb/mips-sde-tdep.c +++ b/gdb/mips-sde-tdep.c @@ -34,7 +34,7 @@ in the SDE frame unwinder. */ static struct trad_frame_cache * -mips_sde_frame_cache (struct frame_info *this_frame, void **this_cache) +mips_sde_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); const struct mips_regnum *regs = mips_regnum (gdbarch); @@ -122,7 +122,7 @@ mips_sde_frame_cache (struct frame_info *this_frame, void **this_cache) /* Implement the this_id function for the SDE frame unwinder. */ static void -mips_sde_frame_this_id (struct frame_info *this_frame, void **this_cache, +mips_sde_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct trad_frame_cache *this_trad_cache @@ -134,7 +134,7 @@ mips_sde_frame_this_id (struct frame_info *this_frame, void **this_cache, /* Implement the prev_register function for the SDE frame unwinder. */ static struct value * -mips_sde_frame_prev_register (struct frame_info *this_frame, +mips_sde_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int prev_regnum) { @@ -148,7 +148,7 @@ mips_sde_frame_prev_register (struct frame_info *this_frame, static int mips_sde_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_pc (this_frame); @@ -177,7 +177,7 @@ static const struct frame_unwind mips_sde_frame_unwind = for the normal unwinder. */ static CORE_ADDR -mips_sde_frame_base_address (struct frame_info *this_frame, void **this_cache) +mips_sde_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct trad_frame_cache *this_trad_cache = mips_sde_frame_cache (this_frame, this_cache); @@ -194,7 +194,7 @@ static const struct frame_base mips_sde_frame_base = }; static const struct frame_base * -mips_sde_frame_base_sniffer (struct frame_info *this_frame) +mips_sde_frame_base_sniffer (frame_info_ptr this_frame) { if (mips_sde_frame_sniffer (&mips_sde_frame_unwind, this_frame, NULL)) return &mips_sde_frame_base; diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index c5bd73ce780..a5c39ce224f 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -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 *, - struct frame_info *, const char *); + 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. */ @@ -560,7 +560,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 (struct frame_info *frame) +mips2_fp_compat (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 @@ -941,7 +941,7 @@ mips_convert_register_p (struct gdbarch *gdbarch, } static int -mips_register_to_value (struct frame_info *frame, int regnum, +mips_register_to_value (frame_info_ptr frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep) { @@ -983,7 +983,7 @@ mips_register_to_value (struct frame_info *frame, int regnum, } static void -mips_value_to_register (struct frame_info *frame, int regnum, +mips_value_to_register (frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -1406,7 +1406,7 @@ mips_read_pc (readable_regcache *regcache) } static CORE_ADDR -mips_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +mips_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { CORE_ADDR pc; @@ -1428,7 +1428,7 @@ mips_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) } static CORE_ADDR -mips_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) +mips_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame) { return frame_unwind_register_signed (next_frame, gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM); @@ -1440,7 +1440,7 @@ mips_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) breakpoint. */ static struct frame_id -mips_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +mips_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { return frame_id_build (get_frame_register_signed (this_frame, @@ -2523,7 +2523,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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct mips_frame_cache *this_cache) { int prev_non_prologue_insn = 0; @@ -2859,7 +2859,7 @@ mips16_scan_prologue (struct gdbarch *gdbarch, mips_insn32 unwinder. */ static struct mips_frame_cache * -mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache) +mips_insn16_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct mips_frame_cache *cache; @@ -2895,7 +2895,7 @@ mips_insn16_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -mips_insn16_frame_this_id (struct frame_info *this_frame, void **this_cache, +mips_insn16_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct mips_frame_cache *info = mips_insn16_frame_cache (this_frame, @@ -2907,7 +2907,7 @@ mips_insn16_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -mips_insn16_frame_prev_register (struct frame_info *this_frame, +mips_insn16_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct mips_frame_cache *info = mips_insn16_frame_cache (this_frame, @@ -2917,7 +2917,7 @@ mips_insn16_frame_prev_register (struct frame_info *this_frame, static int mips_insn16_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR pc = get_frame_pc (this_frame); @@ -2938,7 +2938,7 @@ static const struct frame_unwind mips_insn16_frame_unwind = }; static CORE_ADDR -mips_insn16_frame_base_address (struct frame_info *this_frame, +mips_insn16_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct mips_frame_cache *info = mips_insn16_frame_cache (this_frame, @@ -2955,7 +2955,7 @@ static const struct frame_base mips_insn16_frame_base = }; static const struct frame_base * -mips_insn16_frame_base_sniffer (struct frame_info *this_frame) +mips_insn16_frame_base_sniffer (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR pc = get_frame_pc (this_frame); @@ -2984,7 +2984,7 @@ micromips_decode_imm9 (int imm) static CORE_ADDR micromips_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR limit_pc, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct mips_frame_cache *this_cache) { CORE_ADDR end_prologue_addr; @@ -3293,7 +3293,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 (struct frame_info *this_frame, void **this_cache) +mips_micro_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct mips_frame_cache *cache; @@ -3330,7 +3330,7 @@ mips_micro_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -mips_micro_frame_this_id (struct frame_info *this_frame, void **this_cache, +mips_micro_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct mips_frame_cache *info = mips_micro_frame_cache (this_frame, @@ -3342,7 +3342,7 @@ mips_micro_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -mips_micro_frame_prev_register (struct frame_info *this_frame, +mips_micro_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct mips_frame_cache *info = mips_micro_frame_cache (this_frame, @@ -3352,7 +3352,7 @@ mips_micro_frame_prev_register (struct frame_info *this_frame, static int mips_micro_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR pc = get_frame_pc (this_frame); @@ -3374,7 +3374,7 @@ static const struct frame_unwind mips_micro_frame_unwind = }; static CORE_ADDR -mips_micro_frame_base_address (struct frame_info *this_frame, +mips_micro_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct mips_frame_cache *info = mips_micro_frame_cache (this_frame, @@ -3391,7 +3391,7 @@ static const struct frame_base mips_micro_frame_base = }; static const struct frame_base * -mips_micro_frame_base_sniffer (struct frame_info *this_frame) +mips_micro_frame_base_sniffer (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); CORE_ADDR pc = get_frame_pc (this_frame); @@ -3429,7 +3429,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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct mips_frame_cache *this_cache) { int prev_non_prologue_insn; @@ -3674,7 +3674,7 @@ restart: unwinder. Likewise microMIPS and the mips_micro unwinder. */ static struct mips_frame_cache * -mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache) +mips_insn32_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct mips_frame_cache *cache; @@ -3711,7 +3711,7 @@ mips_insn32_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -mips_insn32_frame_this_id (struct frame_info *this_frame, void **this_cache, +mips_insn32_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct mips_frame_cache *info = mips_insn32_frame_cache (this_frame, @@ -3723,7 +3723,7 @@ mips_insn32_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -mips_insn32_frame_prev_register (struct frame_info *this_frame, +mips_insn32_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct mips_frame_cache *info = mips_insn32_frame_cache (this_frame, @@ -3733,7 +3733,7 @@ mips_insn32_frame_prev_register (struct frame_info *this_frame, static int mips_insn32_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_pc (this_frame); if (mips_pc_is_mips (pc)) @@ -3753,7 +3753,7 @@ static const struct frame_unwind mips_insn32_frame_unwind = }; static CORE_ADDR -mips_insn32_frame_base_address (struct frame_info *this_frame, +mips_insn32_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct mips_frame_cache *info = mips_insn32_frame_cache (this_frame, @@ -3770,7 +3770,7 @@ static const struct frame_base mips_insn32_frame_base = }; static const struct frame_base * -mips_insn32_frame_base_sniffer (struct frame_info *this_frame) +mips_insn32_frame_base_sniffer (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); if (mips_pc_is_mips (pc)) @@ -3780,7 +3780,7 @@ mips_insn32_frame_base_sniffer (struct frame_info *this_frame) } static struct trad_frame_cache * -mips_stub_frame_cache (struct frame_info *this_frame, void **this_cache) +mips_stub_frame_cache (frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc; CORE_ADDR start_addr; @@ -3815,7 +3815,7 @@ mips_stub_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -mips_stub_frame_this_id (struct frame_info *this_frame, void **this_cache, +mips_stub_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct trad_frame_cache *this_trad_cache @@ -3824,7 +3824,7 @@ mips_stub_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -mips_stub_frame_prev_register (struct frame_info *this_frame, +mips_stub_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct trad_frame_cache *this_trad_cache @@ -3834,7 +3834,7 @@ mips_stub_frame_prev_register (struct frame_info *this_frame, static int mips_stub_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + frame_info_ptr this_frame, void **this_cache) { gdb_byte dummy[4]; CORE_ADDR pc = get_frame_address_in_block (this_frame); @@ -3870,7 +3870,7 @@ static const struct frame_unwind mips_stub_frame_unwind = }; static CORE_ADDR -mips_stub_frame_base_address (struct frame_info *this_frame, +mips_stub_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct trad_frame_cache *this_trad_cache @@ -3887,7 +3887,7 @@ static const struct frame_base mips_stub_frame_base = }; static const struct frame_base * -mips_stub_frame_base_sniffer (struct frame_info *this_frame) +mips_stub_frame_base_sniffer (frame_info_ptr this_frame) { if (mips_stub_frame_sniffer (&mips_stub_frame_unwind, this_frame, NULL)) return &mips_stub_frame_base; @@ -6253,7 +6253,7 @@ mips_o64_return_value (struct gdbarch *gdbarch, struct value *function, into rare_buffer. */ static void -mips_read_fp_register_single (struct frame_info *frame, int regno, +mips_read_fp_register_single (frame_info_ptr frame, int regno, gdb_byte *rare_buffer) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -6287,7 +6287,7 @@ mips_read_fp_register_single (struct frame_info *frame, int regno, register. */ static void -mips_read_fp_register_double (struct frame_info *frame, int regno, +mips_read_fp_register_double (frame_info_ptr frame, int regno, gdb_byte *rare_buffer) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -6326,7 +6326,7 @@ mips_read_fp_register_double (struct frame_info *frame, int regno, } static void -mips_print_fp_register (struct ui_file *file, struct frame_info *frame, +mips_print_fp_register (struct ui_file *file, frame_info_ptr frame, int regnum) { /* Do values for FP (float) regs. */ struct gdbarch *gdbarch = get_frame_arch (frame); @@ -6391,7 +6391,7 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame, } static void -mips_print_register (struct ui_file *file, struct frame_info *frame, +mips_print_register (struct ui_file *file, frame_info_ptr frame, int regnum) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -6446,7 +6446,7 @@ print_fpu_flags (struct ui_file *file, int flags) static void mips_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, const char *args) + 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); @@ -6513,7 +6513,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, struct frame_info *frame, +print_fp_register_row (struct ui_file *file, frame_info_ptr frame, int regnum) { gdb_printf (file, " "); @@ -6526,7 +6526,7 @@ print_fp_register_row (struct ui_file *file, struct frame_info *frame, /* Print a row's worth of GP (int) registers, with name labels above. */ static int -print_gp_register_row (struct ui_file *file, struct frame_info *frame, +print_gp_register_row (struct ui_file *file, frame_info_ptr frame, int start_regnum) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -6629,7 +6629,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame, static void mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, int regnum, int all) + frame_info_ptr frame, int regnum, int all) { if (regnum != -1) /* Do one specified register. */ { @@ -6661,7 +6661,7 @@ mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, static int mips_single_step_through_delay (struct gdbarch *gdbarch, - struct frame_info *frame) + frame_info_ptr frame) { CORE_ADDR pc = get_frame_pc (frame); enum mips_isa isa; @@ -7566,7 +7566,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 (struct frame_info *frame, CORE_ADDR pc) +mips_get_mips16_fn_stub_pc (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -7689,7 +7689,7 @@ mips_get_mips16_fn_stub_pc (struct frame_info *frame, CORE_ADDR pc) gory details. */ static CORE_ADDR -mips_skip_mips16_trampoline_code (struct frame_info *frame, CORE_ADDR pc) +mips_skip_mips16_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); CORE_ADDR start_addr; @@ -7817,7 +7817,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 (struct frame_info *frame, CORE_ADDR pc) +mips_skip_pic_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -7870,7 +7870,7 @@ mips_skip_pic_trampoline_code (struct frame_info *frame, CORE_ADDR pc) } static CORE_ADDR -mips_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) +mips_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { CORE_ADDR requested_pc = pc; CORE_ADDR target_pc; @@ -8071,7 +8071,7 @@ mips_register_g_packet_guesses (struct gdbarch *gdbarch) } static struct value * -value_of_mips_user_reg (struct frame_info *frame, const void *baton) +value_of_mips_user_reg (frame_info_ptr frame, const void *baton) { const int *reg_p = (const int *) baton; return value_of_register (*reg_p, frame); diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h index 24ed678a521..5d9a52490c4 100644 --- a/gdb/mips-tdep.h +++ b/gdb/mips-tdep.h @@ -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) (struct frame_info *frame) = nullptr; + CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr; }; /* Register numbers of various important registers. */ diff --git a/gdb/mips64-obsd-tdep.c b/gdb/mips64-obsd-tdep.c index 8fe2834f23a..450e302f004 100644 --- a/gdb/mips64-obsd-tdep.c +++ b/gdb/mips64-obsd-tdep.c @@ -77,7 +77,7 @@ mips64obsd_iterate_over_regset_sections (struct gdbarch *gdbarch, static void mips64obsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *cache, CORE_ADDR func) { diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c index 4fb59123b58..b6111d431b7 100644 --- a/gdb/mn10300-linux-tdep.c +++ b/gdb/mn10300-linux-tdep.c @@ -464,7 +464,7 @@ am33_iterate_over_regset_sections (struct gdbarch *gdbarch, static void am33_linux_sigframe_cache_init (const struct tramp_frame *self, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 25c207a738f..5be02132a5d 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1044,7 +1044,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 (struct frame_info *this_frame, +mn10300_analyze_frame_prologue (frame_info_ptr this_frame, void **this_prologue_cache) { if (!*this_prologue_cache) @@ -1073,7 +1073,7 @@ mn10300_analyze_frame_prologue (struct frame_info *this_frame, /* Given the next frame and a prologue cache, return this frame's base. */ static CORE_ADDR -mn10300_frame_base (struct frame_info *this_frame, void **this_prologue_cache) +mn10300_frame_base (frame_info_ptr this_frame, void **this_prologue_cache) { struct mn10300_prologue *p = mn10300_analyze_frame_prologue (this_frame, this_prologue_cache); @@ -1097,7 +1097,7 @@ mn10300_frame_base (struct frame_info *this_frame, void **this_prologue_cache) } static void -mn10300_frame_this_id (struct frame_info *this_frame, +mn10300_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -1108,7 +1108,7 @@ mn10300_frame_this_id (struct frame_info *this_frame, } static struct value * -mn10300_frame_prev_register (struct frame_info *this_frame, +mn10300_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct mn10300_prologue *p diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index 29bb6458f80..f1841e4e57e 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -513,7 +513,7 @@ moxie_alloc_frame_cache (void) /* Populate a moxie_frame_cache object for this_frame. */ static struct moxie_frame_cache * -moxie_frame_cache (struct frame_info *this_frame, void **this_cache) +moxie_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct moxie_frame_cache *cache; CORE_ADDR current_pc; @@ -550,7 +550,7 @@ moxie_frame_cache (struct frame_info *this_frame, void **this_cache) frame. This will be used to create a new GDB frame struct. */ static void -moxie_frame_this_id (struct frame_info *this_frame, +moxie_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { struct moxie_frame_cache *cache = moxie_frame_cache (this_frame, @@ -566,7 +566,7 @@ moxie_frame_this_id (struct frame_info *this_frame, /* Get the value of register regnum in the previous stack frame. */ static struct value * -moxie_frame_prev_register (struct frame_info *this_frame, +moxie_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct moxie_frame_cache *cache = moxie_frame_cache (this_frame, @@ -597,7 +597,7 @@ static const struct frame_unwind moxie_frame_unwind = { /* Return the base address of this_frame. */ static CORE_ADDR -moxie_frame_base_address (struct frame_info *this_frame, void **this_cache) +moxie_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct moxie_frame_cache *cache = moxie_frame_cache (this_frame, this_cache); diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index 6c729affdef..77868f78bd3 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -457,7 +457,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 (struct frame_info *this_frame, +msp430_analyze_frame_prologue (frame_info_ptr this_frame, void **this_prologue_cache) { if (!*this_prologue_cache) @@ -485,7 +485,7 @@ msp430_analyze_frame_prologue (struct frame_info *this_frame, /* Given a frame and a prologue cache, return this frame's base. */ static CORE_ADDR -msp430_frame_base (struct frame_info *this_frame, void **this_prologue_cache) +msp430_frame_base (frame_info_ptr this_frame, void **this_prologue_cache) { struct msp430_prologue *p = msp430_analyze_frame_prologue (this_frame, this_prologue_cache); @@ -497,7 +497,7 @@ msp430_frame_base (struct frame_info *this_frame, void **this_prologue_cache) /* Implement the "frame_this_id" method for unwinding frames. */ static void -msp430_this_id (struct frame_info *this_frame, +msp430_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { *this_id = frame_id_build (msp430_frame_base (this_frame, @@ -508,7 +508,7 @@ msp430_this_id (struct frame_info *this_frame, /* Implement the "frame_prev_register" method for unwinding frames. */ static struct value * -msp430_prev_register (struct frame_info *this_frame, +msp430_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct msp430_prologue *p @@ -804,7 +804,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 (struct frame_info *frame, CORE_ADDR pc) +msp430_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { struct bound_minimal_symbol bms; const char *stub_name; diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c index 962584a3683..12cf4f602c5 100644 --- a/gdb/nds32-tdep.c +++ b/gdb/nds32-tdep.c @@ -265,7 +265,7 @@ static const struct register. */ static struct value * -value_of_nds32_reg (struct frame_info *frame, const void *baton) +value_of_nds32_reg (frame_info_ptr frame, const void *baton) { return value_of_register ((int) (intptr_t) baton, frame); } @@ -898,7 +898,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 (struct frame_info *this_frame, void **this_cache) +nds32_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct nds32_frame_cache *cache; @@ -949,7 +949,7 @@ nds32_frame_cache (struct frame_info *this_frame, void **this_cache) PC and the caller's SP when we were called. */ static void -nds32_frame_this_id (struct frame_info *this_frame, +nds32_frame_this_id (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); @@ -964,7 +964,7 @@ nds32_frame_this_id (struct frame_info *this_frame, /* Implement the "prev_register" frame_unwind method. */ static struct value * -nds32_frame_prev_register (struct frame_info *this_frame, void **this_cache, +nds32_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache); @@ -998,7 +998,7 @@ static const struct frame_unwind nds32_frame_unwind = /* Return the frame base address of *THIS_FRAME. */ static CORE_ADDR -nds32_frame_base_address (struct frame_info *this_frame, void **this_cache) +nds32_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct nds32_frame_cache *cache = nds32_frame_cache (this_frame, this_cache); @@ -1284,7 +1284,7 @@ nds32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr) static int nds32_epilogue_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **this_cache) + 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), @@ -1299,7 +1299,7 @@ nds32_epilogue_frame_sniffer (const struct frame_unwind *self, *THIS_CACHE. */ static struct nds32_frame_cache * -nds32_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) +nds32_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct nds32_frame_cache *cache; @@ -1331,7 +1331,7 @@ nds32_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) /* Implement the "this_id" frame_unwind method. */ static void -nds32_epilogue_frame_this_id (struct frame_info *this_frame, +nds32_epilogue_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct nds32_frame_cache *cache @@ -1347,7 +1347,7 @@ nds32_epilogue_frame_this_id (struct frame_info *this_frame, /* Implement the "prev_register" frame_unwind method. */ static struct value * -nds32_epilogue_frame_prev_register (struct frame_info *this_frame, +nds32_epilogue_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct nds32_frame_cache *cache @@ -1824,7 +1824,7 @@ nds32_return_value (struct gdbarch *gdbarch, struct value *func_type, /* Implement the "get_longjmp_target" gdbarch method. */ static int -nds32_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) +nds32_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { gdb_byte buf[4]; CORE_ADDR jb_addr; diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c index da69638b20b..5a03cbc1773 100644 --- a/gdb/nios2-linux-tdep.c +++ b/gdb/nios2-linux-tdep.c @@ -134,7 +134,7 @@ nios2_iterate_over_regset_sections (struct gdbarch *gdbarch, static void nios2_linux_rt_sigreturn_init (const struct tramp_frame *self, - struct frame_info *next_frame, + 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 (struct frame_info *frame, +nios2_linux_syscall_next_pc (frame_info_ptr frame, const struct nios2_opcode *op) { CORE_ADDR pc = get_frame_pc (frame); diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c index 2d8049032dc..effa10bf97e 100644 --- a/gdb/nios2-tdep.c +++ b/gdb/nios2-tdep.c @@ -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, - struct frame_info *this_frame) + 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, struct frame_info *next_frame) +nios2_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { gdb_byte buf[4]; @@ -1893,7 +1893,7 @@ nios2_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) *THIS_PROLOGUE_CACHE first. */ static struct nios2_unwind_cache * -nios2_frame_unwind_cache (struct frame_info *this_frame, +nios2_frame_unwind_cache (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 (struct frame_info *this_frame, /* Implement the this_id function for the normal unwinder. */ static void -nios2_frame_this_id (struct frame_info *this_frame, void **this_cache, +nios2_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, /* Implement the prev_register function for the normal unwinder. */ static struct value * -nios2_frame_prev_register (struct frame_info *this_frame, void **this_cache, +nios2_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct nios2_unwind_cache *cache = @@ -1966,7 +1966,7 @@ nios2_frame_prev_register (struct frame_info *this_frame, void **this_cache, for the normal unwinder. */ static CORE_ADDR -nios2_frame_base_address (struct frame_info *this_frame, void **this_cache) +nios2_frame_base_address (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 (struct frame_info *this_frame, void **this_cache) +nios2_stub_frame_cache (frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc; CORE_ADDR start_addr; @@ -2033,7 +2033,7 @@ nios2_stub_frame_cache (struct frame_info *this_frame, void **this_cache) /* Implement the this_id function for the stub unwinder. */ static void -nios2_stub_frame_this_id (struct frame_info *this_frame, void **this_cache, +nios2_stub_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, /* Implement the prev_register function for the stub unwinder. */ static struct value * -nios2_stub_frame_prev_register (struct frame_info *this_frame, +nios2_stub_frame_prev_register (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 (struct frame_info *this_frame, static int nios2_stub_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, void **cache) + 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 (struct frame_info *frame, CORE_ADDR *pc) +nios2_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { struct gdbarch *gdbarch = get_frame_arch (frame); nios2_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); diff --git a/gdb/nios2-tdep.h b/gdb/nios2-tdep.h index 4711b6a2ac5..21f4c6d9320 100644 --- a/gdb/nios2-tdep.h +++ b/gdb/nios2-tdep.h @@ -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) (struct frame_info *frame, + CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame, const struct nios2_opcode *op) = nullptr; /* Returns true if PC points to a kernel helper function. */ diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 4429d4a7d44..1a1d6215475 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -275,7 +275,7 @@ public: /* See language.h. */ - CORE_ADDR skip_trampoline (struct frame_info *frame, + CORE_ADDR skip_trampoline (frame_info_ptr frame, CORE_ADDR stop_pc) const override { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -1458,7 +1458,7 @@ find_implementation (struct gdbarch *gdbarch, static int resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); struct gdbarch *gdbarch = get_frame_arch (frame); struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; @@ -1480,7 +1480,7 @@ resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc) static int resolve_msgsend_stret (CORE_ADDR pc, CORE_ADDR *new_pc) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); struct gdbarch *gdbarch = get_frame_arch (frame); struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; @@ -1502,7 +1502,7 @@ resolve_msgsend_stret (CORE_ADDR pc, CORE_ADDR *new_pc) static int resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); struct gdbarch *gdbarch = get_frame_arch (frame); struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; @@ -1530,7 +1530,7 @@ resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc) static int resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); struct gdbarch *gdbarch = get_frame_arch (frame); struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; diff --git a/gdb/observable.h b/gdb/observable.h index 796bf2a43c6..1103c5c98a6 100644 --- a/gdb/observable.h +++ b/gdb/observable.h @@ -233,7 +233,7 @@ extern observable inferior_call_post; /* A register in the inferior has been modified by the gdb user. */ -extern observable +extern observable register_changed; /* The user-selected inferior, thread and/or frame has changed. The diff --git a/gdb/or1k-linux-tdep.c b/gdb/or1k-linux-tdep.c index 10f76680d8c..750b3d84288 100644 --- a/gdb/or1k-linux-tdep.c +++ b/gdb/or1k-linux-tdep.c @@ -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, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 9ff9e832c8f..efaf8745482 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -379,7 +379,7 @@ or1k_delay_slot_p (struct gdbarch *gdbarch, CORE_ADDR pc) static int or1k_single_step_through_delay (struct gdbarch *gdbarch, - struct frame_info *this_frame) + frame_info_ptr this_frame) { ULONGEST val; CORE_ADDR ppc; @@ -559,7 +559,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, struct frame_info *next_frame) +or1k_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { CORE_ADDR pc; @@ -579,7 +579,7 @@ or1k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) /* Implement the unwind_sp gdbarch method. */ static CORE_ADDR -or1k_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) +or1k_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame) { CORE_ADDR sp; @@ -890,7 +890,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 (struct frame_info *this_frame, void **prologue_cache) +or1k_frame_cache (frame_info_ptr this_frame, void **prologue_cache) { struct gdbarch *gdbarch; struct trad_frame_cache *info; @@ -1103,7 +1103,7 @@ or1k_frame_cache (struct frame_info *this_frame, void **prologue_cache) /* Implement the this_id function for the stub unwinder. */ static void -or1k_frame_this_id (struct frame_info *this_frame, +or1k_frame_this_id (frame_info_ptr this_frame, void **prologue_cache, struct frame_id *this_id) { struct trad_frame_cache *info = or1k_frame_cache (this_frame, @@ -1115,7 +1115,7 @@ or1k_frame_this_id (struct frame_info *this_frame, /* Implement the prev_register function for the stub unwinder. */ static struct value * -or1k_frame_prev_register (struct frame_info *this_frame, +or1k_frame_prev_register (frame_info_ptr this_frame, void **prologue_cache, int regnum) { struct trad_frame_cache *info = or1k_frame_cache (this_frame, diff --git a/gdb/ppc-fbsd-tdep.c b/gdb/ppc-fbsd-tdep.c index f5b482921a7..497d82810a7 100644 --- a/gdb/ppc-fbsd-tdep.c +++ b/gdb/ppc-fbsd-tdep.c @@ -150,7 +150,7 @@ static const int ppcfbsd_sigreturn_offset[] = { static int ppcfbsd_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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 (struct frame_info *this_frame, void **this_cache) +ppcfbsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); ppc_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -243,7 +243,7 @@ ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -ppcfbsd_sigtramp_frame_this_id (struct frame_info *this_frame, +ppcfbsd_sigtramp_frame_this_id (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 (struct frame_info *this_frame, } static struct value * -ppcfbsd_sigtramp_frame_prev_register (struct frame_info *this_frame, +ppcfbsd_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct trad_frame_cache *cache = diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 96eb931743f..8fcfb42a254 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -328,7 +328,7 @@ powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc) stub sequence. */ static CORE_ADDR -ppc_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) +ppc_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { unsigned int insnbuf[POWERPC32_PLT_CHECK_LEN]; struct gdbarch *gdbarch = get_frame_arch (frame); @@ -1159,7 +1159,7 @@ ppc_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, } static void -ppc_linux_sigtramp_cache (struct frame_info *this_frame, +ppc_linux_sigtramp_cache (frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func, LONGEST offset, int bias) @@ -1231,7 +1231,7 @@ ppc_linux_sigtramp_cache (struct frame_info *this_frame, static void ppc32_linux_sigaction_cache_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { @@ -1243,7 +1243,7 @@ ppc32_linux_sigaction_cache_init (const struct tramp_frame *self, static void ppc64_linux_sigaction_cache_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { @@ -1255,7 +1255,7 @@ ppc64_linux_sigaction_cache_init (const struct tramp_frame *self, static void ppc32_linux_sighandler_cache_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { @@ -1267,7 +1267,7 @@ ppc32_linux_sighandler_cache_init (const struct tramp_frame *self, static void ppc64_linux_sighandler_cache_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/ppc-netbsd-tdep.c b/gdb/ppc-netbsd-tdep.c index 01563332855..03ffa5c5292 100644 --- a/gdb/ppc-netbsd-tdep.c +++ b/gdb/ppc-netbsd-tdep.c @@ -97,7 +97,7 @@ extern const struct tramp_frame ppcnbsd2_sigtramp; static void ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/ppc-obsd-tdep.c b/gdb/ppc-obsd-tdep.c index 90fb5e3a399..7436532d846 100644 --- a/gdb/ppc-obsd-tdep.c +++ b/gdb/ppc-obsd-tdep.c @@ -117,7 +117,7 @@ static const int ppcobsd_sigreturn_offset[] = { static int ppcobsd_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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 (struct frame_info *this_frame, void **this_cache) +ppcobsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); ppc_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -212,7 +212,7 @@ ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -ppcobsd_sigtramp_frame_this_id (struct frame_info *this_frame, +ppcobsd_sigtramp_frame_this_id (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 (struct frame_info *this_frame, } static struct value * -ppcobsd_sigtramp_frame_prev_register (struct frame_info *this_frame, +ppcobsd_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct trad_frame_cache *cache = diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h index 44f63b145c6..34b250849b9 100644 --- a/gdb/ppc-tdep.h +++ b/gdb/ppc-tdep.h @@ -23,7 +23,7 @@ #include "gdbarch.h" struct gdbarch; -struct frame_info; +class frame_info_ptr; struct value; struct regcache; struct type; @@ -420,7 +420,7 @@ struct ppc_insn_pattern int optional; /* If non-zero, this insn may be absent. */ }; -extern int ppc_insns_match_pattern (struct frame_info *frame, CORE_ADDR pc, +extern int ppc_insns_match_pattern (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); diff --git a/gdb/ppc64-tdep.c b/gdb/ppc64-tdep.c index 0437ca7e3f3..b3ae2329e7b 100644 --- a/gdb/ppc64-tdep.c +++ b/gdb/ppc64-tdep.c @@ -85,7 +85,7 @@ Return the function's entry point. */ static CORE_ADDR -ppc64_plt_entry_point (struct frame_info *frame, CORE_ADDR plt_off) +ppc64_plt_entry_point (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 (struct frame_info *frame, CORE_ADDR plt_off) } static CORE_ADDR -ppc64_plt_pcrel_entry_point (struct frame_info *frame, CORE_ADDR plt_off, +ppc64_plt_pcrel_entry_point (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 (struct frame_info *frame, unsigned int *insn) +ppc64_standard_linkage1_target (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 (struct frame_info *frame, unsigned int *insn) } static CORE_ADDR -ppc64_standard_linkage2_target (struct frame_info *frame, unsigned int *insn) +ppc64_standard_linkage2_target (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 (struct frame_info *frame, unsigned int *insn) } static CORE_ADDR -ppc64_standard_linkage3_target (struct frame_info *frame, unsigned int *insn) +ppc64_standard_linkage3_target (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 (struct frame_info *frame, unsigned int *insn) } static CORE_ADDR -ppc64_standard_linkage4_target (struct frame_info *frame, unsigned int *insn) +ppc64_standard_linkage4_target (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 (struct frame_info *frame, unsigned int *insn) } static CORE_ADDR -ppc64_pcrel_linkage1_target (struct frame_info *frame, unsigned int *insn, +ppc64_pcrel_linkage1_target (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 (struct frame_info *frame, unsigned int *insn, } static CORE_ADDR -ppc64_pcrel_linkage2_target (struct frame_info *frame, unsigned int *insn, +ppc64_pcrel_linkage2_target (frame_info_ptr frame, unsigned int *insn, CORE_ADDR pc) { CORE_ADDR plt_off; @@ -611,7 +611,7 @@ ppc64_pcrel_linkage2_target (struct frame_info *frame, unsigned int *insn, check whether we are in the middle of a PLT stub. */ static CORE_ADDR -ppc64_skip_trampoline_code_1 (struct frame_info *frame, CORE_ADDR pc) +ppc64_skip_trampoline_code_1 (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 (struct frame_info *frame, CORE_ADDR pc) ppc_elfv2_skip_entrypoint. */ CORE_ADDR -ppc64_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) +ppc64_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); diff --git a/gdb/ppc64-tdep.h b/gdb/ppc64-tdep.h index 943d5fbc194..f519fe63463 100644 --- a/gdb/ppc64-tdep.h +++ b/gdb/ppc64-tdep.h @@ -21,10 +21,10 @@ #define PPC64_TDEP_H struct gdbarch; -struct frame_info; +class frame_info_ptr; struct target_ops; -extern CORE_ADDR ppc64_skip_trampoline_code (struct frame_info *frame, +extern CORE_ADDR ppc64_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc); extern CORE_ADDR ppc64_convert_from_func_ptr_addr (struct gdbarch *gdbarch, diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 55f92ba80cd..d077f13fa55 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -749,7 +749,7 @@ pc_prefix (CORE_ADDR addr) { if (has_stack_frames ()) { - struct frame_info *frame; + frame_info_ptr frame; CORE_ADDR pc; frame = get_selected_frame (NULL); @@ -2380,7 +2380,7 @@ clear_dangling_display_expressions (struct objfile *objfile) void print_variable_and_value (const char *name, struct symbol *var, - struct frame_info *frame, + frame_info_ptr frame, struct ui_file *stream, int indent) { diff --git a/gdb/probe.c b/gdb/probe.c index ad7af77f722..ec8845219fa 100644 --- a/gdb/probe.c +++ b/gdb/probe.c @@ -683,7 +683,7 @@ disable_probes_command (const char *arg, int from_tty) /* See comments in probe.h. */ struct value * -probe_safe_evaluate_at_pc (struct frame_info *frame, unsigned n) +probe_safe_evaluate_at_pc (frame_info_ptr frame, unsigned n) { struct bound_probe probe; unsigned n_args; @@ -801,7 +801,7 @@ static struct value * compute_probe_arg (struct gdbarch *arch, struct internalvar *ivar, void *data) { - struct frame_info *frame = get_selected_frame (_("No frame selected")); + frame_info_ptr frame = get_selected_frame (_("No frame selected")); CORE_ADDR pc = get_frame_pc (frame); int sel = (int) (uintptr_t) data; struct bound_probe pc_probe; diff --git a/gdb/probe.h b/gdb/probe.h index fe933154663..598f43a238e 100644 --- a/gdb/probe.h +++ b/gdb/probe.h @@ -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, - struct frame_info *frame) = 0; + 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 (struct frame_info *frame, +extern struct value *probe_safe_evaluate_at_pc (frame_info_ptr frame, unsigned n); #endif /* !defined (PROBE_H) */ diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h index 220af1f7b12..1aa888f081a 100644 --- a/gdb/python/py-event.h +++ b/gdb/python/py-event.h @@ -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 (struct frame_info *frame, +extern int emit_register_changed_event (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, diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c index 317e2d708d9..1d25cca5c17 100644 --- a/gdb/python/py-finishbreakpoint.c +++ b/gdb/python/py-finishbreakpoint.c @@ -164,8 +164,8 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs) (struct finish_breakpoint_object *) self; PyObject *frame_obj = NULL; int thread; - struct frame_info *frame = NULL; /* init for gcc -Wall */ - struct frame_info *prev_frame = NULL; + frame_info_ptr frame = NULL; /* init for gcc -Wall */ + frame_info_ptr prev_frame = NULL; struct frame_id frame_id; PyObject *internal = NULL; int internal_bp = 0; diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c index 0240da966ff..cbce9457755 100644 --- a/gdb/python/py-frame.c +++ b/gdb/python/py-frame.c @@ -57,11 +57,11 @@ struct frame_object { object. If the frame doesn't exist anymore (the frame id doesn't correspond to any frame in the inferior), returns NULL. */ -struct frame_info * +frame_info_ptr frame_object_to_frame_info (PyObject *obj) { frame_object *frame_obj = (frame_object *) obj; - struct frame_info *frame; + frame_info_ptr frame; frame = frame_find_by_id (frame_obj->frame_id); if (frame == NULL) @@ -90,7 +90,7 @@ frapy_str (PyObject *self) static PyObject * frapy_is_valid (PyObject *self, PyObject *args) { - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; try { @@ -113,7 +113,7 @@ frapy_is_valid (PyObject *self, PyObject *args) static PyObject * frapy_name (PyObject *self, PyObject *args) { - struct frame_info *frame; + frame_info_ptr frame; gdb::unique_xmalloc_ptr name; enum language lang; PyObject *result; @@ -149,7 +149,7 @@ frapy_name (PyObject *self, PyObject *args) static PyObject * frapy_type (PyObject *self, PyObject *args) { - struct frame_info *frame; + frame_info_ptr frame; enum frame_type type = NORMAL_FRAME;/* Initialize to appease gcc warning. */ try @@ -172,7 +172,7 @@ frapy_type (PyObject *self, PyObject *args) static PyObject * frapy_arch (PyObject *self, PyObject *args) { - struct frame_info *frame = NULL; /* Initialize to appease gcc warning. */ + frame_info_ptr frame = NULL; /* Initialize to appease gcc warning. */ frame_object *obj = (frame_object *) self; try @@ -193,7 +193,7 @@ frapy_arch (PyObject *self, PyObject *args) static PyObject * frapy_unwind_stop_reason (PyObject *self, PyObject *args) { - struct frame_info *frame = NULL; /* Initialize to appease gcc warning. */ + frame_info_ptr frame = NULL; /* Initialize to appease gcc warning. */ enum unwind_stop_reason stop_reason; try @@ -217,7 +217,7 @@ static PyObject * frapy_pc (PyObject *self, PyObject *args) { CORE_ADDR pc = 0; /* Initialize to appease gcc warning. */ - struct frame_info *frame; + frame_info_ptr frame; try { @@ -246,7 +246,7 @@ frapy_read_register (PyObject *self, PyObject *args) return NULL; try { - struct frame_info *frame; + frame_info_ptr frame; int regnum; FRAPY_REQUIRE_VALID (self, frame); @@ -275,7 +275,7 @@ frapy_read_register (PyObject *self, PyObject *args) static PyObject * frapy_block (PyObject *self, PyObject *args) { - struct frame_info *frame; + frame_info_ptr frame; const struct block *block = NULL, *fn_block; try @@ -317,7 +317,7 @@ static PyObject * frapy_function (PyObject *self, PyObject *args) { struct symbol *sym = NULL; - struct frame_info *frame; + frame_info_ptr frame; try { @@ -343,7 +343,7 @@ frapy_function (PyObject *self, PyObject *args) Sets a Python exception and returns NULL on error. */ PyObject * -frame_info_to_frame_object (struct frame_info *frame) +frame_info_to_frame_object (frame_info_ptr frame) { gdbpy_ref frame_obj (PyObject_New (frame_object, &frame_object_type)); @@ -386,7 +386,7 @@ frame_info_to_frame_object (struct frame_info *frame) static PyObject * frapy_older (PyObject *self, PyObject *args) { - struct frame_info *frame, *prev = NULL; + frame_info_ptr frame, prev = NULL; PyObject *prev_obj = NULL; /* Initialize to appease gcc warning. */ try @@ -418,7 +418,7 @@ frapy_older (PyObject *self, PyObject *args) static PyObject * frapy_newer (PyObject *self, PyObject *args) { - struct frame_info *frame, *next = NULL; + frame_info_ptr frame, next = NULL; PyObject *next_obj = NULL; /* Initialize to appease gcc warning. */ try @@ -449,7 +449,7 @@ frapy_newer (PyObject *self, PyObject *args) static PyObject * frapy_find_sal (PyObject *self, PyObject *args) { - struct frame_info *frame; + frame_info_ptr frame; PyObject *sal_obj = NULL; /* Initialize to appease gcc warning. */ try @@ -477,7 +477,7 @@ frapy_find_sal (PyObject *self, PyObject *args) static PyObject * frapy_read_var (PyObject *self, PyObject *args) { - struct frame_info *frame; + frame_info_ptr frame; PyObject *sym_obj, *block_obj = NULL; struct symbol *var = NULL; /* gcc-4.3.2 false warning. */ const struct block *block = NULL; @@ -558,7 +558,7 @@ frapy_read_var (PyObject *self, PyObject *args) static PyObject * frapy_select (PyObject *self, PyObject *args) { - struct frame_info *fi; + frame_info_ptr fi; try { @@ -579,7 +579,7 @@ frapy_select (PyObject *self, PyObject *args) static PyObject * frapy_level (PyObject *self, PyObject *args) { - struct frame_info *fi; + frame_info_ptr fi; try { @@ -602,7 +602,7 @@ frapy_language (PyObject *self, PyObject *args) { try { - struct frame_info *fi; + frame_info_ptr fi; FRAPY_REQUIRE_VALID (self, fi); enum language lang = get_frame_language (fi); @@ -624,7 +624,7 @@ frapy_language (PyObject *self, PyObject *args) PyObject * gdbpy_newest_frame (PyObject *self, PyObject *args) { - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; try { @@ -644,7 +644,7 @@ gdbpy_newest_frame (PyObject *self, PyObject *args) PyObject * gdbpy_selected_frame (PyObject *self, PyObject *args) { - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; try { diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index 366f3745b9d..0d7dc48c5a0 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -419,7 +419,7 @@ enumerate_args (PyObject *iter, struct ui_out *out, enum ext_lang_frame_args args_type, int print_args_field, - struct frame_info *frame) + frame_info_ptr frame) { struct value_print_options opts; @@ -550,7 +550,7 @@ enumerate_locals (PyObject *iter, int indent, enum ext_lang_frame_args args_type, int print_args_field, - struct frame_info *frame) + frame_info_ptr frame) { struct value_print_options opts; @@ -638,7 +638,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, - struct frame_info *frame) + frame_info_ptr frame) { gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args")); if (args_iter == NULL) @@ -672,7 +672,7 @@ py_print_locals (PyObject *filter, struct ui_out *out, enum ext_lang_frame_args args_type, int indent, - struct frame_info *frame) + frame_info_ptr frame) { gdbpy_ref<> locals_iter (get_py_iter_from_func (filter, "frame_locals")); if (locals_iter == NULL) @@ -697,7 +697,7 @@ static enum ext_lang_bt_status py_print_args (PyObject *filter, struct ui_out *out, enum ext_lang_frame_args args_type, - struct frame_info *frame) + frame_info_ptr frame) { gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args")); if (args_iter == NULL) @@ -754,7 +754,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags, int has_addr = 0; CORE_ADDR address = 0; struct gdbarch *gdbarch = NULL; - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; struct value_print_options opts; int print_level, print_frame_info, print_args, print_locals; @@ -862,8 +862,8 @@ py_print_frame (PyObject *filter, frame_filter_flags flags, struct frame_info **slot; int level; - slot = (struct frame_info **) htab_find_slot (levels_printed, - frame, INSERT); + slot = (frame_info **) htab_find_slot (levels_printed, + frame.get(), INSERT); level = frame_relative_level (frame); @@ -875,7 +875,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags, out->field_skip ("level"); else { - *slot = frame; + *slot = frame.get (); annotate_frame_begin (print_level ? level : 0, gdbarch, address); out->text ("#"); @@ -1078,7 +1078,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags, frame FRAME. */ static PyObject * -bootstrap_python_frame_filters (struct frame_info *frame, +bootstrap_python_frame_filters (frame_info_ptr frame, int frame_low, int frame_high) { gdbpy_ref<> frame_obj (frame_info_to_frame_object (frame)); @@ -1133,7 +1133,7 @@ bootstrap_python_frame_filters (struct frame_info *frame, enum ext_lang_bt_status gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, - struct frame_info *frame, frame_filter_flags flags, + 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) { diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index 0066ae6d6a9..8847a6d9308 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -174,7 +174,7 @@ python_on_memory_change (struct inferior *inferior, CORE_ADDR addr, ssize_t len, command). */ static void -python_on_register_change (struct frame_info *frame, int regnum) +python_on_register_change (frame_info_ptr frame, int regnum) { gdbpy_enter enter_py (target_gdbarch ()); diff --git a/gdb/python/py-infevents.c b/gdb/python/py-infevents.c index 0a0ca998134..9920bed98c5 100644 --- a/gdb/python/py-infevents.c +++ b/gdb/python/py-infevents.c @@ -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 (struct frame_info *frame, +create_register_changed_event_object (frame_info_ptr frame, int regnum) { gdbpy_ref<> event = create_event_object (®ister_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 (struct frame_info* frame, int regnum) +emit_register_changed_event (frame_info_ptr frame, int regnum) { if (evregpy_no_listeners_p (gdb_py_events.register_changed)) return 0; diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c index e5fe5cf8c92..93c86964f3e 100644 --- a/gdb/python/py-symbol.c +++ b/gdb/python/py-symbol.c @@ -265,7 +265,7 @@ static PyObject * sympy_value (PyObject *self, PyObject *args) { struct symbol *symbol = NULL; - struct frame_info *frame_info = NULL; + frame_info_ptr frame_info = NULL; PyObject *frame_obj = NULL; struct value *value = NULL; @@ -401,7 +401,7 @@ gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw) block = block_object_to_block (block_obj); else { - struct frame_info *selected_frame; + frame_info_ptr selected_frame; try { @@ -511,7 +511,7 @@ gdbpy_lookup_static_symbol (PyObject *self, PyObject *args, PyObject *kw) const struct block *block = NULL; try { - struct frame_info *selected_frame + frame_info_ptr selected_frame = get_selected_frame (_("No frame selected.")); block = get_frame_block (selected_frame, NULL); } diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index 0a1b460e785..20b0ab460cc 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -57,7 +57,7 @@ struct pending_frame_object PyObject_HEAD /* Frame we are unwinding. */ - struct frame_info *frame_info; + frame_info_ptr frame_info; /* Its architecture, passed by the sniffer caller. */ struct gdbarch *gdbarch; @@ -339,7 +339,7 @@ unwind_infopy_dealloc (PyObject *self) static PyObject * pending_framepy_str (PyObject *self) { - struct frame_info *frame = ((pending_frame_object *) self)->frame_info; + frame_info_ptr frame = ((pending_frame_object *) self)->frame_info; const char *sp_str = NULL; const char *pc_str = NULL; @@ -475,7 +475,7 @@ pending_framepy_level (PyObject *self, PyObject *args) /* frame_unwind.this_id method. */ static void -pyuw_this_id (struct frame_info *this_frame, void **cache_ptr, +pyuw_this_id (frame_info_ptr this_frame, void **cache_ptr, struct frame_id *this_id) { *this_id = ((cached_frame_info *) *cache_ptr)->frame_id; @@ -485,7 +485,7 @@ pyuw_this_id (struct frame_info *this_frame, void **cache_ptr, /* frame_unwind.prev_register. */ static struct value * -pyuw_prev_register (struct frame_info *this_frame, void **cache_ptr, +pyuw_prev_register (frame_info_ptr this_frame, void **cache_ptr, int regnum) { PYUW_SCOPED_DEBUG_ENTER_EXIT; @@ -508,7 +508,7 @@ pyuw_prev_register (struct frame_info *this_frame, void **cache_ptr, /* Frame sniffer dispatch. */ static int -pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, +pyuw_sniffer (const struct frame_unwind *self, frame_info_ptr this_frame, void **cache_ptr) { PYUW_SCOPED_DEBUG_ENTER_EXIT; @@ -635,7 +635,7 @@ pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, /* Frame cache release shim. */ static void -pyuw_dealloc_cache (struct frame_info *this_frame, void *cache) +pyuw_dealloc_cache (frame_info *this_frame, void *cache) { PYUW_SCOPED_DEBUG_ENTER_EXIT; cached_frame_info *cached_frame = (cached_frame_info *) cache; diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index d624b23fdc5..c2ac96de326 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -366,7 +366,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 *, - struct frame_info *frame, frame_filter_flags flags, + 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 *, @@ -427,7 +427,7 @@ PyObject *block_to_block_object (const struct block *block, PyObject *value_to_value_object (struct value *v); PyObject *value_to_value_object_no_release (struct value *v); PyObject *type_to_type_object (struct type *); -PyObject *frame_info_to_frame_object (struct frame_info *frame); +PyObject *frame_info_to_frame_object (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 *); @@ -467,7 +467,7 @@ struct value *convert_value_from_python (PyObject *obj); struct type *type_object_to_type (PyObject *obj); struct symtab *symtab_object_to_symtab (PyObject *obj); struct symtab_and_line *sal_object_to_symtab_and_line (PyObject *obj); -struct frame_info *frame_object_to_frame_info (PyObject *frame_obj); +frame_info_ptr frame_object_to_frame_info (PyObject *frame_obj); struct gdbarch *arch_object_to_gdbarch (PyObject *obj); /* Convert Python object OBJ to a program_space pointer. OBJ must be a diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index bc1411ecb3f..c0679a35f92 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -1605,7 +1605,7 @@ struct btrace_frame_cache struct thread_info *tp; /* The frame info. */ - struct frame_info *frame; + frame_info *frame; /* The branch trace function segment. */ const struct btrace_function *bfun; @@ -1642,13 +1642,13 @@ bfcache_eq (const void *arg1, const void *arg2) /* Create a new btrace frame cache. */ static struct btrace_frame_cache * -bfcache_new (struct frame_info *frame) +bfcache_new (frame_info_ptr frame) { struct btrace_frame_cache *cache; void **slot; cache = FRAME_OBSTACK_ZALLOC (struct btrace_frame_cache); - cache->frame = frame; + cache->frame = frame.get (); slot = htab_find_slot (bfcache, cache, INSERT); gdb_assert (*slot == NULL); @@ -1660,13 +1660,13 @@ bfcache_new (struct frame_info *frame) /* Extract the branch trace function from a branch trace frame. */ static const struct btrace_function * -btrace_get_frame_function (struct frame_info *frame) +btrace_get_frame_function (frame_info_ptr frame) { const struct btrace_frame_cache *cache; struct btrace_frame_cache pattern; void **slot; - pattern.frame = frame; + pattern.frame = frame.get (); slot = htab_find_slot (bfcache, &pattern, NO_INSERT); if (slot == NULL) @@ -1679,7 +1679,7 @@ btrace_get_frame_function (struct frame_info *frame) /* Implement stop_reason method for record_btrace_frame_unwind. */ static enum unwind_stop_reason -record_btrace_frame_unwind_stop_reason (struct frame_info *this_frame, +record_btrace_frame_unwind_stop_reason (frame_info_ptr this_frame, void **this_cache) { const struct btrace_frame_cache *cache; @@ -1698,7 +1698,7 @@ record_btrace_frame_unwind_stop_reason (struct frame_info *this_frame, /* Implement this_id method for record_btrace_frame_unwind. */ static void -record_btrace_frame_this_id (struct frame_info *this_frame, void **this_cache, +record_btrace_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { const struct btrace_frame_cache *cache; @@ -1728,7 +1728,7 @@ record_btrace_frame_this_id (struct frame_info *this_frame, void **this_cache, /* Implement prev_register method for record_btrace_frame_unwind. */ static struct value * -record_btrace_frame_prev_register (struct frame_info *this_frame, +record_btrace_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { @@ -1774,13 +1774,13 @@ record_btrace_frame_prev_register (struct frame_info *this_frame, static int record_btrace_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { const struct btrace_function *bfun; struct btrace_frame_cache *cache; struct thread_info *tp; - struct frame_info *next; + frame_info_ptr next; /* THIS_FRAME does not contain a reference to its thread. */ tp = inferior_thread (); @@ -1829,13 +1829,13 @@ record_btrace_frame_sniffer (const struct frame_unwind *self, static int record_btrace_tailcall_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { const struct btrace_function *bfun, *callee; struct btrace_frame_cache *cache; struct btrace_call_iterator it; - struct frame_info *next; + frame_info_ptr next; struct thread_info *tinfo; next = get_next_frame (this_frame); @@ -1868,7 +1868,7 @@ record_btrace_tailcall_frame_sniffer (const struct frame_unwind *self, } static void -record_btrace_frame_dealloc_cache (struct frame_info *self, void *this_cache) +record_btrace_frame_dealloc_cache (frame_info *self, void *this_cache) { struct btrace_frame_cache *cache; void **slot; diff --git a/gdb/riscv-fbsd-tdep.c b/gdb/riscv-fbsd-tdep.c index 7efd833a94b..5b66a9c582e 100644 --- a/gdb/riscv-fbsd-tdep.c +++ b/gdb/riscv-fbsd-tdep.c @@ -108,7 +108,7 @@ riscv_fbsd_iterate_over_regset_sections (struct gdbarch *gdbarch, static void riscv_fbsd_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/riscv-linux-tdep.c b/gdb/riscv-linux-tdep.c index 5bda2e5c824..e736e3b9b26 100644 --- a/gdb/riscv-linux-tdep.c +++ b/gdb/riscv-linux-tdep.c @@ -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, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + 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 (struct frame_info *frame) +riscv_linux_syscall_next_pc (frame_info_ptr frame) { const CORE_ADDR pc = get_frame_pc (frame); const ULONGEST a7 = get_frame_register_unsigned (frame, RISCV_A7_REGNUM); diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index feca17d9141..d819f6d6d6a 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -134,7 +134,7 @@ static const reggroup *csr_reggroup = nullptr; /* Callback function for user_reg_add. */ static struct value * -value_of_riscv_user_reg (struct frame_info *frame, const void *baton) +value_of_riscv_user_reg (frame_info_ptr frame, const void *baton) { const int *reg_p = (const int *) baton; return value_of_register (*reg_p, frame); @@ -1102,7 +1102,7 @@ riscv_register_type (struct gdbarch *gdbarch, int regnum) static void riscv_print_one_register_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, + frame_info_ptr frame, int regnum) { const char *name = gdbarch_register_name (gdbarch, regnum); @@ -1471,7 +1471,7 @@ riscv_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum, static void riscv_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, - struct frame_info *frame, + frame_info_ptr frame, int regnum, int print_all) { if (regnum != -1) @@ -3434,7 +3434,7 @@ riscv_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr) unwinder. */ static struct riscv_unwind_cache * -riscv_frame_cache (struct frame_info *this_frame, void **this_cache) +riscv_frame_cache (frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc, start_addr; struct riscv_unwind_cache *cache; @@ -3495,7 +3495,7 @@ riscv_frame_cache (struct frame_info *this_frame, void **this_cache) /* Implement the this_id callback for RiscV frame unwinder. */ static void -riscv_frame_this_id (struct frame_info *this_frame, +riscv_frame_this_id (frame_info_ptr this_frame, void **prologue_cache, struct frame_id *this_id) { @@ -3516,7 +3516,7 @@ riscv_frame_this_id (struct frame_info *this_frame, /* Implement the prev_register callback for RiscV frame unwinder. */ static struct value * -riscv_frame_prev_register (struct frame_info *this_frame, +riscv_frame_prev_register (frame_info_ptr this_frame, void **prologue_cache, int regnum) { diff --git a/gdb/riscv-tdep.h b/gdb/riscv-tdep.h index 3ae126f4d8a..dc1ded13524 100644 --- a/gdb/riscv-tdep.h +++ b/gdb/riscv-tdep.h @@ -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) (struct frame_info *frame) = nullptr; + CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr; }; diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c index 1ce04359e57..af0174759f7 100644 --- a/gdb/rl78-tdep.c +++ b/gdb/rl78-tdep.c @@ -1078,7 +1078,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, struct frame_info *next_frame) +rl78_unwind_pc (struct gdbarch *arch, frame_info_ptr next_frame) { return rl78_addr_bits_remove (arch, frame_unwind_register_unsigned (next_frame, @@ -1091,7 +1091,7 @@ rl78_unwind_pc (struct gdbarch *arch, struct frame_info *next_frame) return that struct as the value of this function. */ static struct rl78_prologue * -rl78_analyze_frame_prologue (struct frame_info *this_frame, +rl78_analyze_frame_prologue (frame_info_ptr this_frame, void **this_prologue_cache) { if (!*this_prologue_cache) @@ -1118,7 +1118,7 @@ rl78_analyze_frame_prologue (struct frame_info *this_frame, /* Given a frame and a prologue cache, return this frame's base. */ static CORE_ADDR -rl78_frame_base (struct frame_info *this_frame, void **this_prologue_cache) +rl78_frame_base (frame_info_ptr this_frame, void **this_prologue_cache) { struct rl78_prologue *p = rl78_analyze_frame_prologue (this_frame, this_prologue_cache); @@ -1130,7 +1130,7 @@ rl78_frame_base (struct frame_info *this_frame, void **this_prologue_cache) /* Implement the "frame_this_id" method for unwinding frames. */ static void -rl78_this_id (struct frame_info *this_frame, +rl78_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { *this_id = frame_id_build (rl78_frame_base (this_frame, @@ -1141,7 +1141,7 @@ rl78_this_id (struct frame_info *this_frame, /* Implement the "frame_prev_register" method for unwinding frames. */ static struct value * -rl78_prev_register (struct frame_info *this_frame, +rl78_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct rl78_prologue *p @@ -1315,7 +1315,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, struct frame_info *this_frame) +rl78_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { return frame_id_build (rl78_make_data_address diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c index 1a6bb50a5cd..d47974b51d1 100644 --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c @@ -69,7 +69,7 @@ #define AIX_TEXT_SEGMENT_BASE 0x10000000 static struct trad_frame_cache * -aix_sighandle_frame_cache (struct frame_info *this_frame, +aix_sighandle_frame_cache (frame_info_ptr this_frame, void **this_cache) { LONGEST backchain; @@ -125,7 +125,7 @@ aix_sighandle_frame_cache (struct frame_info *this_frame, } static void -aix_sighandle_frame_this_id (struct frame_info *this_frame, +aix_sighandle_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -135,7 +135,7 @@ aix_sighandle_frame_this_id (struct frame_info *this_frame, } static struct value * -aix_sighandle_frame_prev_register (struct frame_info *this_frame, +aix_sighandle_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct trad_frame_cache *this_trad_cache @@ -145,7 +145,7 @@ aix_sighandle_frame_prev_register (struct frame_info *this_frame, static int aix_sighandle_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR pc = get_frame_pc (this_frame); @@ -744,7 +744,7 @@ branch_dest (struct regcache *regcache, int opcode, int instr, execution will return to the saved PC in the frame. */ if (dest < AIX_TEXT_SEGMENT_BASE) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); dest = read_memory_unsigned_integer (get_frame_base (frame) + SIG_FRAME_PC_OFFSET, diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 2a396eff4c4..4f2233a9bae 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -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 (struct frame_info *curfrm, +rs6000_in_function_epilogue_frame_p (frame_info_ptr curfrm, struct gdbarch *gdbarch, CORE_ADDR pc) { ppc_gdbarch_tdep *tdep = 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 (struct frame_info *frame, int argi, +rs6000_fetch_pointer_argument (frame_info_ptr frame, int argi, struct type *type) { return get_frame_register_unsigned (frame, 3 + argi); @@ -2307,7 +2307,7 @@ rs6000_in_solib_return_trampoline (struct gdbarch *gdbarch, code that should be skipped. */ static CORE_ADDR -rs6000_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) +rs6000_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); ppc_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2670,7 +2670,7 @@ rs6000_convert_register_p (struct gdbarch *gdbarch, int regnum, } static int -rs6000_register_to_value (struct frame_info *frame, +rs6000_register_to_value (frame_info_ptr frame, int regnum, struct type *type, gdb_byte *to, @@ -2695,7 +2695,7 @@ rs6000_register_to_value (struct frame_info *frame, } static void -rs6000_value_to_register (struct frame_info *frame, +rs6000_value_to_register (frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from) @@ -3557,7 +3557,7 @@ struct rs6000_frame_cache }; static struct rs6000_frame_cache * -rs6000_frame_cache (struct frame_info *this_frame, void **this_cache) +rs6000_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct rs6000_frame_cache *cache; struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -3750,7 +3750,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -rs6000_frame_this_id (struct frame_info *this_frame, void **this_cache, +rs6000_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame, @@ -3770,7 +3770,7 @@ rs6000_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -rs6000_frame_prev_register (struct frame_info *this_frame, +rs6000_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame, @@ -3793,7 +3793,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 (struct frame_info *this_frame, void **this_cache) +rs6000_epilogue_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct rs6000_frame_cache *cache; struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -3833,7 +3833,7 @@ rs6000_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) Return the frame ID of an epilogue frame. */ static void -rs6000_epilogue_frame_this_id (struct frame_info *this_frame, +rs6000_epilogue_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { CORE_ADDR pc; @@ -3851,7 +3851,7 @@ rs6000_epilogue_frame_this_id (struct frame_info *this_frame, Return the register value of REGNUM in previous frame. */ static struct value * -rs6000_epilogue_frame_prev_register (struct frame_info *this_frame, +rs6000_epilogue_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct rs6000_frame_cache *info = @@ -3864,7 +3864,7 @@ rs6000_epilogue_frame_prev_register (struct frame_info *this_frame, static int rs6000_epilogue_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { if (frame_relative_level (this_frame) == 0) @@ -3890,7 +3890,7 @@ static const struct frame_unwind rs6000_epilogue_frame_unwind = static CORE_ADDR -rs6000_frame_base_address (struct frame_info *this_frame, void **this_cache) +rs6000_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame, this_cache); @@ -3905,7 +3905,7 @@ static const struct frame_base rs6000_frame_base = { }; static const struct frame_base * -rs6000_frame_base_sniffer (struct frame_info *this_frame) +rs6000_frame_base_sniffer (frame_info_ptr this_frame) { return &rs6000_frame_base; } @@ -3916,7 +3916,7 @@ rs6000_frame_base_sniffer (struct frame_info *this_frame) static void ppc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, - struct frame_info *this_frame) + frame_info_ptr this_frame) { ppc_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -8510,7 +8510,7 @@ show_powerpc_exact_watchpoints (struct ui_file *file, int from_tty, /* Read a PPC instruction from memory. */ static unsigned int -read_insn (struct frame_info *frame, CORE_ADDR pc) +read_insn (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -8532,7 +8532,7 @@ read_insn (struct frame_info *frame, CORE_ADDR pc) necessarily the i'th instruction in memory. */ int -ppc_insns_match_pattern (struct frame_info *frame, CORE_ADDR pc, +ppc_insns_match_pattern (frame_info_ptr frame, CORE_ADDR pc, const struct ppc_insn_pattern *pattern, unsigned int *insns) { diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c index faca81a8e2b..d1c294b9ef0 100644 --- a/gdb/rx-tdep.c +++ b/gdb/rx-tdep.c @@ -382,7 +382,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 (struct frame_info *this_frame, +rx_analyze_frame_prologue (frame_info_ptr this_frame, enum rx_frame_type frame_type, void **this_prologue_cache) { @@ -411,7 +411,7 @@ rx_analyze_frame_prologue (struct frame_info *this_frame, instruction. */ static enum rx_frame_type -rx_frame_type (struct frame_info *this_frame, void **this_cache) +rx_frame_type (frame_info_ptr this_frame, void **this_cache) { const char *name; CORE_ADDR pc, start_pc, lim_pc; @@ -465,7 +465,7 @@ rx_frame_type (struct frame_info *this_frame, void **this_cache) base. */ static CORE_ADDR -rx_frame_base (struct frame_info *this_frame, void **this_cache) +rx_frame_base (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 @@ -492,7 +492,7 @@ rx_frame_base (struct frame_info *this_frame, void **this_cache) /* Implement the "frame_this_id" method for unwinding frames. */ static void -rx_frame_this_id (struct frame_info *this_frame, void **this_cache, +rx_frame_this_id (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), @@ -502,7 +502,7 @@ rx_frame_this_id (struct frame_info *this_frame, void **this_cache, /* Implement the "frame_prev_register" method for unwinding frames. */ static struct value * -rx_frame_prev_register (struct frame_info *this_frame, void **this_cache, +rx_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { enum rx_frame_type frame_type = rx_frame_type (this_frame, this_cache); @@ -576,7 +576,7 @@ exception_frame_p (enum rx_frame_type frame_type) static int rx_frame_sniffer_common (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache, int (*sniff_p)(enum rx_frame_type) ) { @@ -609,7 +609,7 @@ rx_frame_sniffer_common (const struct frame_unwind *self, static int rx_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { return rx_frame_sniffer_common (self, this_frame, this_cache, @@ -620,7 +620,7 @@ rx_frame_sniffer (const struct frame_unwind *self, static int rx_exception_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { return rx_frame_sniffer_common (self, this_frame, this_cache, diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c index c447547c00e..ccc47c99804 100644 --- a/gdb/s12z-tdep.c +++ b/gdb/s12z-tdep.c @@ -241,7 +241,7 @@ push_pull_get_stack_adjustment (int n_operands, /* Initialize a prologue cache. */ static struct trad_frame_cache * -s12z_frame_cache (struct frame_info *this_frame, void **prologue_cache) +s12z_frame_cache (frame_info_ptr this_frame, void **prologue_cache) { struct trad_frame_cache *info; @@ -420,7 +420,7 @@ s12z_frame_cache (struct frame_info *this_frame, void **prologue_cache) /* Implement the this_id function for the stub unwinder. */ static void -s12z_frame_this_id (struct frame_info *this_frame, +s12z_frame_this_id (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 (struct frame_info *this_frame, /* Implement the prev_register function for the stub unwinder. */ static struct value * -s12z_frame_prev_register (struct frame_info *this_frame, +s12z_frame_prev_register (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, - struct frame_info *frame, + frame_info_ptr frame, int reg) { struct value *v = value_of_register (reg, 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, - struct frame_info *frame, + frame_info_ptr frame, int regnum, int print_all) { const int numregs = (gdbarch_num_regs (gdbarch) diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 05bf03973fc..1ead5403ff1 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -386,7 +386,7 @@ struct s390_sigtramp_unwind_cache { s390_sigtramp_frame_unwind. */ static struct s390_sigtramp_unwind_cache * -s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame, +s390_sigtramp_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -496,7 +496,7 @@ s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame, /* Implement this_id frame_unwind method for s390_sigtramp_frame_unwind. */ static void -s390_sigtramp_frame_this_id (struct frame_info *this_frame, +s390_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -508,7 +508,7 @@ s390_sigtramp_frame_this_id (struct frame_info *this_frame, /* Implement prev_register frame_unwind method for sigtramp frames. */ static struct value * -s390_sigtramp_frame_prev_register (struct frame_info *this_frame, +s390_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct s390_sigtramp_unwind_cache *info @@ -520,7 +520,7 @@ s390_sigtramp_frame_prev_register (struct frame_info *this_frame, static int s390_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR pc = get_frame_pc (this_frame); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 9f76b948946..3682ee7d2d3 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1982,7 +1982,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function, breakpoint. */ static struct frame_id -s390_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +s390_dummy_id (struct gdbarch *gdbarch, 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); @@ -2166,7 +2166,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, struct frame_info *next_frame) +s390_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { s390_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); ULONGEST pc; @@ -2177,7 +2177,7 @@ s390_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) /* Implement unwind_sp gdbarch method. */ static CORE_ADDR -s390_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) +s390_unwind_sp (struct gdbarch *gdbarch, frame_info_ptr next_frame) { ULONGEST sp; sp = frame_unwind_register_unsigned (next_frame, S390_SP_REGNUM); @@ -2187,7 +2187,7 @@ s390_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) /* Helper routine to unwind pseudo registers. */ static struct value * -s390_unwind_pseudo_register (struct frame_info *this_frame, int regnum) +s390_unwind_pseudo_register (frame_info_ptr this_frame, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); s390_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -2258,7 +2258,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 (struct frame_info *this_frame, void **this_cache, +s390_dwarf2_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { return s390_unwind_pseudo_register (this_frame, regnum); @@ -2269,7 +2269,7 @@ s390_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache, static void s390_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, - struct frame_info *this_frame) + frame_info_ptr this_frame) { /* The condition code (and thus PSW mask) is call-clobbered. */ if (regnum == S390_PSWM_REGNUM) @@ -2303,7 +2303,7 @@ s390_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, register translation. */ struct value * -s390_trad_frame_prev_register (struct frame_info *this_frame, +s390_trad_frame_prev_register (frame_info_ptr this_frame, trad_frame_saved_reg saved_regs[], int regnum) { @@ -2328,7 +2328,7 @@ struct s390_unwind_cache { prologue analysis. Helper for s390_frame_unwind_cache. */ static int -s390_prologue_frame_unwind_cache (struct frame_info *this_frame, +s390_prologue_frame_unwind_cache (frame_info_ptr this_frame, struct s390_unwind_cache *info) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2344,7 +2344,7 @@ s390_prologue_frame_unwind_cache (struct frame_info *this_frame, CORE_ADDR prev_sp; int frame_pointer; int size; - struct frame_info *next_frame; + frame_info_ptr next_frame; /* Try to find the function start address. If we can't find it, we don't bother searching for it -- with modern compilers this would be mostly @@ -2515,7 +2515,7 @@ s390_prologue_frame_unwind_cache (struct frame_info *this_frame, back chain unwinding. Helper for s390_frame_unwind_cache. */ static void -s390_backchain_frame_unwind_cache (struct frame_info *this_frame, +s390_backchain_frame_unwind_cache (frame_info_ptr this_frame, struct s390_unwind_cache *info) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2572,7 +2572,7 @@ s390_backchain_frame_unwind_cache (struct frame_info *this_frame, s390_frame_unwind and s390_frame_base. */ static struct s390_unwind_cache * -s390_frame_unwind_cache (struct frame_info *this_frame, +s390_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { struct s390_unwind_cache *info; @@ -2606,7 +2606,7 @@ s390_frame_unwind_cache (struct frame_info *this_frame, /* Implement this_id frame_unwind method for s390_frame_unwind. */ static void -s390_frame_this_id (struct frame_info *this_frame, +s390_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -2626,7 +2626,7 @@ s390_frame_this_id (struct frame_info *this_frame, /* Implement prev_register frame_unwind method for s390_frame_unwind. */ static struct value * -s390_frame_prev_register (struct frame_info *this_frame, +s390_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct s390_unwind_cache *info @@ -2661,7 +2661,7 @@ struct s390_stub_unwind_cache s390_stub_frame_unwind. */ static struct s390_stub_unwind_cache * -s390_stub_frame_unwind_cache (struct frame_info *this_frame, +s390_stub_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2689,7 +2689,7 @@ s390_stub_frame_unwind_cache (struct frame_info *this_frame, /* Implement this_id frame_unwind method for s390_stub_frame_unwind. */ static void -s390_stub_frame_this_id (struct frame_info *this_frame, +s390_stub_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -2701,7 +2701,7 @@ s390_stub_frame_this_id (struct frame_info *this_frame, /* Implement prev_register frame_unwind method for s390_stub_frame_unwind. */ static struct value * -s390_stub_frame_prev_register (struct frame_info *this_frame, +s390_stub_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct s390_stub_unwind_cache *info @@ -2713,7 +2713,7 @@ s390_stub_frame_prev_register (struct frame_info *this_frame, static int s390_stub_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR addr_in_block; @@ -2744,7 +2744,7 @@ static const struct frame_unwind s390_stub_frame_unwind = { /* Frame base handling. */ static CORE_ADDR -s390_frame_base_address (struct frame_info *this_frame, void **this_cache) +s390_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct s390_unwind_cache *info = s390_frame_unwind_cache (this_frame, this_cache); @@ -2752,7 +2752,7 @@ s390_frame_base_address (struct frame_info *this_frame, void **this_cache) } static CORE_ADDR -s390_local_base_address (struct frame_info *this_frame, void **this_cache) +s390_local_base_address (frame_info_ptr this_frame, void **this_cache) { struct s390_unwind_cache *info = s390_frame_unwind_cache (this_frame, this_cache); diff --git a/gdb/s390-tdep.h b/gdb/s390-tdep.h index bfee9a80dd5..f0f7019ac6a 100644 --- a/gdb/s390-tdep.h +++ b/gdb/s390-tdep.h @@ -314,7 +314,7 @@ enum /* Frame unwinding. */ extern struct value *s390_trad_frame_prev_register - (struct frame_info *this_frame, struct trad_frame_saved_reg saved_regs[], + (frame_info_ptr this_frame, struct trad_frame_saved_reg saved_regs[], int regnum); extern const struct target_desc *tdesc_s390_linux32; diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c index 2e02ad3ca56..a948ddd10b0 100644 --- a/gdb/sentinel-frame.c +++ b/gdb/sentinel-frame.c @@ -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 (struct frame_info *this_frame, +sentinel_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { @@ -57,7 +57,7 @@ sentinel_frame_prev_register (struct frame_info *this_frame, } static void -sentinel_frame_this_id (struct frame_info *this_frame, +sentinel_frame_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id) { @@ -68,7 +68,7 @@ sentinel_frame_this_id (struct frame_info *this_frame, } static struct gdbarch * -sentinel_frame_prev_arch (struct frame_info *this_frame, +sentinel_frame_prev_arch (frame_info_ptr this_frame, void **this_prologue_cache) { struct frame_unwind_cache *cache diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c index f146f023add..9802fd44a20 100644 --- a/gdb/sh-linux-tdep.c +++ b/gdb/sh-linux-tdep.c @@ -77,7 +77,7 @@ static const struct sh_corefile_regmap fpregs_table[] = /* SH signal handler frame support. */ static void -sh_linux_sigtramp_cache (struct frame_info *this_frame, +sh_linux_sigtramp_cache (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 (struct frame_info *this_frame, static void sh_linux_sigreturn_init (const struct tramp_frame *self, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index b08e37117ae..a2e91483229 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1752,7 +1752,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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { /* Mark the PC as the destination for the return address. */ if (regnum == gdbarch_pc_regnum (gdbarch)) @@ -1822,7 +1822,7 @@ sh_alloc_frame_cache (void) } static struct sh_frame_cache * -sh_frame_cache (struct frame_info *this_frame, void **this_cache) +sh_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct sh_frame_cache *cache; @@ -1889,7 +1889,7 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache) } static struct value * -sh_frame_prev_register (struct frame_info *this_frame, +sh_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1914,7 +1914,7 @@ sh_frame_prev_register (struct frame_info *this_frame, } static void -sh_frame_this_id (struct frame_info *this_frame, void **this_cache, +sh_frame_this_id (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); @@ -1937,7 +1937,7 @@ static const struct frame_unwind sh_frame_unwind = { }; static CORE_ADDR -sh_frame_base_address (struct frame_info *this_frame, void **this_cache) +sh_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache); @@ -1952,7 +1952,7 @@ static const struct frame_base sh_frame_base = { }; static struct sh_frame_cache * -sh_make_stub_cache (struct frame_info *this_frame) +sh_make_stub_cache (frame_info_ptr this_frame) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct sh_frame_cache *cache; @@ -1966,7 +1966,7 @@ sh_make_stub_cache (struct frame_info *this_frame) } static void -sh_stub_this_id (struct frame_info *this_frame, void **this_cache, +sh_stub_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct sh_frame_cache *cache; @@ -1980,7 +1980,7 @@ sh_stub_this_id (struct frame_info *this_frame, void **this_cache, static int sh_stub_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR addr_in_block; diff --git a/gdb/skip.c b/gdb/skip.c index 3a3734a296d..c040f87c928 100644 --- a/gdb/skip.c +++ b/gdb/skip.c @@ -204,7 +204,7 @@ skip_function_command (const char *arg, int from_tty) /* Default to the current function if no argument is given. */ if (arg == NULL) { - frame_info *fi = get_selected_frame (_("No default function now.")); + frame_info_ptr fi = get_selected_frame (_("No default function now.")); struct symbol *sym = get_frame_function (fi); const char *name = NULL; diff --git a/gdb/sol2-tdep.c b/gdb/sol2-tdep.c index a7bf8836269..2cc2407656d 100644 --- a/gdb/sol2-tdep.c +++ b/gdb/sol2-tdep.c @@ -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 (struct frame_info *this_frame) +sol2_sigtramp_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_pc (this_frame); const char *name; diff --git a/gdb/sol2-tdep.h b/gdb/sol2-tdep.h index 14ee5e64c69..cd3bdc1f343 100644 --- a/gdb/sol2-tdep.h +++ b/gdb/sol2-tdep.h @@ -22,7 +22,7 @@ struct gdbarch; -int sol2_sigtramp_p (struct frame_info *this_frame); +int sol2_sigtramp_p (frame_info_ptr this_frame); void sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch); diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index a6a9ec5c86b..ce33f38ec60 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1645,7 +1645,7 @@ solib_event_probe_action (struct probe_and_action *pa) { enum probe_action action; unsigned probe_argc = 0; - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); action = pa->action; if (action == DO_NOTHING || action == PROBES_INTERFACE_FAILED) @@ -1780,7 +1780,7 @@ svr4_handle_solib_event (void) enum probe_action action; struct value *val = NULL; CORE_ADDR pc, debug_base, lm = 0; - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); /* Do nothing if not using the probes interface. */ if (info->probes_table == NULL) diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c index 66481ea7b8a..cd8c35ed5da 100644 --- a/gdb/sparc-linux-tdep.c +++ b/gdb/sparc-linux-tdep.c @@ -42,7 +42,7 @@ /* Signal trampoline support. */ static void sparc32_linux_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + 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 (struct frame_info *frame, unsigned long insn) +sparc32_linux_step_trap (frame_info_ptr frame, unsigned long insn) { if (insn == 0x91d02010) { diff --git a/gdb/sparc-netbsd-tdep.c b/gdb/sparc-netbsd-tdep.c index 57c178511fa..479ec13aeda 100644 --- a/gdb/sparc-netbsd-tdep.c +++ b/gdb/sparc-netbsd-tdep.c @@ -95,7 +95,7 @@ sparc32nbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name) } trad_frame_saved_reg * -sparc32nbsd_sigcontext_saved_regs (struct frame_info *this_frame) +sparc32nbsd_sigcontext_saved_regs (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 (struct frame_info *this_frame) } static struct sparc_frame_cache * -sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame, +sparc32nbsd_sigcontext_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; @@ -211,7 +211,7 @@ sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame, } static void -sparc32nbsd_sigcontext_frame_this_id (struct frame_info *this_frame, +sparc32nbsd_sigcontext_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -222,7 +222,7 @@ sparc32nbsd_sigcontext_frame_this_id (struct frame_info *this_frame, } static struct value * -sparc32nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame, +sparc32nbsd_sigcontext_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct sparc_frame_cache *cache = @@ -233,7 +233,7 @@ sparc32nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame, static int sparc32nbsd_sigcontext_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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 (struct frame_info *frame, unsigned long insn) +sparcnbsd_step_trap (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)) diff --git a/gdb/sparc-obsd-tdep.c b/gdb/sparc-obsd-tdep.c index e4253c11aff..57457dfa115 100644 --- a/gdb/sparc-obsd-tdep.c +++ b/gdb/sparc-obsd-tdep.c @@ -68,7 +68,7 @@ sparc32obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name) } static struct sparc_frame_cache * -sparc32obsd_sigtramp_frame_cache (struct frame_info *this_frame, +sparc32obsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; @@ -100,7 +100,7 @@ sparc32obsd_sigtramp_frame_cache (struct frame_info *this_frame, } static void -sparc32obsd_sigtramp_frame_this_id (struct frame_info *this_frame, +sparc32obsd_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -111,7 +111,7 @@ sparc32obsd_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -sparc32obsd_sigtramp_frame_prev_register (struct frame_info *this_frame, +sparc32obsd_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct sparc_frame_cache *cache = @@ -122,7 +122,7 @@ sparc32obsd_sigtramp_frame_prev_register (struct frame_info *this_frame, static int sparc32obsd_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_pc (this_frame); diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c index a92e95ce71b..8b862c4dea4 100644 --- a/gdb/sparc-sol2-tdep.c +++ b/gdb/sparc-sol2-tdep.c @@ -100,7 +100,7 @@ static const struct regset sparc32_sol2_fpregset = static struct sparc_frame_cache * -sparc32_sol2_sigtramp_frame_cache (struct frame_info *this_frame, +sparc32_sol2_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; @@ -151,7 +151,7 @@ sparc32_sol2_sigtramp_frame_cache (struct frame_info *this_frame, } static void -sparc32_sol2_sigtramp_frame_this_id (struct frame_info *this_frame, +sparc32_sol2_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -162,7 +162,7 @@ sparc32_sol2_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -sparc32_sol2_sigtramp_frame_prev_register (struct frame_info *this_frame, +sparc32_sol2_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { @@ -174,7 +174,7 @@ sparc32_sol2_sigtramp_frame_prev_register (struct frame_info *this_frame, static int sparc32_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { return sol2_sigtramp_p (this_frame); diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 320f898eb98..cdcf8ae2319 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1183,7 +1183,7 @@ sparc32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) /* Normal frames. */ struct sparc_frame_cache * -sparc_frame_cache (struct frame_info *this_frame, void **this_cache) +sparc_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; @@ -1240,7 +1240,7 @@ sparc32_struct_return_from_sym (struct symbol *sym) } struct sparc_frame_cache * -sparc32_frame_cache (struct frame_info *this_frame, void **this_cache) +sparc32_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; struct symbol *sym; @@ -1276,7 +1276,7 @@ sparc32_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -sparc32_frame_this_id (struct frame_info *this_frame, void **this_cache, +sparc32_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct sparc_frame_cache *cache = @@ -1290,7 +1290,7 @@ sparc32_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -sparc32_frame_prev_register (struct frame_info *this_frame, +sparc32_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1360,7 +1360,7 @@ static const struct frame_unwind sparc32_frame_unwind = static CORE_ADDR -sparc32_frame_base_address (struct frame_info *this_frame, void **this_cache) +sparc32_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache = sparc32_frame_cache (this_frame, this_cache); @@ -1377,7 +1377,7 @@ static const struct frame_base sparc32_frame_base = }; static struct frame_id -sparc_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +sparc_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR sp; @@ -1546,7 +1546,7 @@ sparc32_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) } static int -sparc32_dwarf2_struct_return_p (struct frame_info *this_frame) +sparc32_dwarf2_struct_return_p (frame_info_ptr this_frame) { CORE_ADDR pc = get_frame_address_in_block (this_frame); struct symbol *sym = find_pc_function (pc); @@ -1559,7 +1559,7 @@ sparc32_dwarf2_struct_return_p (struct frame_info *this_frame) static void sparc32_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, - struct frame_info *this_frame) + frame_info_ptr this_frame) { int off; @@ -1672,7 +1672,7 @@ sparc_analyze_control_transfer (struct regcache *regcache, } else if (X_OP (insn) == 2 && X_OP3 (insn) == 0x3a) { - struct frame_info *frame = get_current_frame (); + frame_info_ptr frame = get_current_frame (); /* Trap instruction (TRAP). */ gdbarch *arch = regcache->arch (); @@ -1718,7 +1718,7 @@ sparc_analyze_control_transfer (struct regcache *regcache, } static CORE_ADDR -sparc_step_trap (struct frame_info *frame, unsigned long insn) +sparc_step_trap (frame_info_ptr frame, unsigned long insn) { return 0; } diff --git a/gdb/sparc-tdep.h b/gdb/sparc-tdep.h index f2070f10e12..ffdf0a46e17 100644 --- a/gdb/sparc-tdep.h +++ b/gdb/sparc-tdep.h @@ -28,7 +28,7 @@ "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \ "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7" -struct frame_info; +class frame_info_ptr; struct gdbarch; struct regcache; struct regset; @@ -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) (struct frame_info *frame, unsigned long insn) + CORE_ADDR (*step_trap) (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 (struct frame_info *this_frame, void **this_cache); + sparc_frame_cache (frame_info_ptr this_frame, void **this_cache); extern struct sparc_frame_cache * - sparc32_frame_cache (struct frame_info *this_frame, void **this_cache); + sparc32_frame_cache (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 (struct frame_info *frame, +extern CORE_ADDR sparcnbsd_step_trap (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 (struct frame_info *next_frame); + sparc32nbsd_sigcontext_saved_regs (frame_info_ptr next_frame); #endif /* sparc-tdep.h */ diff --git a/gdb/sparc64-fbsd-tdep.c b/gdb/sparc64-fbsd-tdep.c index 76c682fd521..a13407a5e3b 100644 --- a/gdb/sparc64-fbsd-tdep.c +++ b/gdb/sparc64-fbsd-tdep.c @@ -89,7 +89,7 @@ sparc64fbsd_pc_in_sigtramp (CORE_ADDR pc, const char *name) } static struct sparc_frame_cache * -sparc64fbsd_sigtramp_frame_cache (struct frame_info *this_frame, +sparc64fbsd_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; @@ -162,7 +162,7 @@ sparc64fbsd_sigtramp_frame_cache (struct frame_info *this_frame, } static void -sparc64fbsd_sigtramp_frame_this_id (struct frame_info *this_frame, +sparc64fbsd_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -173,7 +173,7 @@ sparc64fbsd_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -sparc64fbsd_sigtramp_frame_prev_register (struct frame_info *this_frame, +sparc64fbsd_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct sparc_frame_cache *cache = @@ -184,7 +184,7 @@ sparc64fbsd_sigtramp_frame_prev_register (struct frame_info *this_frame, static int sparc64fbsd_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_pc (this_frame); diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c index f5940cfcdee..fc8bd065c4c 100644 --- a/gdb/sparc64-linux-tdep.c +++ b/gdb/sparc64-linux-tdep.c @@ -52,7 +52,7 @@ /* Signal trampoline support. */ static void sparc64_linux_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + 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 (struct frame_info *frame, unsigned long insn) +sparc64_linux_step_trap (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 (struct frame_info *frame, CORE_ADDR *pc) +sparc64_linux_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { struct gdbarch *gdbarch = get_frame_arch (frame); CORE_ADDR jb_addr; diff --git a/gdb/sparc64-netbsd-tdep.c b/gdb/sparc64-netbsd-tdep.c index db368118f23..fb15877ccf5 100644 --- a/gdb/sparc64-netbsd-tdep.c +++ b/gdb/sparc64-netbsd-tdep.c @@ -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, - struct frame_info *this_frame) + 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 (struct frame_info *this_frame, +sparc64nbsd_sigcontext_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; @@ -185,7 +185,7 @@ sparc64nbsd_sigcontext_frame_cache (struct frame_info *this_frame, } static void -sparc64nbsd_sigcontext_frame_this_id (struct frame_info *this_frame, +sparc64nbsd_sigcontext_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -196,7 +196,7 @@ sparc64nbsd_sigcontext_frame_this_id (struct frame_info *this_frame, } static struct value * -sparc64nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame, +sparc64nbsd_sigcontext_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct sparc_frame_cache *cache = @@ -207,7 +207,7 @@ sparc64nbsd_sigcontext_frame_prev_register (struct frame_info *this_frame, static int sparc64nbsd_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc = get_frame_pc (this_frame); diff --git a/gdb/sparc64-obsd-tdep.c b/gdb/sparc64-obsd-tdep.c index d6470a51b65..1b887df89b2 100644 --- a/gdb/sparc64-obsd-tdep.c +++ b/gdb/sparc64-obsd-tdep.c @@ -150,7 +150,7 @@ sparc64obsd_pc_in_sigtramp (CORE_ADDR pc, const char *name) } static struct sparc_frame_cache * -sparc64obsd_frame_cache (struct frame_info *this_frame, void **this_cache) +sparc64obsd_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; CORE_ADDR addr; @@ -186,7 +186,7 @@ sparc64obsd_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -sparc64obsd_frame_this_id (struct frame_info *this_frame, void **this_cache, +sparc64obsd_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } static struct value * -sparc64obsd_frame_prev_register (struct frame_info *this_frame, +sparc64obsd_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct sparc_frame_cache *cache = @@ -207,7 +207,7 @@ sparc64obsd_frame_prev_register (struct frame_info *this_frame, static int sparc64obsd_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + 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 (struct frame_info *this_frame, void **this_cache) +sparc64obsd_trapframe_cache (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 (struct frame_info *this_frame, void **this_cache) } static void -sparc64obsd_trapframe_this_id (struct frame_info *this_frame, +sparc64obsd_trapframe_this_id (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 (struct frame_info *this_frame, } static struct value * -sparc64obsd_trapframe_prev_register (struct frame_info *this_frame, +sparc64obsd_trapframe_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct sparc_frame_cache *cache = @@ -284,7 +284,7 @@ sparc64obsd_trapframe_prev_register (struct frame_info *this_frame, static int sparc64obsd_trapframe_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { CORE_ADDR pc; diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c index e656c359efa..3d52d8caa35 100644 --- a/gdb/sparc64-sol2-tdep.c +++ b/gdb/sparc64-sol2-tdep.c @@ -99,7 +99,7 @@ static const struct regset sparc64_sol2_fpregset = static struct sparc_frame_cache * -sparc64_sol2_sigtramp_frame_cache (struct frame_info *this_frame, +sparc64_sol2_sigtramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache; @@ -154,7 +154,7 @@ sparc64_sol2_sigtramp_frame_cache (struct frame_info *this_frame, } static void -sparc64_sol2_sigtramp_frame_this_id (struct frame_info *this_frame, +sparc64_sol2_sigtramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -165,7 +165,7 @@ sparc64_sol2_sigtramp_frame_this_id (struct frame_info *this_frame, } static struct value * -sparc64_sol2_sigtramp_frame_prev_register (struct frame_info *this_frame, +sparc64_sol2_sigtramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { @@ -177,7 +177,7 @@ sparc64_sol2_sigtramp_frame_prev_register (struct frame_info *this_frame, static int sparc64_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { return sol2_sigtramp_p (this_frame); diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index 6b9d9eaa957..bf4961a1b7c 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -1064,13 +1064,13 @@ sparc64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) /* Normal frames. */ static struct sparc_frame_cache * -sparc64_frame_cache (struct frame_info *this_frame, void **this_cache) +sparc64_frame_cache (frame_info_ptr this_frame, void **this_cache) { return sparc_frame_cache (this_frame, this_cache); } static void -sparc64_frame_this_id (struct frame_info *this_frame, void **this_cache, +sparc64_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct sparc_frame_cache *cache = @@ -1084,7 +1084,7 @@ sparc64_frame_this_id (struct frame_info *this_frame, void **this_cache, } static struct value * -sparc64_frame_prev_register (struct frame_info *this_frame, void **this_cache, +sparc64_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -1148,7 +1148,7 @@ static const struct frame_unwind sparc64_frame_unwind = static CORE_ADDR -sparc64_frame_base_address (struct frame_info *this_frame, void **this_cache) +sparc64_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct sparc_frame_cache *cache = sparc64_frame_cache (this_frame, this_cache); @@ -1767,7 +1767,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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { switch (regnum) { diff --git a/gdb/sparc64-tdep.h b/gdb/sparc64-tdep.h index 4e5e8f5c0f3..3fcfc394edc 100644 --- a/gdb/sparc64-tdep.h +++ b/gdb/sparc64-tdep.h @@ -20,7 +20,7 @@ #ifndef SPARC64_TDEP_H #define SPARC64_TDEP_H 1 -struct frame_info; +class frame_info_ptr; struct gdbarch; struct regcache; struct sparc_gregmap; @@ -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, - struct frame_info *next_frame); + frame_info_ptr next_frame); extern const struct sparc_fpregmap sparc64_bsd_fpregmap; diff --git a/gdb/stack.c b/gdb/stack.c index 012aa5d57d5..abdd6f3deb2 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -215,18 +215,18 @@ static const gdb::option::option_def backtrace_command_option_defs[] = { /* Prototypes for local functions. */ -static void print_frame_local_vars (struct frame_info *frame, +static void print_frame_local_vars (frame_info_ptr frame, bool quiet, const char *regexp, const char *t_regexp, int num_tabs, struct ui_file *stream); static void print_frame (const frame_print_options &opts, - frame_info *frame, int print_level, + frame_info_ptr frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal); -static struct frame_info *find_frame_for_function (const char *); -static struct frame_info *find_frame_for_address (CORE_ADDR); +static frame_info_ptr find_frame_for_function (const char *); +static frame_info_ptr find_frame_for_address (CORE_ADDR); /* Zero means do things normally; we are interacting directly with the user. One means print the full filename and linenumber when a @@ -314,7 +314,7 @@ static last_displayed_symtab_info_type last_displayed_symtab_info; /* See stack.h. */ bool -frame_show_address (struct frame_info *frame, +frame_show_address (frame_info_ptr frame, struct symtab_and_line sal) { /* If there is a line number, but no PC, then there is no location @@ -337,7 +337,7 @@ frame_show_address (struct frame_info *frame, /* See frame.h. */ void -print_stack_frame_to_uiout (struct ui_out *uiout, struct frame_info *frame, +print_stack_frame_to_uiout (struct ui_out *uiout, frame_info_ptr frame, int print_level, enum print_what print_what, int set_current_sal) { @@ -353,7 +353,7 @@ print_stack_frame_to_uiout (struct ui_out *uiout, struct frame_info *frame, source line, the actual PC is printed at the beginning. */ void -print_stack_frame (struct frame_info *frame, int print_level, +print_stack_frame (frame_info_ptr frame, int print_level, enum print_what print_what, int set_current_sal) { @@ -381,7 +381,7 @@ print_stack_frame (struct frame_info *frame, int print_level, argument (not just the first nameless argument). */ static void -print_frame_nameless_args (struct frame_info *frame, long start, int num, +print_frame_nameless_args (frame_info_ptr frame, long start, int num, int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -503,7 +503,7 @@ print_frame_arg (const frame_print_options &fp_opts, exception. */ void -read_frame_local (struct symbol *sym, struct frame_info *frame, +read_frame_local (struct symbol *sym, frame_info_ptr frame, struct frame_arg *argp) { argp->sym = sym; @@ -525,7 +525,7 @@ read_frame_local (struct symbol *sym, struct frame_info *frame, void read_frame_arg (const frame_print_options &fp_opts, - symbol *sym, frame_info *frame, + symbol *sym, frame_info_ptr frame, struct frame_arg *argp, struct frame_arg *entryargp) { struct value *val = NULL, *entryval = NULL; @@ -722,7 +722,7 @@ read_frame_arg (const frame_print_options &fp_opts, static void print_frame_args (const frame_print_options &fp_opts, - struct symbol *func, struct frame_info *frame, + struct symbol *func, frame_info_ptr frame, int num, struct ui_file *stream) { struct ui_out *uiout = current_uiout; @@ -929,7 +929,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 (struct frame_info *frame) +set_current_sal_from_frame (frame_info_ptr frame) { symtab_and_line sal = find_frame_sal (frame); if (sal.symtab != NULL) @@ -996,7 +996,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 *frame, +print_pc (struct ui_out *uiout, struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc) { uiout->field_core_addr ("addr", gdbarch, pc); @@ -1031,7 +1031,7 @@ get_user_print_what_frame_info (gdb::optional *what) void print_frame_info (const frame_print_options &fp_opts, - frame_info *frame, int print_level, + frame_info_ptr frame, int print_level, enum print_what print_what, int print_args, int set_current_sal) { @@ -1265,7 +1265,7 @@ get_last_displayed_sal () corresponding to FRAME. */ gdb::unique_xmalloc_ptr -find_frame_funname (struct frame_info *frame, enum language *funlang, +find_frame_funname (frame_info_ptr frame, enum language *funlang, struct symbol **funcp) { struct symbol *func; @@ -1319,7 +1319,7 @@ find_frame_funname (struct frame_info *frame, enum language *funlang, static void print_frame (const frame_print_options &fp_opts, - frame_info *frame, int print_level, + frame_info_ptr frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal) { @@ -1474,11 +1474,11 @@ 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 (struct frame_info *fi, bool selected_frame_p) +info_frame_command_core (frame_info_ptr fi, bool selected_frame_p) { struct symbol *func; struct symtab *s; - struct frame_info *calling_frame_info; + frame_info_ptr calling_frame_info; int numregs; const char *funname = 0; enum language funlang = language_unknown; @@ -1780,10 +1780,10 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) /* Return the innermost frame at level LEVEL. */ -static struct frame_info * +static frame_info_ptr leading_innermost_frame (int level) { - struct frame_info *leading; + frame_info_ptr leading; leading = get_current_frame (); @@ -1801,11 +1801,11 @@ leading_innermost_frame (int level) /* Return the starting frame needed to handle COUNT outermost frames. */ -static struct frame_info * +static frame_info_ptr trailing_outermost_frame (int count) { - struct frame_info *current; - struct frame_info *trailing; + frame_info_ptr current; + frame_info_ptr trailing; trailing = get_current_frame (); @@ -1834,9 +1834,9 @@ trailing_outermost_frame (int count) SELECT_FRAME. */ static void -select_frame_command_core (struct frame_info *fi, bool ignored) +select_frame_command_core (frame_info_ptr fi, bool ignored) { - frame_info *prev_frame = get_selected_frame (); + frame_info_ptr prev_frame = get_selected_frame (); select_frame (fi); if (get_selected_frame () != prev_frame) gdb::observers::user_selected_context_changed.notify (USER_SELECTED_FRAME); @@ -1847,9 +1847,9 @@ select_frame_command_core (struct frame_info *fi, bool ignored) reprint the current frame summary). */ static void -frame_command_core (struct frame_info *fi, bool ignored) +frame_command_core (frame_info_ptr fi, bool ignored) { - frame_info *prev_frame = get_selected_frame (); + frame_info_ptr prev_frame = get_selected_frame (); select_frame (fi); if (get_selected_frame () != prev_frame) gdb::observers::user_selected_context_changed.notify (USER_SELECTED_FRAME); @@ -1871,7 +1871,7 @@ frame_command_core (struct frame_info *fi, bool ignored) 'frame' will all cause SELECTED_FRAME_P to be true. In all other cases SELECTED_FRAME_P is false. */ -template +template class frame_command_helper { public: @@ -1882,7 +1882,7 @@ public: level (const char *arg, int from_tty) { int level = value_as_long (parse_and_eval (arg)); - struct frame_info *fid + frame_info_ptr fid = find_relative_frame (get_current_frame (), &level); if (level != 0) error (_("No frame at level %s."), arg); @@ -1897,7 +1897,7 @@ public: address (const char *arg, int from_tty) { CORE_ADDR addr = value_as_address (parse_and_eval (arg)); - struct frame_info *fid = find_frame_for_address (addr); + frame_info_ptr fid = find_frame_for_address (addr); if (fid == NULL) error (_("No frame at address %s."), arg); FPTR (fid, false); @@ -1910,7 +1910,7 @@ public: static void view (const char *args, int from_tty) { - struct frame_info *fid; + frame_info_ptr fid; if (args == NULL) error (_("Missing address argument to view a frame")); @@ -1942,7 +1942,7 @@ public: { if (arg == NULL) error (_("Missing function name argument")); - struct frame_info *fid = find_frame_for_function (arg); + frame_info_ptr fid = find_frame_for_function (arg); if (fid == NULL) error (_("No frame for function \"%s\"."), arg); FPTR (fid, false); @@ -1981,7 +1981,7 @@ backtrace_command_1 (const frame_print_options &fp_opts, const char *count_exp, int from_tty) { - struct frame_info *fi; + frame_info_ptr fi; int count; int py_start = 0, py_end = 0; enum ext_lang_bt_status result = EXT_LANG_BT_ERROR; @@ -2043,7 +2043,7 @@ backtrace_command_1 (const frame_print_options &fp_opts, "-no-filters" has been specified from the command. */ if (bt_opts.no_filters || result == EXT_LANG_BT_NO_FILTERS) { - struct frame_info *trailing; + frame_info_ptr trailing; /* The following code must do two things. First, it must set the variable TRAILING to the frame from which we should start @@ -2301,7 +2301,7 @@ void print_variable_and_value_data::operator() (const char *print_name, struct symbol *sym) { - struct frame_info *frame; + frame_info_ptr frame; if (preg.has_value () && preg->exec (sym->natural_name (), 0, NULL, 0) != 0) @@ -2355,7 +2355,7 @@ prepare_reg (const char *regexp, gdb::optional *reg) This function will invalidate FRAME. */ static void -print_frame_local_vars (struct frame_info *frame, +print_frame_local_vars (frame_info_ptr frame, bool quiet, const char *regexp, const char *t_regexp, int num_tabs, struct ui_file *stream) @@ -2521,7 +2521,7 @@ iterate_over_block_arg_vars (const struct block *b, This function will invalidate FRAME. */ static void -print_frame_arg_vars (struct frame_info *frame, +print_frame_arg_vars (frame_info_ptr frame, bool quiet, const char *regexp, const char *t_regexp, struct ui_file *stream) @@ -2613,14 +2613,14 @@ get_selected_block (CORE_ADDR *addr_in_block) but the final value of *LEVEL_OFFSET_PTR is nonzero and indicates how much farther the original request asked to go. */ -struct frame_info * -find_relative_frame (struct frame_info *frame, int *level_offset_ptr) +frame_info_ptr +find_relative_frame (frame_info_ptr frame, int *level_offset_ptr) { /* Going up is simple: just call get_prev_frame enough times or until the initial frame is reached. */ while (*level_offset_ptr > 0) { - struct frame_info *prev = get_prev_frame (frame); + frame_info_ptr prev = get_prev_frame (frame); if (!prev) break; @@ -2631,7 +2631,7 @@ find_relative_frame (struct frame_info *frame, int *level_offset_ptr) /* Going down is just as simple. */ while (*level_offset_ptr < 0) { - struct frame_info *next = get_next_frame (frame); + frame_info_ptr next = get_next_frame (frame); if (!next) break; @@ -2648,7 +2648,7 @@ find_relative_frame (struct frame_info *frame, int *level_offset_ptr) static void up_silently_base (const char *count_exp) { - struct frame_info *frame; + frame_info_ptr frame; int count = 1; if (count_exp) @@ -2679,7 +2679,7 @@ up_command (const char *count_exp, int from_tty) static void down_silently_base (const char *count_exp) { - struct frame_info *frame; + frame_info_ptr frame; int count = -1; if (count_exp) @@ -2717,7 +2717,7 @@ return_command (const char *retval_exp, int from_tty) { /* Initialize it just to avoid a GCC false warning. */ enum return_value_convention rv_conv = RETURN_VALUE_STRUCT_CONVENTION; - struct frame_info *thisframe; + frame_info_ptr thisframe; struct gdbarch *gdbarch; struct symbol *thisfun; struct value *return_value = NULL; @@ -2854,7 +2854,7 @@ return_command (const char *retval_exp, int from_tty) /* Find the most inner frame in the current stack for a function called FUNCTION_NAME. If no matching frame is found return NULL. */ -static struct frame_info * +static frame_info_ptr find_frame_for_function (const char *function_name) { /* Used to hold the lower and upper addresses for each of the @@ -2863,7 +2863,7 @@ find_frame_for_function (const char *function_name) { CORE_ADDR low, high; }; - struct frame_info *frame; + frame_info_ptr frame; bool found = false; int level = 1; @@ -2966,7 +2966,7 @@ make_frame_apply_options_def_group (qcs_flags *flags, static void frame_apply_command_count (const char *which_command, const char *cmd, int from_tty, - struct frame_info *trailing, int count) + frame_info_ptr trailing, int count) { qcs_flags flags; set_backtrace_options set_bt_opts = user_set_backtrace_options; @@ -2991,7 +2991,7 @@ frame_apply_command_count (const char *which_command, scoped_restore restore_set_backtrace_options = make_scoped_restore (&user_set_backtrace_options, set_bt_opts); - for (frame_info *fi = trailing; fi && count--; fi = get_prev_frame (fi)) + for (frame_info_ptr fi = trailing; fi && count--; fi = get_prev_frame (fi)) { QUIT; @@ -3198,7 +3198,7 @@ static void frame_apply_command (const char* cmd, int from_tty) { int count; - struct frame_info *trailing; + frame_info_ptr trailing; if (!target_has_stack ()) error (_("No stack.")); @@ -3236,11 +3236,11 @@ faas_command (const char *cmd, int from_tty) /* Find inner-mode frame with frame address ADDRESS. Return NULL if no matching frame can be found. */ -static struct frame_info * +static frame_info_ptr find_frame_for_address (CORE_ADDR address) { struct frame_id id; - struct frame_info *fid; + frame_info_ptr fid; id = frame_id_build_wild (address); @@ -3254,7 +3254,7 @@ find_frame_for_address (CORE_ADDR address) { if (id == get_frame_id (fid)) { - struct frame_info *prev_frame; + frame_info_ptr prev_frame; while (1) { diff --git a/gdb/stack.h b/gdb/stack.h index f78aedf1c85..97ee60a9be4 100644 --- a/gdb/stack.h +++ b/gdb/stack.h @@ -20,7 +20,7 @@ #ifndef STACK_H #define STACK_H -gdb::unique_xmalloc_ptr find_frame_funname (struct frame_info *frame, +gdb::unique_xmalloc_ptr find_frame_funname (frame_info_ptr frame, enum language *funlang, struct symbol **funcp); @@ -43,7 +43,7 @@ void get_user_print_what_frame_info (gdb::optional *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 (struct frame_info *frame, struct symtab_and_line sal); +bool frame_show_address (frame_info_ptr frame, struct symtab_and_line sal); /* Forget the last sal we displayed. */ diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c index 40d646aba7f..e3a97c03368 100644 --- a/gdb/stap-probe.c +++ b/gdb/stap-probe.c @@ -151,7 +151,7 @@ public: /* See probe.h. */ struct value *evaluate_argument (unsigned n, - struct frame_info *frame) override; + frame_info_ptr frame) override; /* See probe.h. */ void compile_to_ax (struct agent_expr *aexpr, @@ -1441,7 +1441,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, struct frame_info *frame) +stap_probe::evaluate_argument (unsigned n, frame_info_ptr frame) { struct stap_probe_arg *arg; struct gdbarch *gdbarch = get_frame_arch (frame); diff --git a/gdb/std-regs.c b/gdb/std-regs.c index d71e2ad998e..5b880a49b16 100644 --- a/gdb/std-regs.c +++ b/gdb/std-regs.c @@ -27,7 +27,7 @@ #include "gdbarch.h" static struct value * -value_of_builtin_frame_fp_reg (struct frame_info *frame, const void *baton) +value_of_builtin_frame_fp_reg (frame_info_ptr frame, const void *baton) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -53,7 +53,7 @@ value_of_builtin_frame_fp_reg (struct frame_info *frame, const void *baton) } static struct value * -value_of_builtin_frame_pc_reg (struct frame_info *frame, const void *baton) +value_of_builtin_frame_pc_reg (frame_info_ptr frame, const void *baton) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -72,7 +72,7 @@ value_of_builtin_frame_pc_reg (struct frame_info *frame, const void *baton) } static struct value * -value_of_builtin_frame_sp_reg (struct frame_info *frame, const void *baton) +value_of_builtin_frame_sp_reg (frame_info_ptr frame, const void *baton) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -82,7 +82,7 @@ value_of_builtin_frame_sp_reg (struct frame_info *frame, const void *baton) } static struct value * -value_of_builtin_frame_ps_reg (struct frame_info *frame, const void *baton) +value_of_builtin_frame_ps_reg (frame_info_ptr frame, const void *baton) { struct gdbarch *gdbarch = get_frame_arch (frame); diff --git a/gdb/symfile.h b/gdb/symfile.h index 1d13e82502b..ffd1acddfdb 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -37,7 +37,7 @@ struct obj_section; struct obstack; struct block; struct value; -struct frame_info; +class frame_info_ptr; struct agent_expr; struct axs_value; class probe; diff --git a/gdb/symtab.h b/gdb/symtab.h index 89d7a183ff3..90f5b45738b 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -40,7 +40,7 @@ /* Opaque declarations. */ struct ui_file; -struct frame_info; +class frame_info_ptr; struct symbol; struct obstack; struct objfile; @@ -1069,13 +1069,13 @@ struct symbol_computed_ops FRAME may be zero. */ struct value *(*read_variable) (struct symbol * symbol, - struct frame_info * frame); + 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, - struct frame_info *frame); + 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 @@ -1147,7 +1147,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, - struct frame_info *frame); + frame_info_ptr frame); }; /* Functions used with LOC_REGISTER and LOC_REGPARM_ADDR. */ @@ -2254,7 +2254,7 @@ struct gnu_ifunc_fns extern const struct gnu_ifunc_fns *gnu_ifunc_fns_p; -extern CORE_ADDR find_solib_trampoline_target (struct frame_info *, CORE_ADDR); +extern CORE_ADDR find_solib_trampoline_target (frame_info_ptr , CORE_ADDR); struct symtab_and_line { diff --git a/gdb/tic6x-linux-tdep.c b/gdb/tic6x-linux-tdep.c index 855eb303537..d8309f74e7c 100644 --- a/gdb/tic6x-linux-tdep.c +++ b/gdb/tic6x-linux-tdep.c @@ -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, - struct frame_info *this_frame, + 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 (struct frame_info *frame) +tic6x_linux_syscall_next_pc (frame_info_ptr frame) { ULONGEST syscall_number = get_frame_register_unsigned (frame, TIC6X_B0_REGNUM); diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c index 27e575d4176..b080f9f17ae 100644 --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c @@ -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, - struct frame_info *this_frame) + 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, - struct frame_info *this_frame) + 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, struct frame_info *next_frame) +tic6x_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { gdb_byte buf[8]; @@ -376,7 +376,7 @@ tic6x_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) /* Frame base handling. */ static struct tic6x_unwind_cache* -tic6x_frame_unwind_cache (struct frame_info *this_frame, +tic6x_frame_unwind_cache (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 (struct frame_info *this_frame, } static void -tic6x_frame_this_id (struct frame_info *this_frame, void **this_cache, +tic6x_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } static struct value * -tic6x_frame_prev_register (struct frame_info *this_frame, void **this_cache, +tic6x_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct tic6x_unwind_cache *cache = @@ -445,7 +445,7 @@ tic6x_frame_prev_register (struct frame_info *this_frame, void **this_cache, } static CORE_ADDR -tic6x_frame_base_address (struct frame_info *this_frame, void **this_cache) +tic6x_frame_base_address (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 (struct frame_info *this_frame) +tic6x_make_stub_cache (frame_info_ptr this_frame) { struct tic6x_unwind_cache *cache; @@ -489,7 +489,7 @@ tic6x_make_stub_cache (struct frame_info *this_frame) } static void -tic6x_stub_this_id (struct frame_info *this_frame, void **this_cache, +tic6x_stub_this_id (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 (struct frame_info *this_frame, void **this_cache, static int tic6x_stub_unwind_sniffer (const struct frame_unwind *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR addr_in_block; @@ -1105,7 +1105,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 (struct frame_info *frame, CORE_ADDR *pc) +tic6x_get_longjmp_target (frame_info_ptr frame, CORE_ADDR *pc) { struct gdbarch *gdbarch = get_frame_arch (frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); diff --git a/gdb/tic6x-tdep.h b/gdb/tic6x-tdep.h index ebfd6e686fa..d50715e24da 100644 --- a/gdb/tic6x-tdep.h +++ b/gdb/tic6x-tdep.h @@ -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) (struct frame_info *frame) = nullptr; + CORE_ADDR (*syscall_next_pc) (frame_info_ptr frame) = nullptr; const gdb_byte *breakpoint = nullptr; /* Breakpoint instruction. */ diff --git a/gdb/tilegx-linux-tdep.c b/gdb/tilegx-linux-tdep.c index 0bb2366925a..ef38436801f 100644 --- a/gdb/tilegx-linux-tdep.c +++ b/gdb/tilegx-linux-tdep.c @@ -34,7 +34,7 @@ static void tilegx_linux_sigframe_init (const struct tramp_frame *self, - struct frame_info *this_frame, + frame_info_ptr this_frame, struct trad_frame_cache *this_cache, CORE_ADDR func) { diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c index 3554b503e8b..ecd27b8b33d 100644 --- a/gdb/tilegx-tdep.c +++ b/gdb/tilegx-tdep.c @@ -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, - struct frame_info *next_frame) + 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 (struct frame_info *frame, CORE_ADDR *pc) +tilegx_get_longjmp_target (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 (struct frame_info *this_frame, void **this_cache) +tilegx_frame_cache (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 (struct frame_info *this_frame, void **this_cache) /* Retrieve the value of REGNUM in FRAME. */ static struct value* -tilegx_frame_prev_register (struct frame_info *this_frame, +tilegx_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { @@ -878,7 +878,7 @@ tilegx_frame_prev_register (struct frame_info *this_frame, /* Build frame id. */ static void -tilegx_frame_this_id (struct frame_info *this_frame, void **this_cache, +tilegx_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } static CORE_ADDR -tilegx_frame_base_address (struct frame_info *this_frame, void **this_cache) +tilegx_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct tilegx_frame_cache *cache = tilegx_frame_cache (this_frame, this_cache); diff --git a/gdb/top.c b/gdb/top.c index 54c7c922142..e9794184f07 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -491,7 +491,7 @@ void check_frame_language_change (void) { static int warned = 0; - struct frame_info *frame; + frame_info_ptr frame; /* First make sure that a new frame has been selected, in case the command or the hooks changed the program state. */ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 2f867a0606d..39408ae8941 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -206,7 +206,7 @@ set_tracepoint_num (int num) the traceframe context (line, function, file). */ static void -set_traceframe_context (struct frame_info *trace_frame) +set_traceframe_context (frame_info_ptr trace_frame) { CORE_ADDR trace_pc; struct symbol *traceframe_fun; diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c index 9d4f23a851f..82d910942e6 100644 --- a/gdb/trad-frame.c +++ b/gdb/trad-frame.c @@ -29,14 +29,14 @@ struct trad_frame_cache { - struct frame_info *this_frame; + frame_info_ptr this_frame; CORE_ADDR this_base; trad_frame_saved_reg *prev_regs; struct frame_id this_id; }; struct trad_frame_cache * -trad_frame_cache_zalloc (struct frame_info *this_frame) +trad_frame_cache_zalloc (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 (struct frame_info *this_frame) +trad_frame_alloc_saved_regs (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 (struct frame_info *this_frame, +trad_frame_get_prev_register (frame_info_ptr this_frame, trad_frame_saved_reg this_saved_regs[], int regnum) { @@ -209,7 +209,7 @@ trad_frame_get_prev_register (struct frame_info *this_frame, struct value * trad_frame_get_register (struct trad_frame_cache *this_trad_cache, - struct frame_info *this_frame, + frame_info_ptr this_frame, int regnum) { return trad_frame_get_prev_register (this_frame, this_trad_cache->prev_regs, diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h index 09a8133d362..190f4098b5d 100644 --- a/gdb/trad-frame.h +++ b/gdb/trad-frame.h @@ -22,7 +22,7 @@ #include "frame.h" /* For "struct frame_id". */ -struct frame_info; +class frame_info_ptr; struct regcache_map_entry; struct trad_frame_cache; @@ -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 (struct frame_info *); +struct trad_frame_cache *trad_frame_cache_zalloc (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 bytes); struct value *trad_frame_get_register (struct trad_frame_cache *this_trad_cache, - struct frame_info *this_frame, + 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 (struct frame_info *); +trad_frame_saved_reg *trad_frame_alloc_saved_regs (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 (struct frame_info *this_frame, +struct value *trad_frame_get_prev_register (frame_info_ptr this_frame, trad_frame_saved_reg this_saved_regs[], int regnum); diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c index 04f81804624..f5926dc1ee7 100644 --- a/gdb/tramp-frame.c +++ b/gdb/tramp-frame.c @@ -40,7 +40,7 @@ struct tramp_frame_cache }; static struct trad_frame_cache * -tramp_frame_cache (struct frame_info *this_frame, +tramp_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct tramp_frame_cache *tramp_cache @@ -58,7 +58,7 @@ tramp_frame_cache (struct frame_info *this_frame, } static void -tramp_frame_this_id (struct frame_info *this_frame, +tramp_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -69,7 +69,7 @@ tramp_frame_this_id (struct frame_info *this_frame, } static struct value * -tramp_frame_prev_register (struct frame_info *this_frame, +tramp_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int prev_regnum) { @@ -81,7 +81,7 @@ tramp_frame_prev_register (struct frame_info *this_frame, static CORE_ADDR tramp_frame_start (const struct tramp_frame *tramp, - struct frame_info *this_frame, CORE_ADDR pc) + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, void **this_cache) { const struct tramp_frame *tramp = self->unwind_data->tramp_frame; diff --git a/gdb/tramp-frame.h b/gdb/tramp-frame.h index 94af6f2db0e..4e7dcb68eaa 100644 --- a/gdb/tramp-frame.h +++ b/gdb/tramp-frame.h @@ -23,7 +23,7 @@ #include "frame.h" /* For "enum frame_type". */ struct trad_frame; -struct frame_info; +class frame_info_ptr; struct trad_frame_cache; /* A trampoline consists of a small sequence of instructions placed at @@ -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, - struct frame_info *this_frame, + 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, - struct frame_info *this_frame, + frame_info_ptr this_frame, CORE_ADDR *pc); }; diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index 2cb9c75ca8d..e4bbc47daa9 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -484,7 +484,7 @@ tui_disasm_window::addr_is_displayed (CORE_ADDR addr) const } void -tui_disasm_window::maybe_update (struct frame_info *fi, symtab_and_line sal) +tui_disasm_window::maybe_update (frame_info_ptr fi, symtab_and_line sal) { CORE_ADDR low; diff --git a/gdb/tui/tui-disasm.h b/gdb/tui/tui-disasm.h index e33c6411cc5..d9d9794998b 100644 --- a/gdb/tui/tui-disasm.h +++ b/gdb/tui/tui-disasm.h @@ -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 (struct frame_info *fi, symtab_and_line sal) override; + void maybe_update (frame_info_ptr fi, symtab_and_line sal) override; void erase_source_content () override { diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index 83172789227..967ac30e6bb 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -62,9 +62,9 @@ static bool tui_refreshing_registers = false; /* Observer for the register_changed notification. */ static void -tui_register_changed (struct frame_info *frame, int regno) +tui_register_changed (frame_info_ptr frame, int regno) { - struct frame_info *fi; + frame_info_ptr fi; if (!tui_is_window_visible (DATA_WIN)) return; @@ -129,7 +129,7 @@ tui_refresh_frame_and_register_information () if (from_stack && has_stack_frames ()) { - struct frame_info *fi = get_selected_frame (NULL); + frame_info_ptr fi = get_selected_frame (NULL); /* Display the frame position (even if there is no symbols or the PC is not known). */ diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 830df5427c7..3eff98a5b69 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -85,7 +85,7 @@ tab_expansion_file::write (const char *buf, long length_buf) representation of it. */ static std::string -tui_register_format (struct frame_info *frame, int regnum) +tui_register_format (frame_info_ptr frame, int regnum) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -111,7 +111,7 @@ tui_register_format (struct frame_info *frame, int regnum) display. When changep is set, check if the new register value has changed with respect to the previous call. */ static void -tui_get_register (struct frame_info *frame, +tui_get_register (frame_info_ptr frame, struct tui_data_item_window *data, int regnum, bool *changedp) { @@ -208,7 +208,7 @@ tui_data_window::show_registers (const reggroup *group) void tui_data_window::show_register_group (const reggroup *group, - struct frame_info *frame, + frame_info_ptr frame, bool refresh_values_only) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -462,7 +462,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 (struct frame_info *frame) +tui_data_window::check_register_values (frame_info_ptr frame) { if (m_regs_content.empty ()) show_registers (m_current_group); diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index 5289d3a892d..fc838d3dffd 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -59,7 +59,7 @@ struct tui_data_window : public tui_win_info return DATA_NAME; } - void check_register_values (struct frame_info *frame); + void check_register_values (frame_info_ptr frame); void show_registers (const reggroup *group); @@ -101,7 +101,7 @@ private: void display_reg_element_at_line (int start_element_no, int start_line_no); void show_register_group (const reggroup *group, - struct frame_info *frame, + frame_info_ptr frame, bool refresh_values_only); /* Answer the number of the last line in the regs display. If there diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 208889d0bf7..c45463ec765 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -140,7 +140,7 @@ tui_source_window::do_scroll_vertical (int num_to_scroll) if (cursal.symtab == NULL) { - struct frame_info *fi = get_selected_frame (NULL); + frame_info_ptr fi = get_selected_frame (NULL); s = find_pc_line_symtab (get_frame_pc (fi)); arch = get_frame_arch (fi); } @@ -191,7 +191,7 @@ tui_source_window::line_is_displayed (int line) const } void -tui_source_window::maybe_update (struct frame_info *fi, symtab_and_line sal) +tui_source_window::maybe_update (frame_info_ptr fi, symtab_and_line sal) { int start_line = (sal.line - ((height - 2) / 2)) + 1; if (start_line <= 0) diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h index d2c6338acc3..7187debbd34 100644 --- a/gdb/tui/tui-source.h +++ b/gdb/tui/tui-source.h @@ -46,7 +46,7 @@ struct tui_source_window : public tui_source_window_base bool showing_source_p (const char *filename) const; - void maybe_update (struct frame_info *fi, symtab_and_line sal) override; + void maybe_update (frame_info_ptr fi, symtab_and_line sal) override; void erase_source_content () override { diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index be8ffbd0c12..85e71c0bc25 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -195,7 +195,7 @@ tui_locator_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 (struct frame_info *fi) +tui_get_function_from_frame (frame_info_ptr fi) { static char name[256]; string_file stream; @@ -251,7 +251,7 @@ tui_locator_window::rerender () subsequently refreshed), false otherwise. */ bool -tui_show_frame_info (struct frame_info *fi) +tui_show_frame_info (frame_info_ptr fi) { bool locator_changed_p; diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h index 971ff1dd413..5cb570f779e 100644 --- a/gdb/tui/tui-stack.h +++ b/gdb/tui/tui-stack.h @@ -24,7 +24,7 @@ #include "tui/tui-data.h" -struct frame_info; +class frame_info_ptr; /* Locator window class. */ @@ -79,6 +79,6 @@ private: }; extern void tui_show_locator_content (void); -extern bool tui_show_frame_info (struct frame_info *); +extern bool tui_show_frame_info (frame_info_ptr ); #endif /* TUI_TUI_STACK_H */ diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 87b8dcff154..27ac446f4d2 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -329,7 +329,7 @@ tui_source_window_base::rerender () { struct symtab_and_line cursal = get_current_source_symtab_and_line (); - struct frame_info *frame = deprecated_safe_get_selected_frame (); + frame_info_ptr frame = deprecated_safe_get_selected_frame (); struct gdbarch *gdbarch = get_frame_arch (frame); struct symtab *s = find_pc_line_symtab (get_frame_pc (frame)); @@ -353,7 +353,7 @@ tui_source_window_base::refill () sal = get_current_source_symtab_and_line (); if (sal.symtab == NULL) { - struct frame_info *fi = deprecated_safe_get_selected_frame (); + frame_info_ptr fi = deprecated_safe_get_selected_frame (); if (fi != nullptr) sal = find_pc_line (get_frame_pc (fi), 0); } diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 1e4dc12044a..f7301aacd26 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -153,7 +153,7 @@ public: /* Update the window to display the given location. Does nothing if the location is already displayed. */ - virtual void maybe_update (struct frame_info *fi, symtab_and_line sal) = 0; + virtual void maybe_update (frame_info_ptr fi, symtab_and_line sal) = 0; void update_source_window_as_is (struct gdbarch *gdbarch, const struct symtab_and_line &sal); diff --git a/gdb/user-regs.c b/gdb/user-regs.c index 3030d952cf1..6b8dffff6b8 100644 --- a/gdb/user-regs.c +++ b/gdb/user-regs.c @@ -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) (struct frame_info * frame, const void *baton); + struct value *(*xread) (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, struct frame_info *frame) +value_of_user_reg (int regnum, frame_info_ptr frame) { struct gdbarch *gdbarch = get_frame_arch (frame); int maxregs = gdbarch_num_cooked_regs (gdbarch); diff --git a/gdb/user-regs.h b/gdb/user-regs.h index 2b393ab917a..10eaf59e197 100644 --- a/gdb/user-regs.h +++ b/gdb/user-regs.h @@ -38,7 +38,7 @@ of assumed to be read-only. Should it, for instance, return a register descriptor that contains all the relevant access methods. */ -struct frame_info; +class frame_info_ptr; struct gdbarch; /* Given an architecture, map a user visible register name onto its @@ -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) (struct frame_info *frame, +typedef struct value *(user_reg_read_ftype) (frame_info_ptr frame, const void *baton); -extern struct value *value_of_user_reg (int regnum, struct frame_info *frame); +extern struct value *value_of_user_reg (int regnum, frame_info_ptr frame); /* Add a builtin register (present in all architectures). */ extern void user_reg_add_builtin (const char *name, diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 7b5e42929d7..a40e9abf077 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -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 (struct frame_info *this_frame) +v850_alloc_frame_cache (frame_info_ptr this_frame) { struct v850_frame_cache *cache; @@ -1231,7 +1231,7 @@ v850_alloc_frame_cache (struct frame_info *this_frame) } static struct v850_frame_cache * -v850_frame_cache (struct frame_info *this_frame, void **this_cache) +v850_frame_cache (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 (struct frame_info *this_frame, void **this_cache) static struct value * -v850_frame_prev_register (struct frame_info *this_frame, +v850_frame_prev_register (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 (struct frame_info *this_frame, } static void -v850_frame_this_id (struct frame_info *this_frame, void **this_cache, +v850_frame_this_id (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 (struct frame_info *this_frame, void **this_cache) +v850_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct v850_frame_cache *cache = v850_frame_cache (this_frame, this_cache); diff --git a/gdb/valops.c b/gdb/valops.c index de8a68888e4..748f154252a 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1182,7 +1182,7 @@ value_assign (struct value *toval, struct value *fromval) case lval_register: { - struct frame_info *frame; + frame_info_ptr frame; struct gdbarch *gdbarch; int value_reg; @@ -1301,7 +1301,7 @@ value_assign (struct value *toval, struct value *fromval) re-find the previously selected frame automatically. */ { - struct frame_info *fi = frame_find_by_id (old_frame); + frame_info_ptr fi = frame_find_by_id (old_frame); if (fi != NULL) select_frame (fi); @@ -1376,7 +1376,7 @@ value_repeat (struct value *arg1, int count) struct value * value_of_variable (struct symbol *var, const struct block *b) { - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; if (symbol_read_needs_frame (var)) frame = get_selected_frame (_("No frame selected.")); @@ -1409,7 +1409,7 @@ address_of_variable (struct symbol *var, const struct block *b) { case lval_register: { - struct frame_info *frame; + frame_info_ptr frame; const char *regname; frame = frame_find_by_id (VALUE_NEXT_FRAME_ID (val)); @@ -3943,7 +3943,7 @@ value_of_this (const struct language_defn *lang) { struct block_symbol sym; const struct block *b; - struct frame_info *frame; + frame_info_ptr frame; if (lang->name_of_this () == NULL) error (_("no `this' in current language")); diff --git a/gdb/value.c b/gdb/value.c index 43023bf7ee4..605e52dee82 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -3958,7 +3958,7 @@ value_fetch_lazy_memory (struct value *val) static void value_fetch_lazy_register (struct value *val) { - struct frame_info *next_frame; + frame_info_ptr next_frame; int regnum; struct type *type = check_typedef (value_type (val)); struct value *new_val = val, *mark = value_mark (); @@ -4024,7 +4024,7 @@ value_fetch_lazy_register (struct value *val) if (frame_debug) { struct gdbarch *gdbarch; - struct frame_info *frame; + frame_info_ptr frame; frame = frame_find_by_id (VALUE_NEXT_FRAME_ID (val)); frame = get_prev_frame_always (frame); regnum = VALUE_REGNUM (val); diff --git a/gdb/value.h b/gdb/value.h index 52752df1f4c..d4b4f95a9c5 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -621,7 +621,7 @@ struct value *value_vector_widen (struct value *scalar_value, #include "gdbtypes.h" #include "expression.h" -struct frame_info; +class frame_info_ptr; struct fn_field; extern int print_address_demangle (const struct value_print_options *, @@ -703,13 +703,13 @@ extern struct value *default_value_from_register (struct gdbarch *gdbarch, struct frame_id frame_id); extern void read_frame_register_value (struct value *value, - struct frame_info *frame); + frame_info_ptr frame); extern struct value *value_from_register (struct type *type, int regnum, - struct frame_info *frame); + frame_info_ptr frame); extern CORE_ADDR address_from_register (int regnum, - struct frame_info *frame); + frame_info_ptr frame); extern struct value *value_of_variable (struct symbol *var, const struct block *b); @@ -717,9 +717,9 @@ extern struct value *value_of_variable (struct symbol *var, extern struct value *address_of_variable (struct symbol *var, const struct block *b); -extern struct value *value_of_register (int regnum, struct frame_info *frame); +extern struct value *value_of_register (int regnum, frame_info_ptr frame); -struct value *value_of_register_lazy (struct frame_info *frame, int regnum); +struct value *value_of_register_lazy (frame_info_ptr frame, int regnum); /* Return the symbol's reading requirement. */ @@ -732,7 +732,7 @@ extern int symbol_read_needs_frame (struct symbol *); extern struct value *read_var_value (struct symbol *var, const struct block *var_block, - struct frame_info *frame); + frame_info_ptr frame); extern struct value *allocate_value (struct type *type); extern struct value *allocate_value_lazy (struct type *type); @@ -1110,7 +1110,7 @@ extern int val_print_string (struct type *elttype, const char *encoding, extern void print_variable_and_value (const char *name, struct symbol *var, - struct frame_info *frame, + frame_info_ptr frame, struct ui_file *stream, int indent); diff --git a/gdb/varobj.c b/gdb/varobj.c index d3df608c55f..467f9ff3a26 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -225,10 +225,10 @@ gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var) /* Return the full FRAME which corresponds to the given CORE_ADDR or NULL if no FRAME on the chain corresponds to CORE_ADDR. */ -static struct frame_info * +static frame_info_ptr find_frame_addr_in_frame_chain (CORE_ADDR frame_addr) { - struct frame_info *frame = NULL; + frame_info_ptr frame = NULL; if (frame_addr == (CORE_ADDR) 0) return NULL; @@ -265,7 +265,7 @@ varobj_create (const char *objname, if (expression != NULL) { - struct frame_info *fi; + frame_info_ptr fi; struct frame_id old_id = null_frame_id; const struct block *block; const char *p; @@ -1947,7 +1947,7 @@ name_of_child (struct varobj *var, int index) static bool check_scope (const struct varobj *var) { - struct frame_info *fi; + frame_info_ptr fi; bool scope; fi = frame_find_by_id (var->root->frame); diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 3befa8051d9..9dc6ecd5f35 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -187,7 +187,7 @@ vax_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } static struct frame_id -vax_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +vax_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR fp; @@ -303,7 +303,7 @@ struct vax_frame_cache }; static struct vax_frame_cache * -vax_frame_cache (struct frame_info *this_frame, void **this_cache) +vax_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct vax_frame_cache *cache; CORE_ADDR addr; @@ -365,7 +365,7 @@ vax_frame_cache (struct frame_info *this_frame, void **this_cache) } static void -vax_frame_this_id (struct frame_info *this_frame, void **this_cache, +vax_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } static struct value * -vax_frame_prev_register (struct frame_info *this_frame, +vax_frame_prev_register (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 = static CORE_ADDR -vax_frame_base_address (struct frame_info *this_frame, void **this_cache) +vax_frame_base_address (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 (struct frame_info *this_frame, void **this_cache) } static CORE_ADDR -vax_frame_args_address (struct frame_info *this_frame, void **this_cache) +vax_frame_args_address (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 (struct frame_info *frame) +vax_frame_num_args (frame_info_ptr frame) { CORE_ADDR args; diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 3504a0b6eaa..3256c83ec12 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -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, - struct frame_info *this_frame) + frame_info_ptr this_frame) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR next_addr; @@ -583,7 +583,7 @@ xstormy16_find_jmp_table_entry (struct gdbarch *gdbarch, CORE_ADDR faddr) } static CORE_ADDR -xstormy16_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) +xstormy16_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); CORE_ADDR tmp = xstormy16_resolve_jmp_table_entry (gdbarch, pc); @@ -655,7 +655,7 @@ xstormy16_alloc_frame_cache (void) } static struct xstormy16_frame_cache * -xstormy16_frame_cache (struct frame_info *this_frame, void **this_cache) +xstormy16_frame_cache (frame_info_ptr this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct xstormy16_frame_cache *cache; @@ -691,7 +691,7 @@ xstormy16_frame_cache (struct frame_info *this_frame, void **this_cache) } static struct value * -xstormy16_frame_prev_register (struct frame_info *this_frame, +xstormy16_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { struct xstormy16_frame_cache *cache = xstormy16_frame_cache (this_frame, @@ -709,7 +709,7 @@ xstormy16_frame_prev_register (struct frame_info *this_frame, } static void -xstormy16_frame_this_id (struct frame_info *this_frame, void **this_cache, +xstormy16_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { struct xstormy16_frame_cache *cache = xstormy16_frame_cache (this_frame, @@ -723,7 +723,7 @@ xstormy16_frame_this_id (struct frame_info *this_frame, void **this_cache, } static CORE_ADDR -xstormy16_frame_base_address (struct frame_info *this_frame, void **this_cache) +xstormy16_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct xstormy16_frame_cache *cache = xstormy16_frame_cache (this_frame, this_cache); diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 32311035ef5..4ca46e2e20a 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -1025,13 +1025,13 @@ xtensa_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) static CORE_ADDR -xtensa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +xtensa_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) { gdb_byte buf[8]; CORE_ADDR pc; DEBUGTRACE ("xtensa_unwind_pc (next_frame = %s)\n", - host_address_to_string (next_frame)); + host_address_to_string (next_frame.get ())); frame_unwind_register (next_frame, gdbarch_pc_regnum (gdbarch), buf); pc = extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr); @@ -1043,7 +1043,7 @@ xtensa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) static struct frame_id -xtensa_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +xtensa_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame) { CORE_ADDR pc, fp; xtensa_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); @@ -1216,16 +1216,16 @@ done: cache->prev_sp = SP of the previous frame. */ static void -call0_frame_cache (struct frame_info *this_frame, +call0_frame_cache (frame_info_ptr this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc); static void -xtensa_window_interrupt_frame_cache (struct frame_info *this_frame, +xtensa_window_interrupt_frame_cache (frame_info_ptr this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc); static struct xtensa_frame_cache * -xtensa_frame_cache (struct frame_info *this_frame, void **this_cache) +xtensa_frame_cache (frame_info_ptr this_frame, void **this_cache) { xtensa_frame_cache_t *cache; CORE_ADDR ra, wb, ws, pc, sp, ps; @@ -1391,7 +1391,7 @@ This message will not be repeated in this session.\n")); static void -xtensa_frame_this_id (struct frame_info *this_frame, +xtensa_frame_this_id (frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id) { @@ -1405,7 +1405,7 @@ xtensa_frame_this_id (struct frame_info *this_frame, } static struct value * -xtensa_frame_prev_register (struct frame_info *this_frame, +xtensa_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum) { @@ -1508,7 +1508,7 @@ xtensa_unwind = }; static CORE_ADDR -xtensa_frame_base_address (struct frame_info *this_frame, void **this_cache) +xtensa_frame_base_address (frame_info_ptr this_frame, void **this_cache) { struct xtensa_frame_cache *cache = xtensa_frame_cache (this_frame, this_cache); @@ -2544,7 +2544,7 @@ done: /* Initialize frame cache for the current frame in CALL0 ABI. */ static void -call0_frame_cache (struct frame_info *this_frame, +call0_frame_cache (frame_info_ptr this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (this_frame); @@ -2893,7 +2893,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 (struct frame_info *this_frame, +xtensa_window_interrupt_frame_cache (frame_info_ptr this_frame, xtensa_frame_cache_t *cache, CORE_ADDR pc) { diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c index a25610aab6b..3141feb4d80 100644 --- a/gdb/z80-tdep.c +++ b/gdb/z80-tdep.c @@ -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 (struct frame_info *this_frame, +z80_frame_unwind_cache (frame_info_ptr this_frame, void **this_prologue_cache) { CORE_ADDR start_pc, current_pc; @@ -658,7 +658,7 @@ z80_frame_unwind_cache (struct frame_info *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 (struct frame_info *this_frame, void **this_cache, +z80_frame_this_id (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 (struct frame_info *this_frame, void **this_cache, } static struct value * -z80_frame_prev_register (struct frame_info *this_frame, +z80_frame_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum) { struct z80_unwind_cache *info -- 2.30.2