Repository navigation
Add debug infomation support based on datamodel. - #7177
Conversation
2d63784 to
1e3e9d4
Compare
This: * Adds a new env var ``NUMBA_EXTEND_VARIABLE_LIFETIMES`` which when set extends the lifetime of variables to the end of the block in which their lifetime ends. * Fixes up the Dels and their location information in the case of the above being set. * Wires the above into the post processor call in the legalizer. The legalizer is the only place which should change the variable life times as it is the last thing that is executed in the pipeline before lowering. Changing the lifetimes in general will break optimisation passes that rely on lifetime analysis via Del nodes. Fixes numba#7420
As title
As title.
This adds testing of the DWARF emission with gdb. It uses the gdb machine interface wrapped in pexpect to assert interaction behaviours. Some minor refactoring of the original gdb support is made to keep the gdb helper functions all in one place (the new gdb_support.py).
As title
|
8a7a77b failed on windows 64 py 37 np 117, doesn't seem related but capturing the output: |
|
@sklam have merged in mainline so as to test with the changes to name mangling. |
|
https://github.com/sklam/numba/tree/wip/dwarf_like_c fixes the GDB breakpoint stopping at function def line ( |
Thanks @sklam, well found! I've a couple of other fixes along with this to make the code gen match more what would be generated from C too. Think I'll combine with those and hopefully this issue will be resolved. |
As title
As title.
As title
sklam
left a comment
There was a problem hiding this comment.
Everything looks good. The improved GDB support will be a great help for users and developers to understand the emitted code.
|
I think we just need to verify that we didn't break cuda-gdb |
sklam
left a comment
There was a problem hiding this comment.
cuda NvvmDIBuilder has became out-of-sync with the usage
I think we should get rid of it - NVVM uses the normal DIBuilder for NVVM 7. I seem to recall we don't support debug with NVVM 3.4 anymore, but will check if that was something in an unmerged PR. |
|
d8ef5b1 fixes the debuginfo emission for the CUDA target. |
|
Checking buildfarm: |
|
Buildfarm passed. Manually confirmed execution of GDB test. |
This:
DataModelby emitting information to make them appear as structures.decrefcalls at the end of basic blocks were having line information associated with them from the variable declaration site.Impact of 1. (and 2.!, to sort the lineinfo out) is demonstrated in the following:
then running the above under
gdb:Note that:
whatison the variables will yield their Numba typing domain typereprand also their datamodel layout in LLVM IR.