[llvm-dev] Debugging LowerTypeTests in LLVM Using GDB

Shishir V Jessu via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 30 12:41:32 PDT 2019


Hi,

I am looking into Control-Flow Integrity for indirect function calls,
implemented with jump tables. I want to step through the code that produces
these jump tables in GDB. I have built clang and opt from source with
debugging symbols. I believe this code lives in
llvm/lib/Transforms/LowerTypeTests.cpp, but when I try to debug *opt* by
running the command "run -lowertypetests cfi-icall.bc > /dev/null", I am
never able to reach this file.

Also, I have tried to debug the command "clang -flto -fsanitize=cfi-icall
indirect.c -o indirect" (where indirect.c is a C file containing an
indirect call), and am able to see the CFI jump tables in the resulting
assembly, but I cannot reach the code that produces these jump tables in
GDB. Am I targeting the wrong code for these changes, or is there something
more I need in order to run through this code in GDB? Thanks for your help!

Shishir Jessu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190930/2a8594de/attachment.html>


More information about the llvm-dev mailing list