Skip to content
Snippets Groups Projects
Commit 6482db9f authored by Walter Lozano's avatar Walter Lozano
Browse files

Process files with missing DW_AT_name

With current behavior while scanning compile units the utility exits with
error if a unit does not contains an entry with name. However, some
packages, like arm-trusted-firmware, has entries without names. Since these
entries do not provide useful information for the mapping between binaries
to sources just skip them.

infrastructure/apertis-issues#81



Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent edaae999
No related branches found
No related tags found
3 merge requests!11Merge changes from apertis/v2022-updates into apertis/v2022,!10Backport v2022<-v2023dev3: Process files with missing DW_AT_name,!9Process files with missing DW_AT_name
......@@ -82,9 +82,12 @@ fn list_entries<R: Reader>(
.transpose()?
.ok_or_else(|| anyhow!("Missing DW_AT_comp_dir"))?;
let at_name = entry
.attr(gimli::DW_AT_name)?
.ok_or_else(|| anyhow!("Missing DW_AT_name"))?;
let at_name = if let Some(it) = entry.attr(gimli::DW_AT_name)? {
it
} else {
eprintln!("Warning: unit without name, skipping it");
continue;
};
if let Some(r) = at_name.string_value(debug_str) {
let comp_name = r.to_string()?;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment