diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-17 19:53:52 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-17 19:53:52 +0000 |
commit | 1788b2d3beb8f1a59976a2ffef984d8e52188203 (patch) | |
tree | 11c20395e8b9717f712f6f1394917636cd651925 /gdb/dwarf2read.c | |
parent | 24c5c679cb74ed4035f8c1dd4249654602fd1f10 (diff) | |
download | gdb-1788b2d3beb8f1a59976a2ffef984d8e52188203.zip gdb-1788b2d3beb8f1a59976a2ffef984d8e52188203.tar.gz gdb-1788b2d3beb8f1a59976a2ffef984d8e52188203.tar.bz2 |
gdb/
* dwarf2expr.c (execute_stack_op): Support DW_OP_GNU_parameter_ref.
* dwarf2loc.c (call_site_parameter_matches): Support
CALL_SITE_PARAMETER_PARAM_OFFSET.
(needs_dwarf_reg_entry_value): Push stub value.
* dwarf2read.c (read_call_site_scope): New variable origin. Support
CALL_SITE_PARAMETER_PARAM_OFFSET and its DW_AT_abstract_origin.
* gdbtypes.h (enum call_site_parameter_kind): New item
CALL_SITE_PARAMETER_PARAM_OFFSET.
(struct call_site.parameter.u): New field param_offset.
gdb/testsuite/
* gdb.arch/amd64-entry-value-param.S: New file.
* gdb.arch/amd64-entry-value-param.c: New file.
* gdb.arch/amd64-entry-value-param.exp: New file.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0577420..7ac125a 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -7812,7 +7812,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu) child_die = sibling_die (child_die)) { struct call_site_parameter *parameter; - struct attribute *loc; + struct attribute *loc, *origin; if (child_die->tag != DW_TAG_GNU_call_site_parameter) { @@ -7823,11 +7823,23 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu) gdb_assert (call_site->parameter_count < nparams); parameter = &call_site->parameter[call_site->parameter_count]; - /* DW_AT_location specifies the register number. Value of the data - assumed for the register is contained in DW_AT_GNU_call_site_value. */ + /* DW_AT_location specifies the register number or DW_AT_abstract_origin + specifies DW_TAG_formal_parameter. Value of the data assumed for the + register is contained in DW_AT_GNU_call_site_value. */ loc = dwarf2_attr (child_die, DW_AT_location, cu); - if (loc == NULL || !attr_form_is_block (loc)) + origin = dwarf2_attr (child_die, DW_AT_abstract_origin, cu); + if (loc == NULL && origin != NULL && is_ref_attr (origin)) + { + sect_offset offset; + + parameter->kind = CALL_SITE_PARAMETER_PARAM_OFFSET; + offset = dwarf2_get_ref_die_offset (origin); + gdb_assert (offset.sect_off >= cu->header.offset.sect_off); + parameter->u.param_offset.cu_off = (offset.sect_off + - cu->header.offset.sect_off); + } + else if (loc == NULL || origin != NULL || !attr_form_is_block (loc)) { complaint (&symfile_complaints, _("No DW_FORM_block* DW_AT_location for " |