lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, seehearfeel, DavidSpickett. Herald added a subscriber: emaste. Herald added a project: All. lh03061238 requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
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). Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D141245 Files: lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp Index: lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp =================================================================== --- lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp +++ lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp @@ -211,6 +211,9 @@ case EM_RISCV: slot = R_RISCV_JUMP_SLOT; break; + case EM_LOONGARCH: + slot = R_LARCH_JUMP_SLOT; + break; } return slot;
Index: lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp =================================================================== --- lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp +++ lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp @@ -211,6 +211,9 @@ case EM_RISCV: slot = R_RISCV_JUMP_SLOT; break; + case EM_LOONGARCH: + slot = R_LARCH_JUMP_SLOT; + break; } return slot;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits