* 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:
Axel Dörfler
2010-08-26 13:49:14 +00:00
parent 2f368a273a
commit 1e0617da2e
+2 -4
View File
@@ -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;