]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdw: Proper handling of DW_AT_high_pc
authorDjordje Todorovic <djordje.todorovic@rt-rk.com>
Tue, 26 Sep 2017 13:43:43 +0000 (15:43 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 6 Oct 2017 19:38:48 +0000 (21:38 +0200)
Since DWARF4 DW_AT_high_pc may be a constant.
Which should be added to the DW_AT_low_pc value to get the address.

Signed-off-by: Djordje Todorovic <djordje.todorovic@rt-rk.com>
libdw/c++/dwarf-knowledge.cc

index ea80091cdc2d173e345e91ad44e4cf5c149224b7..8543f9b39490df533b129ff1bda8dd9376dcac7a 100644 (file)
@@ -121,10 +121,12 @@ expected_value_space (int attr, int tag)
       return VS(rangelistptr);
 
     case DW_AT_low_pc:
-    case DW_AT_high_pc:
     case DW_AT_entry_pc:
       return VS(address);
 
+    case DW_AT_high_pc:
+      return VS(address) | VS(constant);
+
     case DW_AT_discr:
       return VS(reference);
     case DW_AT_discr_value: