mxmssh / drltrace

Drltrace is a library calls tracer for Windows and Linux applications.
BSD 3-Clause "New" or "Revised" License
387 stars 65 forks source link

Add -filter to specify whitelisted/blacklisted functions #18

Closed jtesta closed 4 years ago

jtesta commented 4 years ago

Having a whitelist/blacklist functionality makes analysis much easier. Whitelisted functions can be quickly added to try to zero in on interesting functions, while blacklisted functions can be used to filter out noise.

Thoughts?

jtesta commented 4 years ago

Well, I seem to be a bit stuck since I'm not very experienced with cmake. Its giving the following error when building with MSVC:

C:/projects/drltrace/build/bin/drltracelib.exp
drltrace.obj : error LNK2019: unresolved external symbol "int __cdecl fast_strcmp(char *,unsigned int,char *,unsigned int)" (?fast_strcmp@@YAHPADI0I@Z) referenced in function "void __cdecl lib_entry(void *,void * *)" (?lib_entry@@YAXPAXPAPAX@Z) [C:\projects\drltrace\build\drltracelib.vcxproj]
C:\projects\drltrace\build\bin\drltracelib.dll : fatal error LNK1120: 1 unresolved externals

It would appear that this is a problem because drltracelib isn't linked against drltrace_utils.cpp. However, I see this in CMakeLists.txt:293:

set(srcs
    drltrace.cpp
    drltrace_libcalls.cpp
    drltrace_options.cpp
    drltrace_utils.cpp)

I'm not sure why the MSVC linker is failing.

jtesta commented 4 years ago

Ahh, thanks. Ok, the build checks all pass now!