if (dtag == DW_TAG_compile_unit || dtag == DW_TAG_type_unit) {
Bool have_lo = False;
Bool have_hi1 = False;
+ Bool hiIsRelative = False;
Bool have_range = False;
Addr ip_lo = 0;
Addr ip_hi1 = 0;
if (attr == DW_AT_high_pc && ctsSzB > 0) {
ip_hi1 = cts;
have_hi1 = True;
+ if (form != DW_FORM_addr)
+ hiIsRelative = True;
}
if (attr == DW_AT_ranges && ctsSzB > 0) {
rangeoff = cts;
read_filename_table( parser, cc, (UWord)cts, td3 );
}
}
+ if (have_lo && have_hi1 && hiIsRelative)
+ ip_hi1 += ip_lo;
/* Now, does this give us an opportunity to find this
CU's svma? */
#if 0
Bool have_lo = False;
Bool have_hi1 = False;
Bool have_range = False;
+ Bool hiIsRelative = False;
Addr ip_lo = 0;
Addr ip_hi1 = 0;
Addr rangeoff = 0;
if (attr == DW_AT_high_pc && ctsSzB > 0) {
ip_hi1 = cts;
have_hi1 = True;
+ if (form != DW_FORM_addr)
+ hiIsRelative = True;
}
if (attr == DW_AT_ranges && ctsSzB > 0) {
rangeoff = cts;
VG_(addToXA)(gexprs, &fbGX);
}
}
+ if (have_lo && have_hi1 && hiIsRelative)
+ ip_hi1 += ip_lo;
/* Do we have something that looks sane? */
if (dtag == DW_TAG_subprogram
&& (!have_lo) && (!have_hi1) && (!have_range)) {