mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 05:45:11 +02:00
Merge
This commit is contained in:
commit
2a2b10342e
22 changed files with 223 additions and 59 deletions
|
@ -1623,7 +1623,8 @@ bool os::address_is_in_vm(address addr) {
|
|||
}
|
||||
|
||||
bool os::dll_address_to_function_name(address addr, char *buf,
|
||||
int buflen, int *offset) {
|
||||
int buflen, int *offset,
|
||||
bool demangle) {
|
||||
// buf is not optional, but offset is optional
|
||||
assert(buf != NULL, "sanity check");
|
||||
|
||||
|
@ -1632,7 +1633,7 @@ bool os::dll_address_to_function_name(address addr, char *buf,
|
|||
if (dladdr((void*)addr, &dlinfo) != 0) {
|
||||
// see if we have a matching symbol
|
||||
if (dlinfo.dli_saddr != NULL && dlinfo.dli_sname != NULL) {
|
||||
if (!Decoder::demangle(dlinfo.dli_sname, buf, buflen)) {
|
||||
if (!(demangle && Decoder::demangle(dlinfo.dli_sname, buf, buflen))) {
|
||||
jio_snprintf(buf, buflen, "%s", dlinfo.dli_sname);
|
||||
}
|
||||
if (offset != NULL) *offset = addr - (address)dlinfo.dli_saddr;
|
||||
|
@ -1641,7 +1642,7 @@ bool os::dll_address_to_function_name(address addr, char *buf,
|
|||
// no matching symbol so try for just file info
|
||||
if (dlinfo.dli_fname != NULL && dlinfo.dli_fbase != NULL) {
|
||||
if (Decoder::decode((address)(addr - (address)dlinfo.dli_fbase),
|
||||
buf, buflen, offset, dlinfo.dli_fname)) {
|
||||
buf, buflen, offset, dlinfo.dli_fname, demangle)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue