hotspot/src/os/aix/vm/os_aix.cpp
changeset 34305 e399e6b44631
parent 34145 f8097485b483
child 34621 7676bec20997
equal deleted inserted replaced
34234:e4a23d294f48 34305:e399e6b44631
  3783 }
  3783 }
  3784 
  3784 
  3785 void os::print_statistics() {
  3785 void os::print_statistics() {
  3786 }
  3786 }
  3787 
  3787 
  3788 int os::message_box(const char* title, const char* message) {
  3788 bool os::message_box(const char* title, const char* message) {
  3789   int i;
  3789   int i;
  3790   fdStream err(defaultStream::error_fd());
  3790   fdStream err(defaultStream::error_fd());
  3791   for (i = 0; i < 78; i++) err.print_raw("=");
  3791   for (i = 0; i < 78; i++) err.print_raw("=");
  3792   err.cr();
  3792   err.cr();
  3793   err.print_raw_cr(title);
  3793   err.print_raw_cr(title);
  4912 #ifndef PRODUCT
  4912 #ifndef PRODUCT
  4913 void TestReserveMemorySpecial_test() {
  4913 void TestReserveMemorySpecial_test() {
  4914   // No tests available for this platform
  4914   // No tests available for this platform
  4915 }
  4915 }
  4916 #endif
  4916 #endif
       
  4917 
       
  4918 bool os::start_debugging(char *buf, int buflen) {
       
  4919   int len = (int)strlen(buf);
       
  4920   char *p = &buf[len];
       
  4921 
       
  4922   jio_snprintf(p, buflen -len,
       
  4923                  "\n\n"
       
  4924                  "Do you want to debug the problem?\n\n"
       
  4925                  "To debug, run 'dbx -a %d'; then switch to thread tid " INTX_FORMAT ", k-tid " INTX_FORMAT "\n"
       
  4926                  "Enter 'yes' to launch dbx automatically (PATH must include dbx)\n"
       
  4927                  "Otherwise, press RETURN to abort...",
       
  4928                  os::current_process_id(),
       
  4929                  os::current_thread_id(), thread_self());
       
  4930 
       
  4931   bool yes = os::message_box("Unexpected Error", buf);
       
  4932 
       
  4933   if (yes) {
       
  4934     // yes, user asked VM to launch debugger
       
  4935     jio_snprintf(buf, buflen, "dbx -a %d", os::current_process_id());
       
  4936 
       
  4937     os::fork_and_exec(buf);
       
  4938     yes = false;
       
  4939   }
       
  4940   return yes;
       
  4941 }