llvm-project/lldb/test/Shell/ObjectFile
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
..
Breakpad
ELF [LLDB][LoongArch] Add LoongArch ArchSpec and subtype detection 2022-11-01 17:06:04 +08:00
MachO [test] Fix PayloadString: in lldb tests 2021-07-26 10:00:05 -07:00
PDB [lldb] Update object.test after 'nosync' inference was enabled. 2021-04-09 10:04:15 +02:00
PECOFF [lldb][COFF] Map symbols without base+complex type as 'Data' type 2022-09-28 12:57:12 +03:00
wasm [lldb][wasm] Parse DWO section names 2021-01-14 08:45:02 +01:00
lit.local.cfg