Files
clang-p2996/lldb/test/Shell/ObjectFile/ELF/riscv-arch.yaml
Luís Marques 15f5971150 [LLDB][RISCV] Add RISC-V ArchSpec and rv32/rv64 variant detection
Adds the RISC-V ArchSpec bits contributed by @simoncook as part of D62732,
plus logic to distinguish between riscv32 and riscv64 based on ELF class.

The patch follows the implementation approach previously used for MIPS.
It defines RISC-V architecture subtypes and inspects the ELF header,
namely the ELF class, to detect the right subtype.

Differential Revision: https://reviews.llvm.org/D86292
2021-01-07 23:02:55 +00:00

25 lines
586 B
YAML

# RUN: yaml2obj --docnum=1 %s > %t32
# RUN: yaml2obj --docnum=2 %s > %t64
# RUN: lldb-test object-file %t32 | FileCheck --check-prefix=CHECK-RV32 %s
# RUN: lldb-test object-file %t64 | FileCheck --check-prefix=CHECK-RV64 %s
# CHECK-RV32: Architecture: riscv32--
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_RISCV
...
# CHECK-RV64: Architecture: riscv64--
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_RISCV
...