* dladdr() apparently should work on any symbol, not just functions. This
closes bug #6491. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38373 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2008, Ingo Weinhold, [email protected].
|
||||
* Copyright 2003-2008, Axel Dörfler, [email protected].
|
||||
* Copyright 2003-2010, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2002, Manuel J. Petit. All rights reserved.
|
||||
@@ -107,9 +107,7 @@ dladdr(void *addr, Dl_info *info)
|
||||
while (get_nth_image_symbol(imageInfo.id, symIndex, curSymName,
|
||||
&symNameLength, &symType, &symLocation) == B_OK) {
|
||||
// check if symbol is the nearest until now
|
||||
if (symType == B_SYMBOL_TYPE_TEXT
|
||||
&& symLocation <= addr
|
||||
&& symLocation >= info->dli_saddr) {
|
||||
if (symLocation <= addr && symLocation >= info->dli_saddr) {
|
||||
strlcpy(symName, curSymName, NAME_MAX);
|
||||
info->dli_saddr = symLocation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user