This means we can inspect and print function parameters in GDB.
Before:
user@server:/tmp/tmp.gPOktVHa0q/test-files$ gdb --args /scratch/user/llvm-17/opt/bin/lli -jit-kind=mcjit hello.dbg.ll
Reading symbols from /scratch/user/llvm-17/opt/bin/lli...
(No debugging symbols found in /scratch/user/llvm-17/opt/bin/lli)
(gdb) set breakpoint pending on
(gdb) break hello.ll:25
No symbol table is loaded. Use the "file" command.
Breakpoint 1 (hello.ll:25) pending.
(gdb) r
Starting program: /scratch/user/llvm-17/opt/bin/lli -jit-kind=mcjit hello.dbg.ll
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, foo () at hello.ll:25
25 %add = add nsw i32 %0, 1
(gdb)
after:
user@server:/tmp/tmp.gPOktVHa0q/test-files$ gdb --args /scratch/user/llvm-17/opt/bin/lli -jit-kind=mcjit hello.dbg.ll
Reading symbols from /scratch/user/llvm-17/opt/bin/lli...
(No debugging symbols found in /scratch/user/llvm-17/opt/bin/lli)
(gdb) set breakpoint pending on
(gdb) break hello.ll:25
No symbol table is loaded. Use the "file" command.
Breakpoint 1 (hello.ll:25) pending.
(gdb) r
Starting program: /scratch/user/llvm-17/opt/bin/lli -jit-kind=mcjit hello.dbg.ll
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, foo (a=100, s.coerce=421973825946) at hello.ll:25
25 %add = add nsw i32 %0, 1
(gdb) p a
$1 = 100
This means we can inspect and print function parameters in GDB.
Before:
after: