llvm-project/lldb/test/Shell/ObjectFile/ELF
Tiezhu Yang e9c34618c9 [LLDB][LoongArch] Add LoongArch ArchSpec and subtype detection
Define LoongArch architecture subtypes, add the LoongArch ArchSpec bits,
and inspect the ELF header to detect the right subtype based on ELF class.

Here is a simple test:

```
[loongson@linux ~]$ cat hello.c

int main()
{
	printf("Hello, World!\n");
	return 0;
}
[loongson@linux ~]$ clang hello.c -g -o hello
```

Without this patch:

```
[loongson@linux ~]$ llvm-project/llvm/build/bin/lldb hello
(lldb) target create "hello"
error: '/home/loongson/hello' doesn't contain any 'host' platform architectures: unknown
```

With this patch:

```
[loongson@linux ~]$ llvm-project/llvm/build/bin/lldb hello
(lldb) target create "hello"
Current executable set to '/home/loongson/hello' (loongarch64).
(lldb) run
Process 735167 launched: '/home/loongson/hello' (loongarch64)
Hello, World!
Process 735167 exited with status = 0 (0x00000000)
(lldb) quit
[loongson@linux ~]$ llvm-project/llvm/build/bin/llvm-lit llvm-project/lldb/test/Shell/ObjectFile/ELF/loongarch-arch.yaml
llvm-lit: /home/loongson/llvm-project/llvm/utils/lit/lit/llvm/config.py:456: note: using clang: /home/loongson/llvm-project/llvm/build/bin/clang
-- Testing: 1 tests, 1 workers --
PASS: lldb-shell :: ObjectFile/ELF/loongarch-arch.yaml (1 of 1)

Testing Time: 0.09s
  Passed: 1
```

Reviewed By: SixWeining, xen0n, DavidSpickett

Differential Revision: https://reviews.llvm.org/D137057
2022-11-01 17:06:04 +08:00
..
Inputs
PT_LOAD-empty.yaml
PT_LOAD-overlap-PT_INTERP.yaml
PT_LOAD-overlap-PT_TLS.yaml
PT_LOAD-overlap-section.yaml
PT_LOAD-overlap.yaml
PT_LOAD.yaml
PT_TLS-overlap-PT_LOAD.yaml
aarch64-relocations.yaml
avr-basic-info.yaml
base-address.yaml
basic-info.yaml [LLDB] Fix LLDB buildbots break due to --image-base 2021-10-26 12:07:16 +05:00
build-id-case.yaml
compressed-sections.yaml [lldb] Remove ELF .zdebug support 2022-07-14 10:12:48 -07:00
duplicate-section.yaml
eh_frame-symbols.yaml Create synthetic symbol names on demand to improve memory consumption and startup times. 2021-07-27 16:51:12 -07:00
gnu-debuglink.yaml
i386-relocations.yaml lldb: Add support for R_386_32 relocations to ObjectFileELF 2022-09-13 18:38:48 +02:00
loongarch-arch.yaml [LLDB][LoongArch] Add LoongArch ArchSpec and subtype detection 2022-11-01 17:06:04 +08:00
many-sections.s
minidebuginfo-corrupt-xz.yaml
minidebuginfo-find-symbols.yaml
minidebuginfo-no-lzma.yaml
minidebuginfo-set-and-hit-breakpoint.test Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON"" 2022-04-08 23:40:18 -07:00
netbsd-core-amd64.test
netbsd-exec-8.99.30-amd64.yaml
null-jmprel.yaml
riscv-arch.yaml
section-addresses.yaml
section-overlap.yaml
section-permissions.yaml
section-types-edgecases.yaml
section-types.yaml
short-build-id.yaml