[Lldb-commits] [PATCH] D96634: [lldb][JITLoaderGDB] Test debug support in llvm-jitlink

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 9 05:09:36 PST 2021


sgraenitz updated this revision to Diff 329301.
sgraenitz added a comment.

For the entry point, prefer lli over llvm-jitlink. D97339 <https://reviews.llvm.org/D97339> added debug support for JITLink in lli.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96634

Files:
  lldb/test/Shell/Breakpoint/jit-loader_jitlink_elf.test
  lldb/test/Shell/Breakpoint/jit-loader_rtdyld_elf.test
  lldb/test/Shell/Breakpoint/jitbp_elf.test


Index: lldb/test/Shell/Breakpoint/jit-loader_rtdyld_elf.test
===================================================================
--- lldb/test/Shell/Breakpoint/jit-loader_rtdyld_elf.test
+++ lldb/test/Shell/Breakpoint/jit-loader_rtdyld_elf.test
@@ -1,11 +1,21 @@
 # REQUIRES: target-x86_64
 # XFAIL: system-windows
 
-# RUN: %clang -g -S -emit-llvm --target=x86_64-unknown-unknown-elf -o %t.ll %p/Inputs/jitbp.cpp
-# RUN: %lldb -b -o 'settings set plugin.jit-loader.gdb.enable on' -o 'b jitbp' -o 'run -jit-kind=mcjit %t.ll' lli | FileCheck %s
+# RuntimeDyld can be used to link and load emitted code for both, MCJIT and Orc.
+#
+# RUN: %clang -g -S -emit-llvm --target=x86_64-unknown-unknown-elf \
+# RUN:        -o %t.ll %p/Inputs/jitbp.cpp
+#
+# RUN: %lldb -b -o 'settings set plugin.jit-loader.gdb.enable on' -o 'b jitbp' \
+# RUN:          -o 'run --jit-kind=mcjit %t.ll' \
+# RUN:          lli | FileCheck %s
+#
+# RUN: %lldb -b -o 'settings set plugin.jit-loader.gdb.enable on' -o 'b jitbp' \
+# RUN:          -o 'run --jit-kind=orc-lazy --per-module-lazy --jit-linker=rtdyld %t.ll' \
+# RUN:          lli | FileCheck %s
 
 # CHECK: Breakpoint 1: no locations (pending).
-# CHECK: (lldb) run -jit-kind=mcjit {{.*}}/jitbp_elf.test.tmp.ll
+# CHECK: (lldb) run {{.*}}
 # CHECK: Process {{.*}} stopped
 # CHECK: JIT(0x{{.*}})`jitbp() at jitbp.cpp:1:15
 # CHECK: -> 1    int jitbp() { return 0; }
Index: lldb/test/Shell/Breakpoint/jit-loader_jitlink_elf.test
===================================================================
--- lldb/test/Shell/Breakpoint/jit-loader_jitlink_elf.test
+++ lldb/test/Shell/Breakpoint/jit-loader_jitlink_elf.test
@@ -1,11 +1,16 @@
 # REQUIRES: target-x86_64
 # XFAIL: system-windows
 
-# RUN: %clang -g -S -emit-llvm --target=x86_64-unknown-unknown-elf -o %t.ll %p/Inputs/jitbp.cpp
-# RUN: %lldb -b -o 'settings set plugin.jit-loader.gdb.enable on' -o 'b jitbp' -o 'run -jit-kind=mcjit %t.ll' lli | FileCheck %s
+# JITLink is the Orc-specific JIT linker implementation.
+#
+# RUN: %clang -g -S -emit-llvm -fPIC --target=x86_64-unknown-unknown-elf \
+# RUN:        -o %t.ll %p/Inputs/jitbp.cpp
+# RUN: %lldb -b -o 'settings set plugin.jit-loader.gdb.enable on' -o 'b jitbp' \
+# RUN:          -o 'run --jit-kind=orc-lazy --per-module-lazy --jit-linker=jitlink %t.ll' \
+# RUN:          lli | FileCheck %s
 
 # CHECK: Breakpoint 1: no locations (pending).
-# CHECK: (lldb) run -jit-kind=mcjit {{.*}}/jitbp_elf.test.tmp.ll
+# CHECK: (lldb) run {{.*}}
 # CHECK: Process {{.*}} stopped
 # CHECK: JIT(0x{{.*}})`jitbp() at jitbp.cpp:1:15
 # CHECK: -> 1    int jitbp() { return 0; }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96634.329301.patch
Type: text/x-patch
Size: 2609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210309/e8c0fafb/attachment.bin>


More information about the lldb-commits mailing list