Open sun-jacobi opened 7 months ago
First run the command with -###
to get the verbose version of the program.
Then simply lldb -- [VERBOSE COMMAND]
.
Otherwise the child process created by clang would not be debugged
Since llvm uses code generation, it is hard to use debugger with it. it is much more efficient to debug with the output.
Here is some useful options for output useful information.
--print-after-isel
: show the result of Instruction Selection <- espescially useful
-view-dag-combine1-dags
-view-legalize-dags
-view-dag-combine2-dags
-view-isel-dags
-view-sched-dags
dump()
Even though debuggers not work with llvm, it is also useful to use debugger to check the local logic.
When using debugger, dump()
method for many classes is very useful.
FYI: https://github.com/sun-jacobi/llvm-script