/* Those cases extract the data properly */
case 0x05: /* FORM_data2 */ cval = *((UShort*)p); p +=2; break;
case 0x06: /* FORM_data4 */ cval = *((UInt*)p);p +=4; break;
- case 0x0e: /* FORM_strp */ sval = debugstr + *((UInt*)p);
- p += 4; break;
- /* pointer in .debug_str */
+ case 0x0e: /* FORM_strp */ /* pointer in .debug_str */
+ /* 2006-01-01: only generate a value if
+ debugstr is non-NULL (which means that a
+ debug_str section was found) */
+ if (debugstr)
+ sval = debugstr + *((UInt*)p);
+ p += 4;
+ break;
case 0x08: /* FORM_string */ sval = (Char*)p;
p += VG_(strlen)((Char*)p) + 1; break;
case 0x0b: /* FORM_data1 */ cval = *p; p++; break;
stabstr, stabstr_sz );
}
# endif
- if (debug_info && debug_abbv && debug_line && debug_str) {
+ /* jrs 2006-01-01: icc-8.1 has been observed to generate
+ binaries without debug_str sections. Don't preclude
+ debuginfo reading for that reason, but, in
+ read_unitinfo_dwarf2, do check that debugstr is non-NULL
+ before using it. */
+ if (debug_info && debug_abbv && debug_line /* && debug_str */) {
ML_(read_debuginfo_dwarf2) ( si,
debug_info, debug_info_sz,
debug_abbv,