JDK-8058345 : Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-09-12
  • Updated: 2015-09-29
  • Resolved: 2014-09-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u60Fixed 9 b34Fixed
Related Reports
Relates :  
Description
In the hs_err files we have a nice mixed stack trace which contains both, Java and native frames.
It would be nice if we could make this functionality available from within gdb during debugging sessions.

This can be easily achieved by refactoring the corresponding code from VMError::report() in vmError.cpp into it own method in debug.cpp.

With another helper function which creates a frame object, we can then get a mixed stack trace in gdb as follows:

Linux/amd64
call pns(make_frame($sp, $rbp, $pc))

Linux/i586
call pns(make_frame($sp, $ebp, $pc))

Linux/ppc64
call pns(make_frame($sp, $pc))