aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-06-17 19:50:53 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-06-17 19:50:53 +0000
commit24c5c679cb74ed4035f8c1dd4249654602fd1f10 (patch)
treeee24fda32e84b20b44aafb6812f454044d5e4db5 /gdb/dwarf2expr.h
parente8c21678a448808bdfd5eff794aa5a061cba6af6 (diff)
downloadgdb-24c5c679cb74ed4035f8c1dd4249654602fd1f10.zip
gdb-24c5c679cb74ed4035f8c1dd4249654602fd1f10.tar.gz
gdb-24c5c679cb74ed4035f8c1dd4249654602fd1f10.tar.bz2
gdb/
Code cleanup: Generalize call_site.parameter key. * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_entry_value>: Remove variable dwarf_reg. New variable kind_u. Update parameters to push_dwarf_reg_entry_value. (ctx_no_push_dwarf_reg_entry_value): Update parameters. * dwarf2expr.h (enum call_site_parameter_kind) (union call_site_parameter_u): Forward declarations. (struct dwarf_expr_context_funcs): Update parameters and their description for push_dwarf_reg_entry_value. (ctx_no_push_dwarf_reg_entry_value): Update parameters. * dwarf2loc.c (call_site_parameter_matches): New function. (dwarf_expr_reg_to_entry_parameter): Update parameters and their description. Use call_site_parameter_matches. (dwarf_expr_push_dwarf_reg_entry_value, value_of_dwarf_reg_entry): Update parameters and their description. (value_of_dwarf_block_entry): Remove variables dwarf_reg and fb_offset. New variable kind_u. Adjust the caller for updated parameters. (needs_dwarf_reg_entry_value): Update parameters. * dwarf2read.c (read_call_site_scope): New variable loc. Use it instead of attr. Update for the changed fields of struct call_site_parameter. * gdbtypes.h: Include dwarf2expr.h. (enum call_site_parameter_kind): New. (struct call_site.parameter): New field kind. Wrap dwarf_reg and fb_offset into new union u.
Diffstat (limited to 'gdb/dwarf2expr.h')
-rw-r--r--gdb/dwarf2expr.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
index f39ef3c..da3a5bb 100644
--- a/gdb/dwarf2expr.h
+++ b/gdb/dwarf2expr.h
@@ -26,6 +26,8 @@
#include "leb128.h"
struct dwarf_expr_context;
+enum call_site_parameter_kind;
+union call_site_parameter_u;
/* Offset relative to the start of its containing CU (compilation unit). */
typedef struct
@@ -77,14 +79,12 @@ struct dwarf_expr_context_funcs
struct type *(*get_base_type) (struct dwarf_expr_context *ctx, cu_offset die);
/* Push on DWARF stack an entry evaluated for DW_TAG_GNU_call_site's
- DWARF_REG/FB_OFFSET at the caller of specified BATON. If DWARF register
- number DWARF_REG specifying the push_dwarf_reg_entry_value parameter is
- not -1 FB_OFFSET is ignored. Otherwise FB_OFFSET specifies stack
- parameter offset against caller's stack pointer (which equals the callee's
- frame base). If DEREF_SIZE is not -1 then use
- DW_AT_GNU_call_site_data_value instead of DW_AT_GNU_call_site_value. */
+ parameter matching KIND and KIND_U at the caller of specified BATON.
+ If DEREF_SIZE is not -1 then use DW_AT_GNU_call_site_data_value instead of
+ DW_AT_GNU_call_site_value. */
void (*push_dwarf_reg_entry_value) (struct dwarf_expr_context *ctx,
- int dwarf_reg, CORE_ADDR fb_offset,
+ enum call_site_parameter_kind kind,
+ union call_site_parameter_u kind_u,
int deref_size);
/* Return the address indexed by DW_OP_GNU_addr_index.
@@ -289,7 +289,8 @@ void ctx_no_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset);
struct type *ctx_no_get_base_type (struct dwarf_expr_context *ctx,
cu_offset die);
void ctx_no_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
- int dwarf_reg, CORE_ADDR fb_offset,
+ enum call_site_parameter_kind kind,
+ union call_site_parameter_u kind_u,
int deref_size);
CORE_ADDR ctx_no_get_addr_index (void *baton, unsigned int index);