[all-commits] [llvm/llvm-project] d52582: [LLDB][LoongArch] ObjectFile: add a case for `EM_L...

lhloongson via All-commits all-commits at lists.llvm.org
Thu Jan 12 18:19:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d52582b6b7dfff5538008ad1ebb141da283d9206
      https://github.com/llvm/llvm-project/commit/d52582b6b7dfff5538008ad1ebb141da283d9206
  Author: Hui Li <lihui at loongson.cn>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp

  Log Message:
  -----------
  [LLDB][LoongArch] ObjectFile: add a case for `EM_LOONGARCH`

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).

```

Reviewed By: SixWeining, DavidSpickett

Differential Revision: https://reviews.llvm.org/D141245


  Commit: 1eaadaea5090f88d4e26331a5046a1a07f15a6ea
      https://github.com/llvm/llvm-project/commit/1eaadaea5090f88d4e26331a5046a1a07f15a6ea
  Author: Hui Li <lihui at loongson.cn>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    M lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
    M lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h
    M lldb/unittests/Instruction/CMakeLists.txt
    A lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp

  Log Message:
  -----------
  [LLDB][LoongArch] Add unittests for EmulateInstructionLoongArch

Add unit tests For EmulateInstructionLoongArch existing branch instruction.
Add 19 test cases in total.

Without this patch:

```
$ ninja check-lldb-unit
[0/1] Running lldb unit test suite

Testing Time: 10.55s
  Passed: 1025
```

With this patch:

```
$ ninja check-lldb-unit
[0/1] Running lldb unit test suite

Testing Time: 10.45s
  Passed: 1044
```

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D140386


Compare: https://github.com/llvm/llvm-project/compare/46a8d5779b3a...1eaadaea5090


More information about the All-commits mailing list