mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[Symbolize] Handle error after the notes loop
We always have to check the error, even if we're going to ignore it.
This commit is contained in:
parent
3ce517d29d
commit
d81def4b19
@ -300,6 +300,7 @@ Optional<ArrayRef<uint8_t>> getBuildID(const ELFFile<ELFT> *Obj) {
|
||||
for (auto N : Obj->notes(P, Err))
|
||||
if (N.getType() == ELF::NT_GNU_BUILD_ID && N.getName() == ELF::ELF_NOTE_GNU)
|
||||
return N.getDesc();
|
||||
consumeError(std::move(Err));
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
23
test/DebugInfo/symbolize-build-id-error.test
Normal file
23
test/DebugInfo/symbolize-build-id-error.test
Normal file
@ -0,0 +1,23 @@
|
||||
# RUN: yaml2obj %s -o %t
|
||||
|
||||
# RUN: llvm-symbolizer --debug-file-directory=%p/Inputs --obj=%t 0x20112f | FileCheck %s
|
||||
|
||||
# CHECK: ??
|
||||
# CHECK-NEXT: ??:0:0
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .note.invalid
|
||||
Type: SHT_NOTE
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Content: 0123456789
|
||||
ProgramHeaders:
|
||||
- Type: PT_NOTE
|
||||
Flags: [ PF_R ]
|
||||
Sections:
|
||||
- Section: .note.invalid
|
Loading…
Reference in New Issue
Block a user