522 static int pd_self_suspend_thread(Thread* thread);
523
524 static ExtendedPC fetch_frame_from_context(const void* ucVoid, intptr_t** sp, intptr_t** fp);
525 static frame fetch_frame_from_context(const void* ucVoid);
526 static frame fetch_frame_from_ucontext(Thread* thread, void* ucVoid);
527
528 static void breakpoint();
529 static bool start_debugging(char *buf, int buflen);
530
531 static address current_stack_pointer();
532 static address current_stack_base();
533 static size_t current_stack_size();
534
535 static void verify_stack_alignment() PRODUCT_RETURN;
536
537 static bool message_box(const char* title, const char* message);
538 static char* do_you_want_to_debug(const char* message);
539
540 // run cmd in a separate process and return its exit code; or -1 on failures
541 static int fork_and_exec(char *cmd);
542
543 // Call ::exit() on all platforms but Windows
544 static void exit(int num);
545
546 // Terminate the VM, but don't exit the process
547 static void shutdown();
548
549 // Terminate with an error. Default is to generate a core file on platforms
550 // that support such things. This calls shutdown() and then aborts.
551 static void abort(bool dump_core, void *siginfo, const void *context);
552 static void abort(bool dump_core = true);
553
554 // Die immediately, no exit hook, no abort hook, no cleanup.
555 static void die();
556
557 // File i/o operations
558 static const int default_file_open_flags();
559 static int open(const char *path, int oflag, int mode);
560 static FILE* open(int fd, const char* mode);
561 static FILE* fopen(const char* path, const char* mode);
562 static int close(int fd);
|
522 static int pd_self_suspend_thread(Thread* thread);
523
524 static ExtendedPC fetch_frame_from_context(const void* ucVoid, intptr_t** sp, intptr_t** fp);
525 static frame fetch_frame_from_context(const void* ucVoid);
526 static frame fetch_frame_from_ucontext(Thread* thread, void* ucVoid);
527
528 static void breakpoint();
529 static bool start_debugging(char *buf, int buflen);
530
531 static address current_stack_pointer();
532 static address current_stack_base();
533 static size_t current_stack_size();
534
535 static void verify_stack_alignment() PRODUCT_RETURN;
536
537 static bool message_box(const char* title, const char* message);
538 static char* do_you_want_to_debug(const char* message);
539
540 // run cmd in a separate process and return its exit code; or -1 on failures
541 static int fork_and_exec(char *cmd);
542 #if defined(LINUX)
543 static int vfork_and_exec(char *cmd);
544 #endif
545 // Call ::exit() on all platforms but Windows
546 static void exit(int num);
547
548 // Terminate the VM, but don't exit the process
549 static void shutdown();
550
551 // Terminate with an error. Default is to generate a core file on platforms
552 // that support such things. This calls shutdown() and then aborts.
553 static void abort(bool dump_core, void *siginfo, const void *context);
554 static void abort(bool dump_core = true);
555
556 // Die immediately, no exit hook, no abort hook, no cleanup.
557 static void die();
558
559 // File i/o operations
560 static const int default_file_open_flags();
561 static int open(const char *path, int oflag, int mode);
562 static FILE* open(int fd, const char* mode);
563 static FILE* fopen(const char* path, const char* mode);
564 static int close(int fd);
|