Skip to content

Commit b251e29

Browse files
committed
Added found flag to the function info
1 parent 488244a commit b251e29

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/functionInfo/functionInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
extern "C" {
2727
#endif
2828

29+
#include <stdbool.h>
2930
#include <stddef.h>
3031
#include <stdint.h>
3132

3233
struct functionInfo {
3334
uintptr_t begin;
3435
size_t length;
36+
bool found;
3537
};
3638

3739
struct functionInfo functionInfo_loadHint(const char* functionName, const char* libraryName);

src/functionInfo/functionInfo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ static inline bool functionInfo_getFrom(struct loadedLibInfo* info, const char*
3737

3838
file->relocationOffset = info->relocationOffset;
3939
file->inMemory = true;
40-
return file->getFunctionInfo(file, functionName, functionInfo);
40+
return functionInfo->found = file->getFunctionInfo(file, functionName, functionInfo);
4141
}
4242

4343
struct functionInfo functionInfo_loadHint(const char* functionName, const char* libraryName) {
44-
struct functionInfo toReturn = (struct functionInfo) { 0, 0 };
44+
struct functionInfo toReturn = (struct functionInfo) { 0, 0, false };
4545

4646
dlMapper_init();
4747
if (libraryName != NULL && functionInfo_getFrom(dlMapper_libInfoForFileName(libraryName), functionName, &toReturn)) {

0 commit comments

Comments
 (0)