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

[PPC] implement enter_interpreter_frame #26772

Merged
merged 1 commit into from
Apr 19, 2018
Merged

Conversation

vchuravy
Copy link
Member

This fixes parts of #26250, by implementing enter_interpreter_frame on PPC.

During the implementation I followed the PPC ELFv2 ABI as documented in 1.
I am not a 100% sure about the cfi directives, but GDB can now construct a proper
backtrace from enter_interpreter_frame.

This still doesn't pass the test for #23971

julia> let 
              for i = 1:1
                   global bt23971 = backtrace()
              end
         end

On PPC64:

julia> st = stacktrace(bt23971)
7-element Array{Base.StackTraces.StackFrame,1}:
 backtrace() at stacktraces.jl:189                                       
 top-level scope at REPL[1]:3                                            
 eval at boot.jl:317 [inlined]                                           
 eval(::Module, ::Expr) at REPL.jl:5                                     
 eval_user_input(::Any, ::REPL.REPLBackend) at REPL.jl:85                
 macro expansion at REPL.jl:116 [inlined]                                
 (::getfield(REPL, Symbol("##28#29")){REPL.REPLBackend})() at event.jl:92

On x86-64:

julia> st = stacktrace(bt23971)
6-element Array{Base.StackTraces.StackFrame,1}:
 top-level scope at REPL[1]:3                                            
 eval at boot.jl:309 [inlined]                                           
 eval(::Module, ::Expr) at REPL.jl:5                                     
 eval_user_input(::Any, ::REPL.REPLBackend) at REPL.jl:86                
 macro expansion at REPL.jl:117 [inlined]                                
 (::getfield(REPL, Symbol("##28#29")){REPL.REPLBackend})() at event.jl:92

Note the spurious backtrace on PPC. If anybody has an idea what part I am missing that would be appreciated!

@vchuravy vchuravy requested a review from Keno April 10, 2018 18:15
@vchuravy
Copy link
Member Author

Ok I think this implementation is correct and what I am seeing with backtrace is not related.

@vchuravy vchuravy merged commit 5912b14 into master Apr 19, 2018
@vchuravy vchuravy deleted the vc/ppc_interpreter_stacktrace branch April 19, 2018 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant