aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index a8cd158..0577420 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -7812,6 +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;
if (child_die->tag != DW_TAG_GNU_call_site_parameter)
{
@@ -7825,8 +7826,8 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
/* DW_AT_location specifies the register number. Value of the data
assumed for the register is contained in DW_AT_GNU_call_site_value. */
- attr = dwarf2_attr (child_die, DW_AT_location, cu);
- if (!attr || !attr_form_is_block (attr))
+ loc = dwarf2_attr (child_die, DW_AT_location, cu);
+ if (loc == NULL || !attr_form_is_block (loc))
{
complaint (&symfile_complaints,
_("No DW_FORM_block* DW_AT_location for "
@@ -7834,19 +7835,26 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
child_die->offset.sect_off, objfile->name);
continue;
}
- parameter->dwarf_reg = dwarf_block_to_dwarf_reg (DW_BLOCK (attr)->data,
- &DW_BLOCK (attr)->data[DW_BLOCK (attr)->size]);
- if (parameter->dwarf_reg == -1
- && !dwarf_block_to_sp_offset (gdbarch, DW_BLOCK (attr)->data,
- &DW_BLOCK (attr)->data[DW_BLOCK (attr)->size],
- &parameter->fb_offset))
+ else
{
- complaint (&symfile_complaints,
- _("Only single DW_OP_reg or DW_OP_fbreg is supported "
- "for DW_FORM_block* DW_AT_location for "
- "DW_TAG_GNU_call_site child DIE 0x%x [in module %s]"),
- child_die->offset.sect_off, objfile->name);
- continue;
+ parameter->u.dwarf_reg = dwarf_block_to_dwarf_reg
+ (DW_BLOCK (loc)->data, &DW_BLOCK (loc)->data[DW_BLOCK (loc)->size]);
+ if (parameter->u.dwarf_reg != -1)
+ parameter->kind = CALL_SITE_PARAMETER_DWARF_REG;
+ else if (dwarf_block_to_sp_offset (gdbarch, DW_BLOCK (loc)->data,
+ &DW_BLOCK (loc)->data[DW_BLOCK (loc)->size],
+ &parameter->u.fb_offset))
+ parameter->kind = CALL_SITE_PARAMETER_FB_OFFSET;
+ else
+ {
+ complaint (&symfile_complaints,
+ _("Only single DW_OP_reg or DW_OP_fbreg is supported "
+ "for DW_FORM_block* DW_AT_location is supported for "
+ "DW_TAG_GNU_call_site child DIE 0x%x "
+ "[in module %s]"),
+ child_die->offset.sect_off, objfile->name);
+ continue;
+ }
}
attr = dwarf2_attr (child_die, DW_AT_GNU_call_site_value, cu);