llvm-project/llvm/lib
Anatoly Trosinenko a5bd75aab8 [MSP430] Enable some basic support for debug information
This commit technically permits LLVM to emit the debug information for ELF files for MSP430 architecture. Aside from this, it only defines the register numbers as defined by part 10.1 of MSP430 EABI specification (assuming the 1-byte subregisters share the register numbers with corresponding full-size registers).

This commit was basically tested by me with TI-provided GCC 8.3.1 toolchain by compiling an example program with `clang` (please note manual linking may be required due to upstream `clang` not yet handling the `-msim` option necessary to run binaries on the GDB-provided simulator) and then running it and single-stepping with `msp430-elf-gdb` like this:

```
$sysroot/bin/msp430-elf-gdb ./test -ex "target sim" -ex "load ./test"
(gdb) ... traditional GDB commands follow ...
```

While this implementation is most probably far from completeness and is considered experimental, it can already help with debugging MSP430 programs as well as finding issues in LLVM debug info support for MSP430 itself.

One of the use cases includes trying to find a point where UBSan check in a trap-on-error mode was triggered.

The expected debug information format is described in the [MSP430 Embedded Application Binary Interface](http://www.ti.com/lit/an/slaa534/slaa534.pdf) specification, part 10.

Differential Revision: https://reviews.llvm.org/D81488
2020-06-22 13:14:07 +03:00
..
Analysis [ValueTracking, BasicAA] Don't simplify instructions 2020-06-21 16:31:07 +02:00
AsmParser [LLParser] Delete temp CallInst when error occurs 2020-06-16 11:41:25 +08:00
BinaryFormat [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
Bitcode [strictfp] Replace dangling strictfp attrs with nobuiltin 2020-06-15 10:05:35 -04:00
Bitstream [Bitcode] reserve in front of push_back loops. NFCI. 2020-05-01 15:52:53 +02:00
CodeGen [CGP] Enable CodeGenPrepares phi type convertion. 2020-06-21 16:46:16 +01:00
DWARFLinker [Clang] Restore replace_path_prefix instead of startswith 2020-05-13 13:49:14 -04:00
DebugInfo [DebugInfo] Explicitly permit addr_size = 0x02 when parsing DWARF data 2020-06-22 13:11:55 +03:00
Demangle Give microsoftDemangle() an outparam for how many input bytes were consumed. 2020-05-20 16:17:31 -04:00
ExecutionEngine [JITLink] Display host -> target address mapping in debugging output. 2020-06-19 10:05:02 -07:00
Extensions Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
Frontend [OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def 2020-06-01 16:23:10 -04:00
FuzzMutate [SVE] Eliminate calls to default-false VectorType::get() from FuzzMutate 2020-06-09 13:57:36 -07:00
Fuzzer
IR try to fix build bot after b7338fb1a6 2020-06-19 12:02:09 +02:00
IRReader Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
LTO Error related to ThinLTO caching needs to be downgraded to a remark 2020-06-19 16:03:29 -07:00
LineEditor
Linker [SVE] Eliminate calls to default-false VectorType::get() from Linker 2020-05-29 17:43:15 -07:00
MC [MC] Pass the symbol rather than its name to onSymbolStart() 2020-06-19 09:30:12 +05:30
MCA [MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources. 2020-05-10 19:25:54 +01:00
Object [MSP430] Enable some basic support for debug information 2020-06-22 13:14:07 +03:00
ObjectYAML [DWARFYAML][debug_info] Fix array index out of bounds error 2020-06-20 15:08:24 +08:00
Option
Passes [StackSafety] Add "Must Live" logic 2020-06-18 16:53:37 -07:00
ProfileData [llvm-cov gcov] Support clang<11 fake 4.2 format 2020-06-17 10:17:15 -07:00
Remarks YAMLRemarkParser.cpp - remove duplicate RemarkParser.h include. NFC. 2020-06-08 13:59:05 +01:00
Support As part of using inclusive language within the llvm project, 2020-06-20 00:24:57 -07:00
TableGen Fix ubsan error in tblgen with signed left shift 2020-06-16 11:15:09 -07:00
Target [MSP430] Enable some basic support for debug information 2020-06-22 13:14:07 +03:00
Testing
TextAPI [llvm][llvm-nm] add TextAPI/MachO support 2020-06-11 18:54:16 -07:00
ToolDrivers [COFF] Use Expected in COFFObjectFile creation 2020-05-08 14:22:28 -07:00
Transforms [DSE,MSSA] Remove unused arguments for isDSEBarrier (NFC). 2020-06-22 10:58:53 +01:00
WindowsManifest
XRay [xray] Add llvm-xray extract support for 32 bit ARM 2020-05-28 18:41:11 -04:00
CMakeLists.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
LLVMBuild.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00