< prev index next >

src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp

Print this page
rev 47491 : 8185712: [windows] Improve native symbol decoder
Reviewed-by: goetz, iklam, zgu

@@ -48,10 +48,11 @@
 #include "runtime/osThread.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/timer.hpp"
+#include "symbolengine.hpp"
 #include "unwind_windows_x86.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
 #include "windbghelp.hpp"
 

@@ -395,10 +396,16 @@
       } else {
         // Don't try to create a frame(sp, fp, pc) -- on WinX64, stk.AddrFrame
         // may not contain what Java expects, and may cause the frame() constructor
         // to crash. Let's just print out the symbolic address.
         frame::print_C_frame(st, buf, buf_size, pc);
+        // print source file and line, if available
+        char buf[128];
+        int line_no;
+        if (SymbolEngine::get_source_info(pc, buf, sizeof(buf), &line_no)) {
+          st->print("  (%s:%d)", buf, line_no);
+        }
         st->cr();
       }
       lastpc = pc;
     }
 
< prev index next >