make dwarf_expr_frame_base_1 public
This exports dwarf_expr_frame_base_1 so that other code can use it. gdb/ChangeLog 2014-12-12 Tom Tromey <tromey@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf2loc.c (dwarf_expr_frame_base_1): Remove declaration. (dwarf_expr_frame_base): Update caller. (dwarf_expr_frame_base_1): Rename to ... (func_get_frame_base_dwarf_block): ... this and make it public. (dwarf2_compile_expr_to_ax, locexpr_describe_location_piece): Update callers. * dwarf2loc.h (func_get_frame_base_dwarf_block): New declaration.
This commit is contained in:
parent
a8fd558970
commit
af945b7535
|
@ -1,3 +1,14 @@
|
||||||
|
2014-12-12 Tom Tromey <tromey@redhat.com>
|
||||||
|
Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* dwarf2loc.c (dwarf_expr_frame_base_1): Remove declaration.
|
||||||
|
(dwarf_expr_frame_base): Update caller.
|
||||||
|
(dwarf_expr_frame_base_1): Rename to ...
|
||||||
|
(func_get_frame_base_dwarf_block): ... this and make it public.
|
||||||
|
(dwarf2_compile_expr_to_ax, locexpr_describe_location_piece): Update
|
||||||
|
callers.
|
||||||
|
* dwarf2loc.h (func_get_frame_base_dwarf_block): New declaration.
|
||||||
|
|
||||||
2014-12-12 Tom Tromey <tromey@redhat.com>
|
2014-12-12 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* dwarf2loc.c (dwarf2_compile_expr_to_ax) <DW_OP_call_frame_cfa>:
|
* dwarf2loc.c (dwarf2_compile_expr_to_ax) <DW_OP_call_frame_cfa>:
|
||||||
|
|
|
@ -40,9 +40,6 @@
|
||||||
|
|
||||||
extern int dwarf2_always_disassemble;
|
extern int dwarf2_always_disassemble;
|
||||||
|
|
||||||
static void dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
|
|
||||||
const gdb_byte **start, size_t *length);
|
|
||||||
|
|
||||||
static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
|
static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
|
||||||
|
|
||||||
static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
|
static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
|
||||||
|
@ -365,9 +362,9 @@ dwarf_expr_frame_base (void *baton, const gdb_byte **start, size_t * length)
|
||||||
something has gone wrong. */
|
something has gone wrong. */
|
||||||
gdb_assert (framefunc != NULL);
|
gdb_assert (framefunc != NULL);
|
||||||
|
|
||||||
dwarf_expr_frame_base_1 (framefunc,
|
func_get_frame_base_dwarf_block (framefunc,
|
||||||
get_frame_address_in_block (debaton->frame),
|
get_frame_address_in_block (debaton->frame),
|
||||||
start, length);
|
start, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implement find_frame_base_location method for LOC_BLOCK functions using
|
/* Implement find_frame_base_location method for LOC_BLOCK functions using
|
||||||
|
@ -411,9 +408,11 @@ const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs =
|
||||||
loclist_find_frame_base_location
|
loclist_find_frame_base_location
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
/* See dwarf2loc.h. */
|
||||||
dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc,
|
|
||||||
const gdb_byte **start, size_t *length)
|
void
|
||||||
|
func_get_frame_base_dwarf_block (struct symbol *framefunc, CORE_ADDR pc,
|
||||||
|
const gdb_byte **start, size_t *length)
|
||||||
{
|
{
|
||||||
if (SYMBOL_BLOCK_OPS (framefunc) != NULL)
|
if (SYMBOL_BLOCK_OPS (framefunc) != NULL)
|
||||||
{
|
{
|
||||||
|
@ -3074,8 +3073,8 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
|
||||||
if (!framefunc)
|
if (!framefunc)
|
||||||
error (_("No function found for block"));
|
error (_("No function found for block"));
|
||||||
|
|
||||||
dwarf_expr_frame_base_1 (framefunc, expr->scope,
|
func_get_frame_base_dwarf_block (framefunc, expr->scope,
|
||||||
&datastart, &datalen);
|
&datastart, &datalen);
|
||||||
|
|
||||||
op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
|
op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset);
|
||||||
dwarf2_compile_expr_to_ax (expr, loc, arch, addr_size, datastart,
|
dwarf2_compile_expr_to_ax (expr, loc, arch, addr_size, datastart,
|
||||||
|
@ -3571,7 +3570,7 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
|
||||||
error (_("No function found for block for symbol \"%s\"."),
|
error (_("No function found for block for symbol \"%s\"."),
|
||||||
SYMBOL_PRINT_NAME (symbol));
|
SYMBOL_PRINT_NAME (symbol));
|
||||||
|
|
||||||
dwarf_expr_frame_base_1 (framefunc, addr, &base_data, &base_size);
|
func_get_frame_base_dwarf_block (framefunc, addr, &base_data, &base_size);
|
||||||
|
|
||||||
if (base_data[0] >= DW_OP_breg0 && base_data[0] <= DW_OP_breg31)
|
if (base_data[0] >= DW_OP_breg0 && base_data[0] <= DW_OP_breg31)
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,6 +80,18 @@ extern const gdb_byte *dwarf2_fetch_constant_bytes (sect_offset,
|
||||||
struct type *dwarf2_get_die_type (cu_offset die_offset,
|
struct type *dwarf2_get_die_type (cu_offset die_offset,
|
||||||
struct dwarf2_per_cu_data *per_cu);
|
struct dwarf2_per_cu_data *per_cu);
|
||||||
|
|
||||||
|
/* Find the frame base information for FRAMEFUNC at PC. START is an
|
||||||
|
out parameter which is set to point to the DWARF expression to
|
||||||
|
compute. LENGTH is an out parameter which is set to the length of
|
||||||
|
the DWARF expression. This throws an exception on error or if an
|
||||||
|
expression is not found; the returned length will never be
|
||||||
|
zero. */
|
||||||
|
|
||||||
|
extern void func_get_frame_base_dwarf_block (struct symbol *framefunc,
|
||||||
|
CORE_ADDR pc,
|
||||||
|
const gdb_byte **start,
|
||||||
|
size_t *length);
|
||||||
|
|
||||||
/* Evaluate a location description, starting at DATA and with length
|
/* Evaluate a location description, starting at DATA and with length
|
||||||
SIZE, to find the current location of variable of TYPE in the context
|
SIZE, to find the current location of variable of TYPE in the context
|
||||||
of FRAME. */
|
of FRAME. */
|
||||||
|
|
Loading…
Reference in New Issue