aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-07-25 14:06:35 -0300
committerBruno Larsen <blarsen@redhat.com>2022-10-10 11:57:10 +0200
commitbd2b40ac129b167f1a709589dee9c009a04a6e21 (patch)
tree675eb8430a923c94353eca0ec2e7b56cfc1eae37 /gdb/dwarf2
parentba380b3e5162e89c4c81a73f4fb9fcbbbbe75e24 (diff)
downloadgdb-bd2b40ac129b167f1a709589dee9c009a04a6e21.zip
gdb-bd2b40ac129b167f1a709589dee9c009a04a6e21.tar.gz
gdb-bd2b40ac129b167f1a709589dee9c009a04a6e21.tar.bz2
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/\<frame_info \*/frame_info_ptr /g' sed 's/frame_info_ptr $/frame_info_ptr/g' - used to remove whitespace problems. The changed files were then manually checked and some 'sed' changes undone, some constructors and some gets were added, according to what made sense, and what Tromey originally did Co-Authored-By: Bruno Larsen <blarsen@redhat.com> Approved-by: Tom Tomey <tom@tromey.com>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/expr.c20
-rw-r--r--gdb/dwarf2/expr.h6
-rw-r--r--gdb/dwarf2/frame-tailcall.c41
-rw-r--r--gdb/dwarf2/frame-tailcall.h6
-rw-r--r--gdb/dwarf2/frame.c39
-rw-r--r--gdb/dwarf2/frame.h12
-rw-r--r--gdb/dwarf2/loc.c38
-rw-r--r--gdb/dwarf2/loc.h8
8 files changed, 87 insertions, 83 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index d3e3e97..2df0696 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -49,7 +49,7 @@ static const registry<gdbarch>::key<dwarf_gdbarch_types> dwarf_arch_cookie;
/* Ensure that a FRAME is defined, throw an exception otherwise. */
static void
-ensure_have_frame (frame_info *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<dwarf_expr_piece> &&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 4ce9b73..6078dce 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 7f30a0d..a1e43cc 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 e55a59d..c849bfb 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 0e681f0..83565ea 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 04ec1e0..653156f 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 ad45d57..791648d 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<CORE_ADDR> 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<CORE_ADDR> 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 a9834d3..d6709f2 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<CORE_ADDR> 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 */