comparison src/os/linux/vm/decoder_linux.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents e7cbc95179c4
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
30 bool ElfDecoder::demangle(const char* symbol, char *buf, int buflen) { 30 bool ElfDecoder::demangle(const char* symbol, char *buf, int buflen) {
31 int status; 31 int status;
32 char* result; 32 char* result;
33 size_t size = (size_t)buflen; 33 size_t size = (size_t)buflen;
34 34
35 #ifdef PPC64
36 // On PPC64 ElfDecoder::decode() may return a dot (.) prefixed name
37 // (see elfFuncDescTable.hpp for details)
38 if (symbol && *symbol == '.') symbol += 1;
39 #endif
40
41 // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small, 35 // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small,
42 // __cxa_demangle will call system "realloc" for additional memory, which 36 // __cxa_demangle will call system "realloc" for additional memory, which
43 // may use different malloc/realloc mechanism that allocates 'buf'. 37 // may use different malloc/realloc mechanism that allocates 'buf'.
44 if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) { 38 if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) {
45 jio_snprintf(buf, buflen, "%s", result); 39 jio_snprintf(buf, buflen, "%s", result);