This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][LoongArch] ObjectFile: add a case for `EM_LOONGARCH`
ClosedPublic

Authored by lh03061238 on Jan 8 2023, 6:23 PM.

Details

Summary

This adds the jump slot mapping for LoongArch. This is a simple
change that ensures lldb running properly.

Note that this problem was found only when CMake variables
"DLLVM_ENABLE_ASSERTIONS=ON" is selected.

Without this patch,

$ build/bin/lldb  test

../ELFHeader::GetRelocationJumpSlotType() const: Assertion `false && "architecture not supported"' fail

With this patch

$ build/bin/lldb  test
(lldb) target create "test"
Current executable set to '../test' (loongarch64).

Diff Detail

Event Timeline

lh03061238 created this revision.Jan 8 2023, 6:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2023, 6:23 PM
Herald added a subscriber: emaste. · View Herald Transcript
lh03061238 requested review of this revision.Jan 8 2023, 6:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2023, 6:23 PM
SixWeining accepted this revision.Jan 8 2023, 6:28 PM
This revision is now accepted and ready to land.Jan 8 2023, 6:28 PM
This revision was automatically updated to reflect the committed changes.