Skip to content

Commit 8e4cc0f

Browse files
committed
Don't require UUID in Mach-O binaries
1 parent 57a9f88 commit 8e4cc0f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/symbolize/gimli/macho.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ impl Mapping {
2222
let map = super::mmap(path)?;
2323
let (macho, data) = find_header(&map)?;
2424
let endian = macho.endian().ok()?;
25-
let uuid = macho.uuid(endian, data, 0).ok()??;
25+
let uuid = macho.uuid(endian, data, 0).ok()?;
2626

2727
// Next we need to look for a `*.dSYM` file. For now we just probe the
2828
// containing directory and look around for something that matches
2929
// `*.dSYM`. Once it's found we root through the dwarf resources that it
3030
// contains and try to find a macho file which has a matching UUID as
3131
// the one of our own file. If we find a match that's the dwarf file we
3232
// want to return.
33-
if let Some(parent) = path.parent() {
34-
if let Some(mapping) = Mapping::load_dsym(parent, uuid) {
35-
return Some(mapping);
33+
if let Some(uuid) = uuid {
34+
if let Some(parent) = path.parent() {
35+
if let Some(mapping) = Mapping::load_dsym(parent, uuid) {
36+
return Some(mapping);
37+
}
3638
}
3739
}
3840

0 commit comments

Comments
 (0)