# HG changeset patch # User stuefe # Date 1449310535 18000 # Node ID b7ea5d095ef5506ed4c1d1dbfcaf62236218b558 # Parent fafb32d71489138dfb0005575739ca3626b43d35 8144192: Enhancements-to-print_siginfo-windows Summary: some small enhancement to os::print_siginfo for Windows Reviewed-by: dholmes diff -r fafb32d71489 -r b7ea5d095ef5 hotspot/src/os/windows/vm/os_windows.cpp --- a/hotspot/src/os/windows/vm/os_windows.cpp Mon Nov 16 10:58:14 2015 +0100 +++ b/hotspot/src/os/windows/vm/os_windows.cpp Sat Dec 05 05:15:35 2015 -0500 @@ -1801,24 +1801,32 @@ void os::print_siginfo(outputStream *st, void *siginfo) { EXCEPTION_RECORD* er = (EXCEPTION_RECORD*)siginfo; st->print("siginfo:"); - st->print(" ExceptionCode=0x%x", er->ExceptionCode); - - if (er->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && - er->NumberParameters >= 2) { + + char tmp[64]; + if (os::exception_name(er->ExceptionCode, tmp, sizeof(tmp)) == NULL) { + strcpy(tmp, "EXCEPTION_??"); + } + st->print(" %s (0x%x)", tmp, er->ExceptionCode); + + if ((er->ExceptionCode == EXCEPTION_ACCESS_VIOLATION || + er->ExceptionCode == EXCEPTION_IN_PAGE_ERROR) && + er->NumberParameters >= 2) { switch (er->ExceptionInformation[0]) { case 0: st->print(", reading address"); break; case 1: st->print(", writing address"); break; + case 8: st->print(", data execution prevention violation at address"); break; default: st->print(", ExceptionInformation=" INTPTR_FORMAT, er->ExceptionInformation[0]); } st->print(" " INTPTR_FORMAT, er->ExceptionInformation[1]); - } else if (er->ExceptionCode == EXCEPTION_IN_PAGE_ERROR && - er->NumberParameters >= 2 && UseSharedSpaces) { - FileMapInfo* mapinfo = FileMapInfo::current_info(); - if (mapinfo->is_in_shared_space((void*)er->ExceptionInformation[1])) { - st->print("\n\nError accessing class data sharing archive." \ - " Mapped file inaccessible during execution, " \ - " possible disk/network problem."); + + if (er->ExceptionCode == EXCEPTION_IN_PAGE_ERROR && UseSharedSpaces) { + FileMapInfo* mapinfo = FileMapInfo::current_info(); + if (mapinfo->is_in_shared_space((void*)er->ExceptionInformation[1])) { + st->print("\n\nError accessing class data sharing archive." \ + " Mapped file inaccessible during execution, " \ + " possible disk/network problem."); + } } } else { int num = er->NumberParameters;