X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libdw%2Fdwarf_getlocation_implicit_pointer.c;h=95053820222560e667690fb4d76e91bf41e721e5;hb=82c3b58b54026d061a4d81ad95f3023d5d883ab2;hp=f93d17ec8b63766744bc1ea7d618e6dd3d9c3cc8;hpb=a286dd013ef8d46edf013efc0908822a59d8ac81;p=platform%2Fupstream%2Felfutils.git diff --git a/libdw/dwarf_getlocation_implicit_pointer.c b/libdw/dwarf_getlocation_implicit_pointer.c index f93d17e..9505382 100644 --- a/libdw/dwarf_getlocation_implicit_pointer.c +++ b/libdw/dwarf_getlocation_implicit_pointer.c @@ -35,22 +35,22 @@ static unsigned char empty_exprloc = 0; +static Dwarf_CU empty_cu = { .startp = &empty_exprloc, + .endp = &empty_exprloc + 1 }; void internal_function -__libdw_empty_loc_attr (Dwarf_Attribute *attr, struct Dwarf_CU *cu ) +__libdw_empty_loc_attr (Dwarf_Attribute *attr) { attr->code = DW_AT_location; attr->form = DW_FORM_exprloc; attr->valp = &empty_exprloc; - attr->cu = cu; + attr->cu = &empty_cu; } int -dwarf_getlocation_implicit_pointer (attr, op, result) - Dwarf_Attribute *attr; - const Dwarf_Op *op; - Dwarf_Attribute *result; +dwarf_getlocation_implicit_pointer (Dwarf_Attribute *attr, const Dwarf_Op *op, + Dwarf_Attribute *result) { if (attr == NULL) return -1; @@ -69,7 +69,7 @@ dwarf_getlocation_implicit_pointer (attr, op, result) if (INTUSE(dwarf_attr) (&die, DW_AT_location, result) == NULL && INTUSE(dwarf_attr) (&die, DW_AT_const_value, result) == NULL) { - __libdw_empty_loc_attr (result, attr->cu); + __libdw_empty_loc_attr (result); return 0; }