GDB (xrefs)

Classes | Functions | Variables
/tmp/gdb-8.1/gdb/dwarf2-frame-tailcall.c File Reference
`#include "defs.h"`
`#include "frame.h"`
`#include "dwarf2-frame-tailcall.h"`
`#include "dwarf2loc.h"`
`#include "frame-unwind.h"`
`#include "block.h"`
`#include "hashtab.h"`
`#include "gdbtypes.h"`
`#include "regcache.h"`
`#include "value.h"`
`#include "dwarf2-frame.h"`

Go to the source code of this file.

## Classes
struct | tailcall_cache

## Functions
static hashval_t | cache_hash (const void *arg)
static int | cache_eq (const void *arg1, const void *arg2)
static struct tailcall_cache * | cache_new_ref1 (struct frame_info *next_bottom_frame)
static void | cache_ref (struct tailcall_cache *cache)
static void | cache_unref (struct tailcall_cache *cache)
static int | frame_is_tailcall (struct frame_info *fi)
static struct tailcall_cache * | cache_find (struct frame_info *fi)
static int | existing_next_levels (struct frame_info *this_frame, struct tailcall_cache *cache)
static int | pretended_chain_levels (struct call_site_chain *chain)
static void | tailcall_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static CORE_ADDR | pretend_pc (struct frame_info *this_frame, struct tailcall_cache *cache)
struct value * | dwarf2_tailcall_prev_register_first (struct frame_info *this_frame, void **tailcall_cachep, int regnum)
static struct value * | tailcall_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static int | tailcall_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
void | dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, void **tailcall_cachep, const LONGEST *entry_cfa_sp_offsetp)
static void | tailcall_frame_dealloc_cache (struct frame_info *self, void *this_cache)
static struct gdbarch * | tailcall_frame_prev_arch (struct frame_info *this_frame, void **this_prologue_cache)
void | _initialize_tailcall_frame (void)

## Variables
static htab_t | cache_htab
const struct frame_unwind | dwarf2_tailcall_frame_unwind

## Function Documentation

## ◆ _initialize_tailcall_frame()

void _initialize_tailcall_frame | ( | void |  | ) |

Definition at line 468 of file dwarf2-frame-tailcall.c.

References cache_eq(), cache_hash(), cache_htab, xcalloc(), and xfree().

## ◆ cache_eq()

static int cache_eq | ( | const void * | arg1,
|  | const void * | arg2
| ) |  |
| static

Definition at line 79 of file dwarf2-frame-tailcall.c.

References tailcall_cache::next_bottom_frame.

Referenced by _initialize_tailcall_frame().

## ◆ cache_find()

static struct tailcall_cache* cache_find | ( | struct frame_info * | fi | ) |
| static

Definition at line 148 of file dwarf2-frame-tailcall.c.

References cache_htab, frame_is_tailcall(), gdb_assert, and get_next_frame().

Referenced by tailcall_frame_sniffer().

## ◆ cache_hash()

static hashval_t cache_hash | ( | const void * | arg | ) |
| static

Definition at line 69 of file dwarf2-frame-tailcall.c.

References tailcall_cache::next_bottom_frame.

Referenced by _initialize_tailcall_frame().

## ◆ cache_new_ref1()

static struct tailcall_cache* cache_new_ref1 | ( | struct frame_info * | next_bottom_frame | ) |
| static

Definition at line 92 of file dwarf2-frame-tailcall.c.

References cache_htab, gdb_assert, tailcall_cache::next_bottom_frame, tailcall_cache::refc, and XCNEW.

Referenced by dwarf2_tailcall_sniffer_first().

## ◆ cache_ref()

static void cache_ref | ( | struct tailcall_cache * | cache | ) |
| static

Definition at line 110 of file dwarf2-frame-tailcall.c.

References gdb_assert, and tailcall_cache::refc.

Referenced by tailcall_frame_sniffer().

## ◆ cache_unref()

static void cache_unref | ( | struct tailcall_cache * | cache | ) |
| static

Definition at line 121 of file dwarf2-frame-tailcall.c.

References cache_htab, tailcall_cache::chain, gdb_assert, tailcall_cache::refc, and xfree().

Referenced by tailcall_frame_dealloc_cache(), and tailcall_frame_sniffer().

## ◆ dwarf2_tailcall_prev_register_first()

struct value* dwarf2_tailcall_prev_register_first | ( | struct frame_info * | this_frame,
|  | void ** | tailcall_cachep,
|  | int | regnum
| ) |  |

Definition at line 263 of file dwarf2-frame-tailcall.c.

References tailcall_cache::chain_levels, dwarf2_frame_cfa(), tailcall_cache::entry_cfa_sp_offset, existing_next_levels(), frame_unwind_got_address(), gdbarch_pc_regnum(), gdbarch_sp_regnum(), get_frame_arch(), pretend_pc(), tailcall_cache::prev_sp, tailcall_cache::prev_sp_p, and regnum.

Referenced by dwarf2_frame_prev_register(), and tailcall_frame_prev_register().

## ◆ dwarf2_tailcall_sniffer_first()

void dwarf2_tailcall_sniffer_first | ( | struct frame_info * | this_frame,
|  | void ** | tailcall_cachep,
|  | const LONGEST * | entry_cfa_sp_offsetp
| ) |  |

Definition at line 359 of file dwarf2-frame-tailcall.c.

