[PATCH] D96627: [llvm-jitlink] Implement JITLoaderGDB ObjectLinkingLayer plugin for ELF x86-64

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 12:50:23 PST 2021


sgraenitz added a comment.

This should work with the current state:

  > cat jitbp.cpp
  int jitbp() { return 0; }
  int main() { return jitbp(); }
  > clang -c -g -fPIC --target=x86_64-unknown-unknown-elf -o jitbp.o jitbp.cpp
  > bin/lldb -o 'settings set plugin.jit-loader.gdb.enable on' -o 'b runAsMain' -o 'run jitbp.o' bin/llvm-jitlink
  Process 65394 stopped
  (lldb) b jitbp
  Breakpoint 2: where = JIT(0x7ffff7fcd000)`jitbp() + 6 at jitbp.cpp:1:15, address = 0x00007ffff7fce006
  (lldb) c
  Process 65394 resuming
  (lldb) Process 65394 stopped
  * thread #1, name = 'llvm-jitlink', stop reason = breakpoint 2.1
      frame #0: 0x00007ffff7fce006 JIT(0x7ffff7fcd000)`jitbp() at jitbp.cpp:1:15
  -> 1    int jitbp() { return 0; }
     2    int main() { return jitbp(); }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96627/new/

https://reviews.llvm.org/D96627



More information about the llvm-commits mailing list