Where does VMError::print_native_stack and os::get_sender_for_C_frame load/use the frame pointer?

David Holmes david.holmes at oracle.com
Mon Jul 8 08:48:52 UTC 2024


On 8/07/2024 5:59 pm, Julian Waters wrote:
> Hi David,
> 
> Ah, I think you misunderstood me, I'm aware that the frame pointer is
> saved as required by the compiler (With the exception of the Microsoft
> compiler, which doesn't save it at all). What I meant was that the
> comments in Windows code imply that VMError::print_native_stack and
> os::get_sender_for_C_frame need to use the frame pointer, yet I can't
> seem to find where or how either of them obtain the frame pointer for
> whatever they use it for on platforms and compilers where the frame
> pointer is saved (For instance, on Linux), whether through handwritten
> assembly code or some other means. It follows that if they need to use
> the frame pointer, then they must grab it from somewhere, after all

Ah sorry. AFAICS we just create the frame() objects and wallk the stack 
via those. We use fetch_frame_from_context to kick things off in the 
case of a crash.

David

> best regards,
> Julian


More information about the hotspot-dev mailing list