References cache_new_ref1(), call_site_find_chain(), CATCH, tailcall_cache::chain, tailcall_cache::chain_levels, END_CATCH, tailcall_cache::entry_cfa_sp_offset, entry_values_debug, exception_print(), frame_unwind_arch(), frame_unwind_register_unsigned(), gdb_assert, gdb_stdout, gdbarch_sp_regnum(), gdbarch_unwind_pc(), get_frame_address_in_block(), call_site_chain::length, pretended_chain_levels(), tailcall_cache::prev_pc, tailcall_cache::prev_sp, tailcall_cache::prev_sp_p, RETURN_MASK_ERROR, sp_regnum, TRY, and xfree().

Referenced by dwarf2_frame_prev_register().

## ◆ existing_next_levels()

static int existing_next_levels | ( | struct frame_info * | this_frame,
|  | struct tailcall_cache * | cache
| ) |  |
| static

Definition at line 172 of file dwarf2-frame-tailcall.c.

References frame_relative_level(), gdb_assert, and tailcall_cache::next_bottom_frame.

Referenced by dwarf2_tailcall_prev_register_first(), pretend_pc(), tailcall_frame_sniffer(), and tailcall_frame_this_id().

## ◆ frame_is_tailcall()

static int frame_is_tailcall | ( | struct frame_info * | fi | ) |
| static

Definition at line 139 of file dwarf2-frame-tailcall.c.

References dwarf2_tailcall_frame_unwind, and frame_unwinder_is().

Referenced by cache_find().

## ◆ pretend_pc()

static CORE_ADDR pretend_pc | ( | struct frame_info * | this_frame,
|  | struct tailcall_cache * | cache
| ) |  |
| static

Definition at line 231 of file dwarf2-frame-tailcall.c.

References call_site_chain::call_site, call_site_chain::callees, call_site_chain::callers, tailcall_cache::chain, existing_next_levels(), gdb_assert, call_site_chain::length, call_site::pc, and tailcall_cache::prev_pc.

Referenced by dwarf2_tailcall_prev_register_first().

## ◆ pretended_chain_levels()

static int pretended_chain_levels | ( | struct call_site_chain * | chain | ) |
| static

Definition at line 188 of file dwarf2-frame-tailcall.c.

References call_site_chain::callees, call_site_chain::callers, tailcall_cache::chain, tailcall_cache::chain_levels, gdb_assert, and call_site_chain::length.

Referenced by dwarf2_tailcall_sniffer_first().

## ◆ tailcall_frame_dealloc_cache()

static void tailcall_frame_dealloc_cache | ( | struct frame_info * | self,
|  | void * | this_cache
| ) |  |
| static

Definition at line 433 of file dwarf2-frame-tailcall.c.

References cache_unref().

## ◆ tailcall_frame_prev_arch()

static struct gdbarch* tailcall_frame_prev_arch | ( | struct frame_info * | this_frame,
|  | void ** | this_prologue_cache
| ) |  |
| static

Definition at line 444 of file dwarf2-frame-tailcall.c.

References get_frame_arch(), and tailcall_cache::next_bottom_frame.

## ◆ tailcall_frame_prev_register()

static struct value* tailcall_frame_prev_register | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | int | regnum
| ) |  |
| static

Definition at line 293 of file dwarf2-frame-tailcall.c.

References dwarf2_tailcall_prev_register_first(), frame_unwind_got_register(), gdb_assert, tailcall_cache::next_bottom_frame, and regnum.

## ◆ tailcall_frame_sniffer()

static int tailcall_frame_sniffer | ( | const struct frame_unwind * | self,
|  | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 314 of file dwarf2-frame-tailcall.c.

References cache_find(), cache_ref(), cache_unref(), tailcall_cache::chain_levels, existing_next_levels(), gdb_assert, and get_next_frame().

## ◆ tailcall_frame_this_id()

static void tailcall_frame_this_id | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | struct frame_id * | this_id
| ) |  |
| static

Definition at line 209 of file dwarf2-frame-tailcall.c.

References tailcall_cache::chain_levels, existing_next_levels(), gdb_assert, get_frame_id(), get_frame_pc(), get_next_frame(), and frame_info::this_id.

## Variable Documentation

## ◆ cache_htab

htab_t cache_htab
| static

Definition at line 33 of file dwarf2-frame-tailcall.c.

Referenced by _initialize_tailcall_frame(), cache_find(), cache_new_ref1(), and cache_unref().

## ◆ dwarf2_tailcall_frame_unwind

const struct frame_unwind dwarf2_tailcall_frame_unwind

Initial value:
=
{
TAILCALL_FRAME,
default_frame_unwind_stop_reason,
tailcall_frame_this_id,
tailcall_frame_prev_register,
NULL,
tailcall_frame_sniffer,
tailcall_frame_dealloc_cache,
tailcall_frame_prev_arch
}
tailcall_frame_prev_arch
static struct gdbarch * tailcall_frame_prev_arch(struct frame_info *this_frame, void **this_prologue_cache)
Definition: dwarf2-frame-tailcall.c:444
tailcall_frame_prev_register
static struct value * tailcall_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: dwarf2-frame-tailcall.c:293
tailcall_frame_this_id
static void tailcall_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: dwarf2-frame-tailcall.c:209
tailcall_frame_dealloc_cache
static void tailcall_frame_dealloc_cache(struct frame_info *self, void *this_cache)
Definition: dwarf2-frame-tailcall.c:433
default_frame_unwind_stop_reason
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: frame-unwind.c:184
tailcall_frame_sniffer
static int tailcall_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
Definition: dwarf2-frame-tailcall.c:314
TAILCALL_FRAME
Definition: frame.h:252

Definition at line 455 of file dwarf2-frame-tailcall.c.

Referenced by dwarf2_append_unwinders(), dwarf2_frame_dealloc_cache(), and frame_is_tailcall().