diff options
| author | Mark Wielaard <[email protected]> | 2013-12-09 16:33:26 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2013-12-13 14:23:02 +0100 |
| commit | 3951f2ec0aaca021c77a2c7a464dcf43433261c3 (patch) | |
| tree | ae53cf11004fbb40596d7ccde179100b52f3fa20 /tests/varlocs.c | |
| parent | 8b10aaa3dd3db1981aee29cf8f88411707172295 (diff) | |
libdw: Handle empty location expression for (indirect) DIE locations.
When dwarf_getlocation_implicit_pointer and dwarf_getlocation_attr
refer to a DIE that doesn't contain a DW_AT_location then don't generate
an error, but return an empty location expression to signal the actual
value pointed to is not available. This isn't invalid DWARF. Also make
sure that __libdw_intern_expression handles empty location expressions.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/varlocs.c')
| -rw-r--r-- | tests/varlocs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/varlocs.c b/tests/varlocs.c index 6f4d4901..04f17ff2 100644 --- a/tests/varlocs.c +++ b/tests/varlocs.c @@ -404,7 +404,7 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) int locs = dwarf_getlocation_addr (&attrval, addr, &exprval, &exprval_len, 1); if (locs == 0) - printf ("<no location>"); // XXX should that be flagged? + printf ("<no location>"); // This means "optimized out". else if (locs == 1) print_expr_block (&attrval, exprval, exprval_len, addr); else |
