Mercurial > hg > graal-jvmci-8
comparison src/os/linux/vm/decoder_linux.cpp @ 14460:8a9bb7821e28
Merge
author | kvn |
---|---|
date | Wed, 19 Feb 2014 12:08:49 -0800 |
parents | e7cbc95179c4 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14360:e8ef156f0bc9 | 14460:8a9bb7821e28 |
---|---|
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 | |
35 // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small, | 41 // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small, |
36 // __cxa_demangle will call system "realloc" for additional memory, which | 42 // __cxa_demangle will call system "realloc" for additional memory, which |
37 // may use different malloc/realloc mechanism that allocates 'buf'. | 43 // may use different malloc/realloc mechanism that allocates 'buf'. |
38 if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) { | 44 if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) { |
39 jio_snprintf(buf, buflen, "%s", result); | 45 jio_snprintf(buf, buflen, "%s", result); |