hotspot Udiff src/os/linux/vm/os_linux.cpp (original) (raw)
@@ -4890,11 +4890,11 @@
void PcFetcher::do_task(const os::SuspendedThreadTaskContext& context) { Thread* thread = context.thread(); OSThread* osthread = thread->osthread(); if (osthread->ucontext() != NULL) {
- _epc = os::Linux::ucontext_get_pc((ucontext_t *) context.ucontext());
- _epc = os::Posix::ucontext_get_pc((ucontext_t *) context.ucontext());
} else { // NULL context is unexpected, double-check this is the VMThread guarantee(thread->is_VM_thread(), "can only be called for VMThread"); } }
@@ -5997,10 +5997,35 @@ }
return strlen(buffer); }
+int os::Posix::unblock_signals(const sigset_t *set) {
- return pthread_sigmask(SIG_UNBLOCK, set, NULL); +}
- +void os::formatDebugMessage(char* buf, int buflen) {
- jio_snprintf(buf, buflen,
"\n\n"
"Do you want to debug the problem?\n\n"
"To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " UINTX_FORMAT " (" INTPTR_FORMAT ")\n"
"Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
"Otherwise, press RETURN to abort...",
os::current_process_id(), os::current_process_id(),
os::current_thread_id(), os::current_thread_id());
+} + +void os::startDebugging() {
char buf[80];
jio_snprintf(buf, 80, "gdb /proc/%d/exe %d",
os::current_process_id(), os::current_process_id());
os::fork_and_exec(buf); +}
/////////////// Unit tests ///////////////
#ifndef PRODUCT
#define test_log(...) \