mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Do not resolve the decl_file value from other DIEs
The other DIEs might be part of another compilation unit, so the index into the line_table taken from those DIEs might cause an std::out_of_range exception when used on our line_table.
This commit is contained in:
parent
5e0550c0e8
commit
f4faaed32a
@ -379,9 +379,8 @@ void memory_map::process_inlines(const dwarf::die& d,
|
||||
}
|
||||
|
||||
string decl_file;
|
||||
dwarf::value decl_file_val = find_attribute(d, dwarf::DW_AT::decl_file);
|
||||
if(decl_file_val.valid() && table.valid()) {
|
||||
decl_file = table.get_file(decl_file_val.as_uconstant())->path;
|
||||
if(d.has(dwarf::DW_AT::decl_file) && table.valid()) {
|
||||
decl_file = table.get_file(d[dwarf::DW_AT::decl_file].as_uconstant())->path;
|
||||
}
|
||||
|
||||
size_t decl_line = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user