comparison agent/src/os/solaris/proc/saproc.cpp @ 529:8db2b3e46c38

6786948: SA on core file fails on solaris-amd64 if vm started with -XX:+StartAttachListener Reviewed-by: jjh, dcubed
author swamyv
date Wed, 14 Jan 2009 19:45:01 -0800
parents a61af66fc99e
children 0fbdb4381b99
comparison
equal deleted inserted replaced
524:c9004fe53695 529:8db2b3e46c38
500 500
501 // Ignore the rest of the FileMapHeader. We don't need those fields here. 501 // Ignore the rest of the FileMapHeader. We don't need those fields here.
502 }; 502 };
503 503
504 static bool 504 static bool
505 read_int(struct ps_prochandle* ph, psaddr_t addr, int* pvalue) { 505 read_jboolean(struct ps_prochandle* ph, psaddr_t addr, jboolean* pvalue) {
506 int i; 506 jboolean i;
507 if (ps_pread(ph, addr, &i, sizeof(i)) == PS_OK) { 507 if (ps_pread(ph, addr, &i, sizeof(i)) == PS_OK) {
508 *pvalue = i; 508 *pvalue = i;
509 return true; 509 return true;
510 } else { 510 } else {
511 return false; 511 return false;
573 if (useSharedSpacesAddr == 0) { 573 if (useSharedSpacesAddr == 0) {
574 THROW_NEW_DEBUGGER_EXCEPTION_("can't find 'UseSharedSpaces' flag\n", 1); 574 THROW_NEW_DEBUGGER_EXCEPTION_("can't find 'UseSharedSpaces' flag\n", 1);
575 } 575 }
576 576
577 // read the value of the flag "UseSharedSpaces" 577 // read the value of the flag "UseSharedSpaces"
578 int value = 0; 578 // Since hotspot types are not available to build this library. So
579 if (read_int(ph, useSharedSpacesAddr, &value) != true) { 579 // equivalent type "jboolean" is used to read the value of "UseSharedSpaces"
580 // which is same as hotspot type "bool".
581 jboolean value = 0;
582 if (read_jboolean(ph, useSharedSpacesAddr, &value) != true) {
580 THROW_NEW_DEBUGGER_EXCEPTION_("can't read 'UseSharedSpaces' flag", 1); 583 THROW_NEW_DEBUGGER_EXCEPTION_("can't read 'UseSharedSpaces' flag", 1);
581 } else if (value == 0) { 584 } else if ((int)value == 0) {
582 print_debug("UseSharedSpaces is false, assuming -Xshare:off!\n"); 585 print_debug("UseSharedSpaces is false, assuming -Xshare:off!\n");
583 return 1; 586 return 1;
584 } 587 }
585 588
586 char classes_jsa[PATH_MAX]; 589 char classes_jsa[PATH_MAX];