aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/frame-tailcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2/frame-tailcall.c')
-rw-r--r--gdb/dwarf2/frame-tailcall.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/dwarf2/frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c
index 27a820a..2f6400d 100644
--- a/gdb/dwarf2/frame-tailcall.c
+++ b/gdb/dwarf2/frame-tailcall.c
@@ -90,7 +90,7 @@ cache_eq (const void *arg1, const void *arg2)
tailcall_cache. */
static struct tailcall_cache *
-cache_new_ref1 (frame_info_ptr next_bottom_frame)
+cache_new_ref1 (const frame_info_ptr &next_bottom_frame)
{
struct tailcall_cache *cache = XCNEW (struct tailcall_cache);
void **slot;
@@ -137,7 +137,7 @@ cache_unref (struct tailcall_cache *cache)
return 0. */
static int
-frame_is_tailcall (frame_info_ptr fi)
+frame_is_tailcall (const frame_info_ptr &fi)
{
return frame_unwinder_is (fi, &dwarf2_tailcall_frame_unwind);
}
@@ -146,12 +146,13 @@ frame_is_tailcall (frame_info_ptr fi)
call chain. Otherwise return NULL. No new reference is created. */
static struct tailcall_cache *
-cache_find (frame_info_ptr fi)
+cache_find (const frame_info_ptr &initial_fi)
{
struct tailcall_cache *cache;
struct tailcall_cache search;
void **slot;
+ frame_info_ptr fi = initial_fi;
while (frame_is_tailcall (fi))
{
fi = get_next_frame (fi);
@@ -173,7 +174,7 @@ cache_find (frame_info_ptr fi)
If THIS_FRAME is CACHE-> NEXT_BOTTOM_FRAME return -1. */
static int
-existing_next_levels (frame_info_ptr this_frame,
+existing_next_levels (const frame_info_ptr &this_frame,
struct tailcall_cache *cache)
{
int retval = (frame_relative_level (this_frame)
@@ -210,7 +211,7 @@ pretended_chain_levels (struct call_site_chain *chain)
Specific virtual tail call frames are tracked by INLINE_DEPTH. */
static void
-tailcall_frame_this_id (frame_info_ptr this_frame, void **this_cache,
+tailcall_frame_this_id (const frame_info_ptr &this_frame, void **this_cache,
struct frame_id *this_id)
{
struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
@@ -232,7 +233,7 @@ tailcall_frame_this_id (frame_info_ptr this_frame, void **this_cache,
CACHE. */
static CORE_ADDR
-pretend_pc (frame_info_ptr this_frame, struct tailcall_cache *cache)
+pretend_pc (const frame_info_ptr &this_frame, struct tailcall_cache *cache)
{
int next_levels = existing_next_levels (this_frame, cache);
struct call_site_chain *chain = cache->chain;
@@ -264,7 +265,7 @@ pretend_pc (frame_info_ptr this_frame, struct tailcall_cache *cache)
frames unwind the NULL case differently. */
struct value *
-dwarf2_tailcall_prev_register_first (frame_info_ptr this_frame,
+dwarf2_tailcall_prev_register_first (const frame_info_ptr &this_frame,
void **tailcall_cachep, int regnum)
{
struct gdbarch *this_gdbarch = get_frame_arch (this_frame);
@@ -294,7 +295,7 @@ dwarf2_tailcall_prev_register_first (frame_info_ptr this_frame,
dwarf2_tailcall_prev_register_first. */
static struct value *
-tailcall_frame_prev_register (frame_info_ptr this_frame,
+tailcall_frame_prev_register (const frame_info_ptr &this_frame,
void **this_cache, int regnum)
{
struct tailcall_cache *cache = (struct tailcall_cache *) *this_cache;
@@ -316,7 +317,7 @@ tailcall_frame_prev_register (frame_info_ptr this_frame,
static int
tailcall_frame_sniffer (const struct frame_unwind *self,
- frame_info_ptr this_frame, void **this_cache)
+ const frame_info_ptr &this_frame, void **this_cache)
{
frame_info_ptr next_frame;
int next_levels;
@@ -363,7 +364,7 @@ tailcall_frame_sniffer (const struct frame_unwind *self,
address pushed on the stack. */
void
-dwarf2_tailcall_sniffer_first (frame_info_ptr this_frame,
+dwarf2_tailcall_sniffer_first (const frame_info_ptr &this_frame,
void **tailcall_cachep,
const LONGEST *entry_cfa_sp_offsetp)
{
@@ -458,7 +459,7 @@ tailcall_frame_dealloc_cache (frame_info *self, void *this_cache)
call frames have gdbarch of the bottom (callee) frame. */
static struct gdbarch *
-tailcall_frame_prev_arch (frame_info_ptr this_frame,
+tailcall_frame_prev_arch (const frame_info_ptr &this_frame,
void **this_prologue_cache)
{
struct tailcall_cache *cache = (struct tailcall_cache *) *this_prologue_cache;