[all-commits] [llvm/llvm-project] f47ff8: [lli] Test debug support in RuntimeDyld with built...

Stefan Gränitz via All-commits all-commits at lists.llvm.org
Tue Mar 2 01:40:02 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f47ff8cff1ede6ee017f4948f25a14e63de18612
      https://github.com/llvm/llvm-project/commit/f47ff8cff1ede6ee017f4948f25a14e63de18612
  Author: Stefan Gränitz <stefan.graenitz at gmail.com>
  Date:   2021-03-02 (Tue, 02 Mar 2021)

  Changed paths:
    A llvm/test/ExecutionEngine/OrcLazy/debug-descriptor-elf-minimal.ll
    A llvm/test/ExecutionEngine/OrcLazy/debug-objects-elf-minimal.ll
    M llvm/tools/lli/CMakeLists.txt
    A llvm/tools/lli/ExecutionUtils.cpp
    A llvm/tools/lli/ExecutionUtils.h
    M llvm/tools/lli/lli.cpp

  Log Message:
  -----------
  [lli] Test debug support in RuntimeDyld with built-in functions

When lli runs the below IR, it emits in-memory debug objects and registers them with the GDB JIT interface. The tests dump and check the registered information. IR has limited ability to produce complex output in a portable way. Instead the tests rely on built-in functions implemented in lli. They use a new command line flag `-generate=function-name` to instruct the ORC JIT to expose the built-in function with the given name to the JITed program.

`debug-descriptor-elf-minimal.ll` calls `__dump_jit_debug_descriptor()` to reflect the list of debug entries issued for itself after emitting the main module. The output is textual and can be checked straight away.

`debug-objects-elf-minimal.ll` calls `__dump_jit_debug_objects()`, which instructs lli to walk through the list of debug entries and append the encountered in-memory objects to the program output. We feed this output into llvm-dwarfdump to parse the DWARF in each file and dump their structures.

We can do the same for JITLink once D97335 has landed.

Reviewed By: lhames

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




More information about the All-commits mailing list