Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug info for pre-compiled code #5354

Closed
JeffBezanson opened this issue Jan 10, 2014 · 11 comments
Closed

debug info for pre-compiled code #5354

JeffBezanson opened this issue Jan 10, 2014 · 11 comments
Labels
regression Regression in behavior compared to a previous version system:windows Affects only Windows
Milestone

Comments

@JeffBezanson
Copy link
Member

The static compilation process doesn't save all of our debug info. I hope in the near future we will handle this using the DWARF data, but for now we could just dump our table of line numbers and offsets.

For example:

julia> include("notfound")
ERROR: could not open file /home/jeff/src/julia2/julia/notfound

julia> 

After removing sys.so:

julia> include("notfound")
ERROR: could not open file /home/jeff/src/julia2/julia/notfound
 in include at boot.jl:240

julia> 
@jiahao
Copy link
Member

jiahao commented Jan 10, 2014

Keno/DWARF.jl@b59079a

@ivarne
Copy link
Member

ivarne commented Jan 10, 2014

This also breaks the helpful message for DomainError for sqrt(-1), because the backtrace does not contain the address of the sqrt function.

@vtjnash
Copy link
Member

vtjnash commented Jan 12, 2014

Presumably, the sys.bc file (and therefore the sys.so file) could contain the file/line number information without doing anything special?

@Keno
Copy link
Member

Keno commented Jan 12, 2014

I'm actually not sure why it doesn't. The module still has it just before emitting it. Are we actively stripping debug info somewhere?

@JeffBezanson
Copy link
Member Author

We look for line number info in our own map built by a JIT event listener.

@Keno
Copy link
Member

Keno commented Jan 12, 2014

Fair enough, but that doesn't explain why sys.bc doesn't contain any debug info, even though it's in the source module.

@Keno
Copy link
Member

Keno commented Jan 24, 2014

I'll have a look at what LLVM gives us.

@vtjnash
Copy link
Member

vtjnash commented Jan 25, 2014

I thought this was already fixed (see for example #5502)

@Keno
Copy link
Member

Keno commented Jan 25, 2014

We still don't do it for our own backtraces. We still need to read in the DWARF info.

@ihnorton
Copy link
Member

ihnorton commented Apr 1, 2014

What should be done with the reloaded info? It seems awkward - but possible - to put it back into the JITEvent_EmittedFunctionDetails::LineStart / DebugLoc format. Any other ideas?

@ihnorton
Copy link
Member

This is fixed for mac and linux in c77e098. Tabled for now on Windows, see discussion in 6490.

@ihnorton ihnorton modified the milestones: 0.4, 0.3 Apr 16, 2014
@vtjnash vtjnash closed this as completed Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version system:windows Affects only Windows
Projects
None yet
Development

No branches or pull requests

6 participants