fix prevent violation
authorwoojin <woojin2.jung@samsung.com>
Sat, 13 Apr 2013 00:56:09 +0000 (09:56 +0900)
committerwoojin <woojin2.jung@samsung.com>
Sat, 13 Apr 2013 00:56:09 +0000 (09:56 +0900)
Change-Id: I0d456d22c7a07ebd97ec93e304279a5c2f4e6496

25 files changed:
helper/dahelper.c
helper/libdaprobe.c
include/dahelper.h
include/daprobe.h
include/osp_probe.h
probe_badaapi/bada_file.cpp
probe_badaapi/bada_lifecycle.cpp
probe_badaapi/bada_sync.cpp
probe_badaapi/bada_thread.cpp
probe_badaapi/osp_constructor.cpp
probe_badaapi/osp_controls.cpp
probe_event/gesture.cpp
probe_event/keytouch.c
probe_file/da_io.h
probe_file/da_io_posix.c
probe_file/da_io_stdc.c
probe_socket/libdasocket.c
probe_third/libdaemon.c
probe_thread/libdasync.c
probe_thread/libdathread.c
probe_tizenapi/tizen_appfw.c
probe_ui/osp_capture.cpp
probe_ui/osp_display.cpp
probe_ui/osp_scenemanager.cpp
probe_ui/tizen_capture.c

index d4fddd8..e8ed505 100755 (executable)
 \r
 #include "dahelper.h"\r
 \r
+char *lib_string[NUM_ORIGINAL_LIBRARY] = {"libc.so.6", "libpthread.so.0", \r
+       "libelementary.so", "libosp-uifw.so", "libosp-appfw.so", "libosp-web.so", \r
+       "libecore_input_evas.so.1", "libdaemon.so.0", "libcapi-appfw-application.so.0"};\r
+void *lib_handle[NUM_ORIGINAL_LIBRARY];\r
+\r
 /* trace info global variable */\r
 __traceInfo gTraceInfo =\r
 {\r
index 8ee82a1..8178a66 100755 (executable)
@@ -161,16 +161,10 @@ static int createSocket(void)
 // return 0 if caller is user binary, otherwise return 1
 static int determineCaller(char* tracestring)
 {
-       char *apppath, *substr;
+       char *substr;
 
        // determine whether saveptr (caller binary name) is user binary or not
-//     apppath = getenv("APP_PATH");
-       apppath = NULL;
-
-       if(apppath == NULL)
-               substr = strstr(tracestring, APP_INSTALL_PATH);
-       else
-               substr = strstr(tracestring, apppath);
+       substr = strstr(tracestring, APP_INSTALL_PATH);
 
        if(substr == NULL)      // not user binary
                return 1;
@@ -350,6 +344,7 @@ void __attribute__((constructor)) _init_probe()
 
 void __attribute__((destructor)) _fini_probe()
 {
+       int i;
        TRACE_STATE_SET(TS_FINIT);
 
        gTraceInfo.init_complete = -1;
@@ -375,6 +370,14 @@ void __attribute__((destructor)) _fini_probe()
 
        finalize_hash_table();
 
+       for(i = 0; i < NUM_ORIGINAL_LIBRARY; i++)
+       {
+               if(lib_handle[i] != NULL)
+               {
+                       dlclose(lib_handle[i]);
+               }
+       }
+
        TRACE_STATE_UNSET(TS_FINIT);
 }
 
@@ -832,8 +835,8 @@ bool setProbePoint(probeInfo_t* iProbe)
        return true;
 }
 
-// update heap memory size though socket
-// return 0 if size is updated though socket
+// update heap memory size through socket
+// return 0 if size is updated through socket
 // return 1 if size is updated into global variable
 int update_heap_memory_size(bool isAdd, size_t size)
 {
index ed7c90d..5f1cbbf 100755 (executable)
@@ -140,6 +140,24 @@ extern "C"{
                }                                                                                                               \
        } while(0)
 
+#define        NUM_ORIGINAL_LIBRARY    9
+
+typedef enum
+{
+       LIBC = 0,
+       LIBPTHREAD = 1,
+       LIBELEMENTARY = 2,
+       LIBOSP_UIFW = 3,
+       LIBOSP_APPFW = 4,
+       LIBOSP_WEB = 5,
+       LIBECORE_INPUT_EVAS = 6,
+       LIBDAEMON = 7,
+       LIBCAPI_APPFW_APPLICATION = 8
+} ORIGINAL_LIBRARY;
+
+extern char *lib_string[NUM_ORIGINAL_LIBRARY];
+extern void *lib_handle[NUM_ORIGINAL_LIBRARY];
+
 // type definition for global variable
 typedef struct
 {
index 651989b..b0a86ef 100644 (file)
@@ -48,6 +48,7 @@ extern "C"{
 
 #define NUM_OF_MONITOR         3
 #define DA_LOG_MAX                     4096
+#define PERROR_MSG_MAX         128
 
 #define DEFAULT_TOKEN  "`,"
 
@@ -158,12 +159,16 @@ int getBacktraceString(log_t* log, int bufsize);
                do {                                                                                                            \
                        if(!FUNCTIONPOINTER) {                                                                  \
                                probeBlockStart();                                                                      \
-                               void* lib_handle = dlopen(#SONAME, RTLD_LAZY);          \
-                               if(lib_handle == NULL) {                                                        \
-                                       perror("dlopen failed : " #SONAME );                    \
-                                       exit(0);                                                                                \
+                               if(lib_handle[SONAME] == NULL) {                                        \
+                                       lib_handle[SONAME] = dlopen(lib_string[SONAME], RTLD_LAZY);                     \
+                                       if(lib_handle[SONAME] == NULL) {                                \
+                                               char perror_msg[PERROR_MSG_MAX];                        \
+                                               sprintf(perror_msg, "dlopen failed : %s", lib_string[SONAME]);  \
+                                               perror(perror_msg);                                                     \
+                                               exit(0);                                                                        \
+                                       }                                                                                               \
                                }                                                                                                       \
-                               FUNCTIONPOINTER = dlsym(lib_handle, #FUNCNAME);         \
+                               FUNCTIONPOINTER = dlsym(lib_handle[SONAME], #FUNCNAME);         \
                                if(FUNCTIONPOINTER == NULL || dlerror() != NULL) {      \
                                        perror("dlsym failed : " #FUNCNAME);                    \
                                        exit(0);                                                                                \
index 3841f8b..baeb3f2 100755 (executable)
@@ -42,12 +42,16 @@ extern "C" {
        do {                                                                                                            \
                if(!FUNCTIONPOINTER) {                                                                  \
                        probeBlockStart();                                                                      \
-                       void* lib_handle = dlopen(#LIBNAME, RTLD_LAZY);         \
-                       if(lib_handle == NULL) {                                                        \
-                               perror("dlopen failed : " #LIBNAME );                   \
-                               exit(0);                                                                                \
+                       if(lib_handle[LIBNAME] == NULL) {                                       \
+                               lib_handle[LIBNAME] = dlopen(lib_string[LIBNAME], RTLD_LAZY);           \
+                               if(lib_handle[LIBNAME] == NULL) {                               \
+                                       char perror_msg[PERROR_MSG_MAX];                        \
+                                       sprintf(perror_msg, "dlopen failed : %s", lib_string[LIBNAME]); \
+                                       perror(perror_msg);                                                     \
+                                       exit(0);                                                                        \
+                               }                                                                                               \
                        }                                                                                                       \
-                       void* funcp = dlsym(lib_handle, #FUNCNAME);                     \
+                       void* funcp = dlsym(lib_handle[LIBNAME], #FUNCNAME);                    \
                        if(funcp == NULL || dlerror() != NULL) {                        \
                                perror("dlsym failed : " #FUNCNAME);                    \
                                exit(0);                                                                                \
index 055a21f..79b72f9 100755 (executable)
@@ -164,7 +164,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -239,7 +239,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -313,7 +313,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -384,7 +384,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -458,7 +458,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -528,7 +528,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -600,7 +600,7 @@ result File::Construct(const Tizen::Base::String& filePath,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -667,7 +667,7 @@ result File::Flush(void) {
                        exit(0);
                }
 
-               memcpy(&Flushp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Flushp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -731,7 +731,7 @@ Tizen::Base::String File::GetName(void) const{
                        exit(0);
                }
 
-               memcpy(&GetNamep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&GetNamep, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -798,7 +798,7 @@ result File::Read(Tizen::Base::String& buffer) {
                        exit(0);
                }
 
-               memcpy(&Readp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -865,7 +865,7 @@ result File::Read(Tizen::Base::ByteBuffer& buffer) {
                        exit(0);
                }
 
-               memcpy(&Readp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -931,7 +931,7 @@ int File::Read(void *buffer, int length) {
                        exit(0);
                }
 
-               memcpy(&Readp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -999,7 +999,7 @@ result File::Seek(FileSeekPosition position, long offset) {
                        exit(0);
                }
 
-               memcpy(&Seekp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Seekp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -1072,7 +1072,7 @@ int File::Tell(void) const {
                        exit(0);
                }
 
-               memcpy(&Tellp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Tellp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -1138,7 +1138,7 @@ result File::Truncate(int length) {
                        exit(0);
                }
 
-               memcpy(&Truncatep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Truncatep, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1203,7 +1203,7 @@ result File::Write(const void *buffer, int length) {
                        exit(0);
                }
 
-               memcpy(&Writep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1270,7 +1270,7 @@ result File::Write(const Tizen::Base::ByteBuffer& buffer) {
                        exit(0);
                }
 
-               memcpy(&Writep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1337,7 +1337,7 @@ result File::Write(const Tizen::Base::String& buffer) {
                        exit(0);
                }
 
-               memcpy(&Writep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1401,7 +1401,7 @@ File::~File(void) {
                        exit(0);
                }
 
-               memcpy(&FileDp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&FileDp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1500,7 +1500,7 @@ File::~File(void) {
 //                             exit(0);
 //                     }
 //
-//                     memcpy(&GetFileNamep, &tmpPtr, sizeof(&tmpPtr));
+//                     memcpy(&GetFileNamep, &tmpPtr, sizeof(tmpPtr));
 //                     probeBlockEnd();
 //             }
 //     ret = (File::(*GetFileNamep))(filePath);
index 6a93843..cf8e7aa 100755 (executable)
@@ -84,7 +84,7 @@ result UiApp::Execute(UiAppInstanceFactory pUiAppFactory,
        result ret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp7ExecuteEPFPS1_vEPKNS_4Base10Collection5IListE,
-               libosp-uifw.so, uiapp_executep);
+               LIBOSP_UIFW, uiapp_executep);
 
        probeBlockStart();
        LIFECYCLE_PROBE_BLOCK("INITIALIZING");
@@ -101,7 +101,7 @@ void _AppImpl::OnTerminate(void* user_data)
        static methodType appimpl_onterminatep;
        DECLARE_COMMON_VARIABLE;
        
-       GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppImpl11OnTerminateEPv, libosp-appfw.so, appimpl_onterminatep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppImpl11OnTerminateEPv, LIBOSP_APPFW, appimpl_onterminatep);
 
        probeBlockStart();
        LIFECYCLE_PROBE_BLOCK("TERMINATING");
@@ -116,7 +116,7 @@ void _AppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation,
        static methodType appimpl_ondeviceorientationchangedp;
        
        GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppImpl26OnDeviceOrientationChangedE24app_device_orientation_ePv,
-                       libosp-appfw.so, appimpl_ondeviceorientationchangedp);
+                       LIBOSP_APPFW, appimpl_ondeviceorientationchangedp);
 
        probeBlockStart();
        on_orientation_changed((int)orientation, false);
@@ -131,7 +131,7 @@ void _AppInfo::SetAppState(AppState appState)
        static methodType appinfo_setappstatep;
        DECLARE_COMMON_VARIABLE;
        
-       GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppInfo11SetAppStateENS0_8AppStateE, libosp-appfw.so, appinfo_setappstatep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppInfo11SetAppStateENS0_8AppStateE, LIBOSP_APPFW, appinfo_setappstatep);
 
        probeBlockStart();
        if(appState == RUNNING)
@@ -149,7 +149,7 @@ void _UiAppImpl::OnBackground(void)
        static methodType uiappimpl_onbackgroundp;
        DECLARE_COMMON_VARIABLE;
        
-       GET_REAL_FUNC_OSP(_ZN5Tizen3App10_UiAppImpl12OnBackgroundEv, libosp-uifw.so, uiappimpl_onbackgroundp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen3App10_UiAppImpl12OnBackgroundEv, LIBOSP_UIFW, uiappimpl_onbackgroundp);
 
        probeBlockStart();
        SCREENSHOT_LOCK();
@@ -165,7 +165,7 @@ void _UiAppImpl::OnForeground(void)
        static methodType uiappimpl_onforegroundp;
        DECLARE_COMMON_VARIABLE;
        
-       GET_REAL_FUNC_OSP(_ZN5Tizen3App10_UiAppImpl12OnForegroundEv, libosp-uifw.so, uiappimpl_onforegroundp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen3App10_UiAppImpl12OnForegroundEv, LIBOSP_UIFW, uiappimpl_onforegroundp);
 
        probeBlockStart();
        LIFECYCLE_PROBE_BLOCK("RUNNING");
@@ -183,7 +183,7 @@ void _UiAppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation
        static methodType uiappimpl_ondeviceorientationchangedp;
        
        GET_REAL_FUNC_OSP(_ZThn4_N5Tizen3App10_UiAppImpl26OnDeviceOrientationChangedE24app_device_orientation_e,
-                       libosp-uifw.so, uiappimpl_ondeviceorientationchangedp);
+                       LIBOSP_UIFW, uiappimpl_ondeviceorientationchangedp);
 
        probeBlockStart();
        on_orientation_changed((int)orientation, false);
index 31ddf82..3dce703 100755 (executable)
@@ -118,19 +118,21 @@ result Mutex::Create(void) {
 
        if (!Createp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime5Mutex6CreateEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex6CreateEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Mutex::Create");
                        exit(0);
                }
 
-               memcpy(&Createp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -180,19 +182,21 @@ result Mutex::Create(const Tizen::Base::String& name) {
 
        if (!Createp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime5Mutex6CreateERKNS0_6StringE");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex6CreateERKNS0_6StringE");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Mutex::Create");
                        exit(0);
                }
 
-               memcpy(&Createp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -242,19 +246,21 @@ result Mutex::Release(void) {
 
        if (!Releasep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime5Mutex7ReleaseEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex7ReleaseEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Mutex::Release");
                        exit(0);
                }
 
-               memcpy(&Releasep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Releasep, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -303,19 +309,21 @@ result Mutex::Acquire(void) {
 
        if (!Acquirep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime5Mutex7AcquireEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex7AcquireEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Mutex::Acquire");
                        exit(0);
                }
 
-               memcpy(&Acquirep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Acquirep, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -383,19 +391,21 @@ result Mutex::TryToAcquire(void) {
 
        if (!TryToAcquirep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime5Mutex12TryToAcquireEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex12TryToAcquireEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Mutex::TryToAcquire");
                        exit(0);
                }
 
-               memcpy(&TryToAcquirep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&TryToAcquirep, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -445,19 +455,21 @@ result Semaphore::Create(int count) {
 
        if (!Createp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime9Semaphore6CreateEi");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore6CreateEi");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Create");
                        exit(0);
                }
 
-               memcpy(&Createp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -507,19 +519,21 @@ result Semaphore::Create(const Tizen::Base::String& name, int count) {
 
        if (!Createp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime9Semaphore6CreateERKNS0_6StringEi");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore6CreateERKNS0_6StringEi");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Create");
                        exit(0);
                }
 
-               memcpy(&Createp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -570,19 +584,21 @@ result Semaphore::Acquire(long timeout) {
 
        if (!Acquirep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime9Semaphore7AcquireEl");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore7AcquireEl");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Acquire");
                        exit(0);
                }
 
-               memcpy(&Acquirep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Acquirep, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -650,19 +666,21 @@ result Semaphore::TryToAcquire(void) {
 
        if (!TryToAcquirep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime9Semaphore12TryToAcquireEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore12TryToAcquireEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Semaphore::TryToAcquire");
                        exit(0);
                }
 
-               memcpy(&TryToAcquirep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&TryToAcquirep, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -711,19 +729,21 @@ result Semaphore::Release(void) {
 
        if (!Releasep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime9Semaphore7ReleaseEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore7ReleaseEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Release");
                        exit(0);
                }
 
-               memcpy(&Releasep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Releasep, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -773,19 +793,21 @@ result Monitor::Construct(void) {
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime7Monitor9ConstructEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor9ConstructEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Monitor::Construct");
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -833,19 +855,21 @@ result Monitor::Enter(void) {
 
        if (!Enterp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime7Monitor5EnterEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor5EnterEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Monitor::Enter");
                        exit(0);
                }
 
-               memcpy(&Enterp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Enterp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -913,19 +937,21 @@ result Monitor::Exit(void) {
 
        if (!Exitp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime7Monitor4ExitEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor4ExitEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Monitor::Exit");
                        exit(0);
                }
 
-               memcpy(&Exitp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Exitp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -974,19 +1000,21 @@ result Monitor::Wait(void) {
 
        if (!Waitp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime7Monitor4WaitEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor4WaitEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Monitor::Wait");
                        exit(0);
                }
 
-               memcpy(&Waitp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Waitp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -1054,19 +1082,21 @@ result Monitor::Notify(void) {
 
        if (!Notifyp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime7Monitor6NotifyEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor6NotifyEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Monitor::Notify");
                        exit(0);
                }
 
-               memcpy(&Notifyp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Notifyp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -1115,19 +1145,21 @@ result Monitor::NotifyAll(void) {
 
        if (!NotifyAllp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime7Monitor9NotifyAllEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor9NotifyAllEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Monitor::NotifyAll");
                        exit(0);
                }
 
-               memcpy(&NotifyAllp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&NotifyAllp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
index 7f65697..1c35b53 100755 (executable)
@@ -145,7 +145,7 @@ private:
 //                     exit(0);
 //             }
 //
-//             memcpy(&GetThreadp, &tmpPtr, sizeof(&tmpPtr));
+//             memcpy(&GetThreadp, &tmpPtr, sizeof(tmpPtr));
 //
 //             probeBlockEnd();
 //     }
@@ -224,19 +224,21 @@ _ThreadImpl::ThreadProc(void* params) {
 
        if (!ThreadProcp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime11_ThreadImpl10ThreadProcEPv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime11_ThreadImpl10ThreadProcEPv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::ThreadProc");
                        exit(0);
                }
 
-               memcpy(&ThreadProcp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&ThreadProcp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -328,7 +330,7 @@ _ThreadImpl::ThreadProc(void* params) {
 //                     exit(0);
 //             }
 //
-//             memcpy(&Stopp, &tmpPtr, sizeof(&tmpPtr));
+//             memcpy(&Stopp, &tmpPtr, sizeof(tmpPtr));
 //
 //             probeBlockEnd();
 //     }
@@ -388,7 +390,7 @@ _ThreadImpl::ThreadProc(void* params) {
 //                     exit(0);
 //             }
 //
-//             memcpy(&Finalizep, &tmpPtr, sizeof(&tmpPtr));
+//             memcpy(&Finalizep, &tmpPtr, sizeof(tmpPtr));
 //             probeBlockEnd();
 //     }
 //
@@ -446,7 +448,7 @@ _ThreadImpl::ThreadProc(void* params) {
 //                     return;
 //             }
 //
-//             memcpy(&Threadp, &tmpPtr, sizeof(&tmpPtr));
+//             memcpy(&Threadp, &tmpPtr, sizeof(tmpPtr));
 //             probeBlockEnd();
 //     }
 //
@@ -505,7 +507,7 @@ _ThreadImpl::ThreadProc(void* params) {
 //                     exit(0);
 //             }
 //
-//             memcpy(&ThreadDp, &tmpPtr, sizeof(&tmpPtr));
+//             memcpy(&ThreadDp, &tmpPtr, sizeof(tmpPtr));
 //             probeBlockEnd();
 //     }
 //
@@ -551,19 +553,21 @@ result Thread::Sleep(long milliSeconds) {
 
        if (!Sleepp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6Thread5SleepEl");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5SleepEl");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Sleep");
                        exit(0);
                }
 
-               memcpy(&Sleepp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Sleepp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -637,19 +641,21 @@ Thread* Thread::GetCurrentThread(void) {
 
        if (!GetCurrentThreadp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6Thread16GetCurrentThreadEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread16GetCurrentThreadEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::GetCurrentThread");
                        exit(0);
                }
 
-               memcpy(&GetCurrentThreadp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&GetCurrentThreadp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -699,19 +705,21 @@ result Thread::Yield(void) {
 
        if (!Yieldp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6Thread5YieldEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5YieldEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Yield");
                        exit(0);
                }
 
-               memcpy(&Yieldp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Yieldp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -763,19 +771,21 @@ result Thread::Exit(int exitCode) {
 
        if (!Exitp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6Thread4ExitEi");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4ExitEi");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Exit");
                        exit(0);
                }
 
-               memcpy(&Exitp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Exitp, &tmpPtr, sizeof(tmpPtr));
 
                probeBlockEnd();
        }
@@ -827,14 +837,16 @@ result Thread::Construct(ThreadType threadType, long stackSize,
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
                tmpPtr =
                                dlsym(
-                                               lib_handle,
+                                               lib_handle[LIBOSP_APPFW],
                                                "_ZN5Tizen4Base7Runtime6Thread9ConstructENS1_10ThreadTypeElNS1_14ThreadPriorityE");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
@@ -842,7 +854,7 @@ result Thread::Construct(ThreadType threadType, long stackSize,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -890,19 +902,21 @@ result Thread::Construct(long stackSize, ThreadPriority priority) {
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle,
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
                                "_ZN5Tizen4Base7Runtime6Thread9ConstructElNS1_14ThreadPriorityE");
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -953,14 +967,16 @@ result Thread::Construct(const Tizen::Base::String &name, long stackSize,
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
                tmpPtr =
                                dlsym(
-                                               lib_handle,
+                                               lib_handle[LIBOSP_APPFW],
                                                "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringElNS1_14ThreadPriorityE");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
@@ -968,7 +984,7 @@ result Thread::Construct(const Tizen::Base::String &name, long stackSize,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1020,22 +1036,24 @@ result Thread::Construct(const Tizen::Base::String &name, ThreadType threadType,
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
 
                tmpPtr =
                                dlsym(
-                                               lib_handle,
+                                               lib_handle[LIBOSP_APPFW],
                                                "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringENS1_10ThreadTypeElNS1_14ThreadPriorityE");
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1086,14 +1104,16 @@ result Thread::Construct(IRunnable &target, long stackSize,
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
                tmpPtr =
                                dlsym(
-                                               lib_handle,
+                                               lib_handle[LIBOSP_APPFW],
                                                "_ZN5Tizen4Base7Runtime6Thread9ConstructERNS1_9IRunnableElNS1_14ThreadPriorityE");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
@@ -1101,7 +1121,7 @@ result Thread::Construct(IRunnable &target, long stackSize,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1152,14 +1172,16 @@ result Thread::Construct(const Tizen::Base::String &name, IRunnable &target,
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
                tmpPtr =
                                dlsym(
-                                               lib_handle,
+                                               lib_handle[LIBOSP_APPFW],
                                                "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringERNS1_9IRunnableElNS1_14ThreadPriorityE");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
@@ -1167,7 +1189,7 @@ result Thread::Construct(const Tizen::Base::String &name, IRunnable &target,
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1218,12 +1240,14 @@ result Thread::GetExitCode(int &exitCode) const {
 
        if (!GetExitCodep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle,
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
                                "_ZNK5Tizen4Base7Runtime6Thread11GetExitCodeERi");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
@@ -1231,7 +1255,7 @@ result Thread::GetExitCode(int &exitCode) const {
                        exit(0);
                }
 
-               memcpy(&GetExitCodep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&GetExitCodep, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1281,19 +1305,21 @@ const Tizen::Base::String & Thread::GetName(void) const {
 
        if (!GetNamep) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZNK5Tizen4Base7Runtime6Thread7GetNameEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZNK5Tizen4Base7Runtime6Thread7GetNameEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::GetName");
                        exit(0);
                }
 
-               memcpy(&GetNamep, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&GetNamep, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1343,19 +1369,21 @@ result Thread::Join(void) {
 
        if (!Joinp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6Thread4JoinEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4JoinEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Join");
                        exit(0);
                }
 
-               memcpy(&Joinp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Joinp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1449,7 +1477,7 @@ result Thread::Join(void) {
 //                     return null;
 //             }
 //
-//             memcpy(&Runp, &tmpPtr, sizeof(&tmpPtr));
+//             memcpy(&Runp, &tmpPtr, sizeof(tmpPtr));
 //             probeBlockEnd();
 //     }
 //
@@ -1498,19 +1526,21 @@ result Thread::Start(void) {
 
        if (!Startp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6Thread5StartEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5StartEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Start");
                        exit(0);
                }
 
-               memcpy(&Startp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Startp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1556,19 +1586,21 @@ result Thread::Stop(void) {
 
        if (!Stopp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6Thread4StopEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4StopEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::Thread::Stop");
                        exit(0);
                }
 
-               memcpy(&Stopp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Stopp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1616,19 +1648,21 @@ result EventDrivenThread::Construct(long stackSize, ThreadPriority priority) {
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle,
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
                                "_ZN5Tizen4Base7Runtime17EventDrivenThread9ConstructElNS1_14ThreadPriorityE");
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::EventDrivenThread::Construct");
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1680,14 +1714,16 @@ result EventDrivenThread::Construct(const Tizen::Base::String &name, long stackS
 
        if (!Constructp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
                tmpPtr =
                                dlsym(
-                                               lib_handle,
+                                               lib_handle[LIBOSP_APPFW],
                                                "_ZN5Tizen4Base7Runtime17EventDrivenThread9ConstructERKNS0_6StringElNS1_14ThreadPriorityE");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
@@ -1695,7 +1731,7 @@ result EventDrivenThread::Construct(const Tizen::Base::String &name, long stackS
                        exit(0);
                }
 
-               memcpy(&Constructp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
@@ -1745,19 +1781,21 @@ result EventDrivenThread::Quit() {
 
        if (!Quitp) {
                probeBlockStart();
-               void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-               if (lib_handle == NULL) {
-                       perror("dlopen failed : libosp-appfw.so");
-                       exit(0);
+               if(lib_handle[LIBOSP_APPFW] == NULL) {
+                       lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+                       if (lib_handle[LIBOSP_APPFW] == NULL) {
+                               perror("dlopen failed : libosp-appfw.so");
+                               exit(0);
+                       }
                }
-               tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime17EventDrivenThread4QuitEv");
+               tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime17EventDrivenThread4QuitEv");
 
                if (tmpPtr == NULL || dlerror() != NULL) {
                        perror("dlsym failed : Tizen::Base::Runtime::EventThread::Quit");
                        exit(0);
                }
 
-               memcpy(&Quitp, &tmpPtr, sizeof(&tmpPtr));
+               memcpy(&Quitp, &tmpPtr, sizeof(tmpPtr));
                probeBlockEnd();
        }
 
index 4481f5e..f14bc1f 100755 (executable)
@@ -29,6 +29,7 @@
  */
 
 #include "daprobe.h"
+#include "dahelper.h"
 #include "dacollection.h"
 #include "osp_probe.h"
 
@@ -60,7 +61,7 @@ Control::Control(void)
        typedef void (Control::*methodType)(void);
        static methodType control_controlp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7ControlC2Ev, libosp-uifw.so, control_controlp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7ControlC2Ev, LIBOSP_UIFW, control_controlp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Control");
@@ -74,7 +75,7 @@ Control::~Control(void)
        typedef void (Control::*methodType)(void);
        static methodType control__controlvoidp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7ControlD2Ev, libosp-uifw.so, control__controlvoidp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7ControlD2Ev, LIBOSP_UIFW, control__controlvoidp);
 
        probeBlockStart();
        del_object_hash(static_cast<void*>(this));
@@ -88,7 +89,7 @@ CustomControlBase::CustomControlBase(void)
        typedef void (CustomControlBase::*methodType)(void);
        static methodType customcontrolbase_customcontrolbasep;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui17CustomControlBaseC2Ev, libosp-uifw.so, customcontrolbase_customcontrolbasep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui17CustomControlBaseC2Ev, LIBOSP_UIFW, customcontrolbase_customcontrolbasep);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "CustomControlBase");
@@ -102,7 +103,7 @@ Container::Container(void)
        typedef void (Container::*methodType)(void);
        static methodType container_containerp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9ContainerC2Ev, libosp-uifw.so, container_containerp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9ContainerC2Ev, LIBOSP_UIFW, container_containerp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Container");
@@ -116,7 +117,7 @@ Window::Window(void)
        typedef void (Window::*methodType)(void);
        static methodType window_windowp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui6WindowC2Ev, libosp-uifw.so, window_windowp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui6WindowC2Ev, LIBOSP_UIFW, window_windowp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Window");
@@ -402,7 +403,7 @@ Animation::Animation(void)
        typedef void (Animation::*methodType)(void);
        static methodType animation_animationp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9AnimationC2Ev, libosp-uifw.so, animation_animationp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9AnimationC2Ev, LIBOSP_UIFW, animation_animationp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Animation");
@@ -416,7 +417,7 @@ Button::Button(void)
        typedef void (Button::*methodType)(void);
        static methodType button_buttonp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6ButtonC2Ev, libosp-uifw.so, button_buttonp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6ButtonC2Ev, LIBOSP_UIFW, button_buttonp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Button");
@@ -430,7 +431,7 @@ CheckButton::CheckButton(void)
        typedef void (CheckButton::*methodType)(void);
        static methodType checkbutton_checkbuttonp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11CheckButtonC2Ev, libosp-uifw.so, checkbutton_checkbuttonp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11CheckButtonC2Ev, LIBOSP_UIFW, checkbutton_checkbuttonp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "CheckButton");
@@ -444,7 +445,7 @@ ColorPicker::ColorPicker(void)
        typedef void (ColorPicker::*methodType)(void);
        static methodType colorpicker_colorpickerp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ColorPickerC2Ev, libosp-uifw.so, colorpicker_colorpickerp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ColorPickerC2Ev, LIBOSP_UIFW, colorpicker_colorpickerp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "ColorPicker");
@@ -458,7 +459,7 @@ CustomList::CustomList(void)
        typedef void (CustomList::*methodType)(void);
        static methodType customlist_customlistp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10CustomListC2Ev, libosp-uifw.so, customlist_customlistp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10CustomListC2Ev, LIBOSP_UIFW, customlist_customlistp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "CustomList");
@@ -472,7 +473,7 @@ EditArea::EditArea(void)
        typedef void (EditArea::*methodType)(void);
        static methodType editarea_editareap;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditAreaC2Ev, libosp-uifw.so, editarea_editareap);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditAreaC2Ev, LIBOSP_UIFW, editarea_editareap);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "EditArea");
@@ -486,7 +487,7 @@ EditDate::EditDate(void)
        typedef void (EditDate::*methodType)(void);
        static methodType editdate_editdatep;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditDateC2Ev, libosp-uifw.so, editdate_editdatep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditDateC2Ev, LIBOSP_UIFW, editdate_editdatep);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "EditDate");
@@ -500,7 +501,7 @@ EditField::EditField(void)
        typedef void (EditField::*methodType)(void);
        static methodType editfield_editfieldp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9EditFieldC2Ev, libosp-uifw.so, editfield_editfieldp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9EditFieldC2Ev, LIBOSP_UIFW, editfield_editfieldp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "EditField");
@@ -514,7 +515,7 @@ EditTime::EditTime(void)
        typedef void (EditTime::*methodType)(void);
        static methodType edittime_edittimep;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditTimeC2Ev, libosp-uifw.so, edittime_edittimep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditTimeC2Ev, LIBOSP_UIFW, edittime_edittimep);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "EditTime");
@@ -528,7 +529,7 @@ ExpandableEditArea::ExpandableEditArea(void)
        typedef void (ExpandableEditArea::*methodType)(void);
        static methodType expandableeditarea_expandableeditareap;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls18ExpandableEditAreaC2Ev, libosp-uifw.so, expandableeditarea_expandableeditareap);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls18ExpandableEditAreaC2Ev, LIBOSP_UIFW, expandableeditarea_expandableeditareap);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "ExpandableEditArea");
@@ -542,7 +543,7 @@ ExpandableList::ExpandableList(void)
        typedef void (ExpandableList::*methodType)(void);
        static methodType expandablelist_expandablelistp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls14ExpandableListC2Ev, libosp-uifw.so, expandablelist_expandablelistp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls14ExpandableListC2Ev, LIBOSP_UIFW, expandablelist_expandablelistp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "ExpandableList");
@@ -556,7 +557,7 @@ Footer::Footer(void)
        typedef void (Footer::*methodType)(void);
        static methodType footer_footerp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6FooterC2Ev, libosp-uifw.so, footer_footerp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6FooterC2Ev, LIBOSP_UIFW, footer_footerp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Footer");
@@ -570,7 +571,7 @@ Gallery::Gallery(void)
        typedef void (Gallery::*methodType)(void);
        static methodType gallery_galleryp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls7GalleryC2Ev, libosp-uifw.so, gallery_galleryp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls7GalleryC2Ev, LIBOSP_UIFW, gallery_galleryp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Gallery");
@@ -584,7 +585,7 @@ GroupedList::GroupedList(void)
        typedef void (GroupedList::*methodType)(void);
        static methodType groupedlist_groupedlistp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11GroupedListC2Ev, libosp-uifw.so, groupedlist_groupedlistp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11GroupedListC2Ev, LIBOSP_UIFW, groupedlist_groupedlistp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "GroupedList");
@@ -598,7 +599,7 @@ GroupedListView::GroupedListView(void)
        typedef void (GroupedListView::*methodType)(void);
        static methodType groupedlistview_groupedlistviewp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls15GroupedListViewC2Ev, libosp-uifw.so, groupedlistview_groupedlistviewp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls15GroupedListViewC2Ev, LIBOSP_UIFW, groupedlistview_groupedlistviewp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "GroupedListView");
@@ -612,7 +613,7 @@ Header::Header(void)
        typedef void (Header::*methodType)(void);
        static methodType header_headerp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6HeaderC2Ev, libosp-uifw.so, header_headerp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6HeaderC2Ev, LIBOSP_UIFW, header_headerp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Header");
@@ -626,7 +627,7 @@ IconList::IconList(void)
        typedef void (IconList::*methodType)(void);
        static methodType iconlist_iconlistp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8IconListC2Ev, libosp-uifw.so, iconlist_iconlistp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8IconListC2Ev, LIBOSP_UIFW, iconlist_iconlistp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "IconList");
@@ -640,7 +641,7 @@ IconListView::IconListView(void)
        typedef void (IconListView::*methodType)(void);
        static methodType iconlistview_iconlistviewp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12IconListViewC2Ev, libosp-uifw.so, iconlistview_iconlistviewp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12IconListViewC2Ev, LIBOSP_UIFW, iconlistview_iconlistviewp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "IconListView");
@@ -654,7 +655,7 @@ Label::Label(void)
        typedef void (Label::*methodType)(void);
        static methodType label_labelp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5LabelC2Ev, libosp-uifw.so, label_labelp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5LabelC2Ev, LIBOSP_UIFW, label_labelp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Label");
@@ -668,7 +669,7 @@ List::List(void)
        typedef void (List::*methodType)(void);
        static methodType list_listp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls4ListC2Ev, libosp-uifw.so, list_listp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls4ListC2Ev, LIBOSP_UIFW, list_listp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "List");
@@ -682,7 +683,7 @@ ListView::ListView(void)
        typedef void (ListView::*methodType)(void);
        static methodType listview_listviewp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8ListViewC2Ev, libosp-uifw.so, listview_listviewp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8ListViewC2Ev, LIBOSP_UIFW, listview_listviewp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "ListView");
@@ -696,7 +697,7 @@ Progress::Progress(void)
        typedef void (Progress::*methodType)(void);
        static methodType progress_progressp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8ProgressC2Ev, libosp-uifw.so, progress_progressp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8ProgressC2Ev, LIBOSP_UIFW, progress_progressp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Progress");
@@ -710,7 +711,7 @@ RadioGroup::RadioGroup(void)
        typedef void (RadioGroup::*methodType)(void);
        static methodType radiogroup_radiogroupp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10RadioGroupC2Ev, libosp-uifw.so, radiogroup_radiogroupp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10RadioGroupC2Ev, LIBOSP_UIFW, radiogroup_radiogroupp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "RadioGroup");
@@ -724,7 +725,7 @@ SearchBar::SearchBar(void)
        typedef void (SearchBar::*methodType)(void);
        static methodType searchbar_searchbarp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9SearchBarC2Ev, libosp-uifw.so, searchbar_searchbarp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9SearchBarC2Ev, LIBOSP_UIFW, searchbar_searchbarp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "SearchBar");
@@ -738,7 +739,7 @@ SlidableGroupedList::SlidableGroupedList(void)
        typedef void (SlidableGroupedList::*methodType)(void);
        static methodType slidablegroupedlist_slidablegroupedlistp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls19SlidableGroupedListC2Ev, libosp-uifw.so, slidablegroupedlist_slidablegroupedlistp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls19SlidableGroupedListC2Ev, LIBOSP_UIFW, slidablegroupedlist_slidablegroupedlistp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "SlidableGroupedList");
@@ -752,7 +753,7 @@ SlidableList::SlidableList(void)
        typedef void (SlidableList::*methodType)(void);
        static methodType slidablelist_slidablelistp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12SlidableListC2Ev, libosp-uifw.so, slidablelist_slidablelistp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12SlidableListC2Ev, LIBOSP_UIFW, slidablelist_slidablelistp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "SlidableList");
@@ -766,7 +767,7 @@ Slider::Slider(void)
        typedef void (Slider::*methodType)(void);
        static methodType slider_sliderp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6SliderC2Ev, libosp-uifw.so, slider_sliderp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6SliderC2Ev, LIBOSP_UIFW, slider_sliderp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Slider");
@@ -780,7 +781,7 @@ SplitPanel::SplitPanel(void)
        typedef void (SplitPanel::*methodType)(void);
        static methodType splitpanel_splitpanelp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10SplitPanelC2Ev, libosp-uifw.so, splitpanel_splitpanelp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10SplitPanelC2Ev, LIBOSP_UIFW, splitpanel_splitpanelp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "SplitPanel");
@@ -794,7 +795,7 @@ Tab::Tab(void)
        typedef void (Tab::*methodType)(void);
        static methodType tab_tabp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls3TabC2Ev, libosp-uifw.so, tab_tabp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls3TabC2Ev, LIBOSP_UIFW, tab_tabp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Tab");
@@ -808,7 +809,7 @@ TabBar::TabBar(void)
        typedef void (TabBar::*methodType)(void);
        static methodType tabbar_tabbarp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6TabBarC2Ev, libosp-uifw.so, tabbar_tabbarp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6TabBarC2Ev, LIBOSP_UIFW, tabbar_tabbarp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TabBar");
@@ -822,7 +823,7 @@ TextBox::TextBox(void)
        typedef void (TextBox::*methodType)(void);
        static methodType textbox_textboxp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls7TextBoxC2Ev, libosp-uifw.so, textbox_textboxp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls7TextBoxC2Ev, LIBOSP_UIFW, textbox_textboxp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TextBox");
@@ -836,7 +837,7 @@ Form::Form(void)
        typedef void (Form::*methodType)(void);
        static methodType form_formp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls4FormC2Ev, libosp-uifw.so, form_formp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls4FormC2Ev, LIBOSP_UIFW, form_formp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Form");
@@ -850,7 +851,7 @@ GroupedTableView::GroupedTableView(void)
        typedef void (GroupedTableView::*methodType)(void);
        static methodType groupedtableview_groupedtableviewp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls16GroupedTableViewC2Ev, libosp-uifw.so, groupedtableview_groupedtableviewp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls16GroupedTableViewC2Ev, LIBOSP_UIFW, groupedtableview_groupedtableviewp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "GroupedTableView");
@@ -864,7 +865,7 @@ Panel::Panel(void)
        typedef void (Panel::*methodType)(void);
        static methodType panel_panelp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5PanelC2Ev, libosp-uifw.so, panel_panelp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5PanelC2Ev, LIBOSP_UIFW, panel_panelp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Panel");
@@ -878,7 +879,7 @@ OverlayPanel::OverlayPanel(void)
        typedef void (OverlayPanel::*methodType)(void);
        static methodType overlaypanel_overlaypanelp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12OverlayPanelC2Ev, libosp-uifw.so, overlaypanel_overlaypanelp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12OverlayPanelC2Ev, LIBOSP_UIFW, overlaypanel_overlaypanelp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "OverlayPanel");
@@ -892,7 +893,7 @@ ScrollPanel::ScrollPanel(void)
        typedef void (ScrollPanel::*methodType)(void);
        static methodType scrollpanel_scrollpanelp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ScrollPanelC2Ev, libosp-uifw.so, scrollpanel_scrollpanelp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ScrollPanelC2Ev, LIBOSP_UIFW, scrollpanel_scrollpanelp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "ScrollPanel");
@@ -906,7 +907,7 @@ SectionTableView::SectionTableView(void)
        typedef void (SectionTableView::*methodType)(void);
        static methodType sectiontableview_sectiontableviewp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls16SectionTableViewC2Ev, libosp-uifw.so, sectiontableview_sectiontableviewp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls16SectionTableViewC2Ev, LIBOSP_UIFW, sectiontableview_sectiontableviewp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "SectionTableView");
@@ -920,7 +921,7 @@ TableView::TableView(void)
        typedef void (TableView::*methodType)(void);
        static methodType tableview_tableviewp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9TableViewC2Ev, libosp-uifw.so, tableview_tableviewp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9TableViewC2Ev, LIBOSP_UIFW, tableview_tableviewp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TableView");
@@ -934,7 +935,7 @@ TableViewItemBase::TableViewItemBase(void)
        typedef void (TableViewItemBase::*methodType)(void);
        static methodType tableviewitembase_tableviewitembasep;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls17TableViewItemBaseC2Ev, libosp-uifw.so, tableviewitembase_tableviewitembasep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls17TableViewItemBaseC2Ev, LIBOSP_UIFW, tableviewitembase_tableviewitembasep);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TableViewItemBase");
@@ -948,7 +949,7 @@ TableViewContextItem::TableViewContextItem(void)
        typedef void (TableViewContextItem::*methodType)(void);
        static methodType tableviewcontextitem_tableviewcontextitemp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls20TableViewContextItemC2Ev, libosp-uifw.so, tableviewcontextitem_tableviewcontextitemp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls20TableViewContextItemC2Ev, LIBOSP_UIFW, tableviewcontextitem_tableviewcontextitemp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TableViewContextItem");
@@ -962,7 +963,7 @@ TableViewGroupItem::TableViewGroupItem(void)
        typedef void (TableViewGroupItem::*methodType)(void);
        static methodType tableviewgroupitem_tableviewgroupitemp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls18TableViewGroupItemC2Ev, libosp-uifw.so, tableviewgroupitem_tableviewgroupitemp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls18TableViewGroupItemC2Ev, LIBOSP_UIFW, tableviewgroupitem_tableviewgroupitemp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TableViewGroupItem");
@@ -976,7 +977,7 @@ TableViewItem::TableViewItem(void)
        typedef void (TableViewItem::*methodType)(void);
        static methodType tableviewitem_tableviewitemp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls13TableViewItemC2Ev, libosp-uifw.so, tableviewitem_tableviewitemp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls13TableViewItemC2Ev, LIBOSP_UIFW, tableviewitem_tableviewitemp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TableViewItem");
@@ -990,7 +991,7 @@ TableViewSimpleGroupItem::TableViewSimpleGroupItem(void)
        typedef void (TableViewSimpleGroupItem::*methodType)(void);
        static methodType tableviewsimplegroupitem_tableviewsimplegroupitemp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls24TableViewSimpleGroupItemC2Ev, libosp-uifw.so, tableviewsimplegroupitem_tableviewsimplegroupitemp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls24TableViewSimpleGroupItemC2Ev, LIBOSP_UIFW, tableviewsimplegroupitem_tableviewsimplegroupitemp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TableViewSimpleGroupItem");
@@ -1004,7 +1005,7 @@ TableViewSimpleItem::TableViewSimpleItem(void)
        typedef void (TableViewSimpleItem::*methodType)(void);
        static methodType tableviewsimpleitem_tableviewsimpleitemp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls19TableViewSimpleItemC2Ev, libosp-uifw.so, tableviewsimpleitem_tableviewsimpleitemp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls19TableViewSimpleItemC2Ev, LIBOSP_UIFW, tableviewsimpleitem_tableviewsimpleitemp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TableViewSimpleItem");
@@ -1018,7 +1019,7 @@ ContextMenu::ContextMenu(void)
        typedef void (ContextMenu::*methodType)(void);
        static methodType contextmenu_contextmenup;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ContextMenuC2Ev, libosp-uifw.so, contextmenu_contextmenup);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ContextMenuC2Ev, LIBOSP_UIFW, contextmenu_contextmenup);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "ContextMenu");
@@ -1032,7 +1033,7 @@ DatePicker::DatePicker(void)
        typedef void (DatePicker::*methodType)(void);
        static methodType datepicker_datepickerp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10DatePickerC2Ev, libosp-uifw.so, datepicker_datepickerp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10DatePickerC2Ev, LIBOSP_UIFW, datepicker_datepickerp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "DatePicker");
@@ -1046,7 +1047,7 @@ DateTimePicker::DateTimePicker(void)
        typedef void (DateTimePicker::*methodType)(void);
        static methodType datetimepicker_datetimepickerp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls14DateTimePickerC2Ev, libosp-uifw.so, datetimepicker_datetimepickerp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls14DateTimePickerC2Ev, LIBOSP_UIFW, datetimepicker_datetimepickerp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "DateTimePicker");
@@ -1060,7 +1061,7 @@ Frame::Frame(void)
        typedef void (Frame::*methodType)(void);
        static methodType frame_framep;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5FrameC2Ev, libosp-uifw.so, frame_framep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5FrameC2Ev, LIBOSP_UIFW, frame_framep);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Frame");
@@ -1074,7 +1075,7 @@ Keypad::Keypad(void)
        typedef void (Keypad::*methodType)(void);
        static methodType keypad_keypadp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6KeypadC2Ev, libosp-uifw.so, keypad_keypadp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6KeypadC2Ev, LIBOSP_UIFW, keypad_keypadp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Keypad");
@@ -1088,7 +1089,7 @@ MessageBox::MessageBox(void)
        typedef void (MessageBox::*methodType)(void);
        static methodType messagebox_messageboxp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10MessageBoxC2Ev, libosp-uifw.so, messagebox_messageboxp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10MessageBoxC2Ev, LIBOSP_UIFW, messagebox_messageboxp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "MessageBox");
@@ -1102,7 +1103,7 @@ NotificationFrame::NotificationFrame(void)
        typedef void (NotificationFrame::*methodType)(void);
        static methodType notificationframe_notificationframep;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls17NotificationFrameC2Ev, libosp-uifw.so, notificationframe_notificationframep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls17NotificationFrameC2Ev, LIBOSP_UIFW, notificationframe_notificationframep);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "NotificationFrame");
@@ -1116,7 +1117,7 @@ OptionMenu::OptionMenu(void)
        typedef void (OptionMenu::*methodType)(void);
        static methodType optionmenu_optionmenup;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10OptionMenuC2Ev, libosp-uifw.so, optionmenu_optionmenup);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10OptionMenuC2Ev, LIBOSP_UIFW, optionmenu_optionmenup);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "OptionMenu");
@@ -1130,7 +1131,7 @@ Popup::Popup(void)
        typedef void (Popup::*methodType)(void);
        static methodType popup_popupp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5PopupC2Ev, libosp-uifw.so, popup_popupp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5PopupC2Ev, LIBOSP_UIFW, popup_popupp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Popup");
@@ -1144,7 +1145,7 @@ TimePicker::TimePicker(void)
        typedef void (TimePicker::*methodType)(void);
        static methodType timepicker_timepickerp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10TimePickerC2Ev, libosp-uifw.so, timepicker_timepickerp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10TimePickerC2Ev, LIBOSP_UIFW, timepicker_timepickerp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "TimePicker");
@@ -1170,7 +1171,7 @@ Web::Web(void)
        typedef void (Web::*methodType)(void);
        static methodType web_webp;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen3Web8Controls3WebC2Ev, libosp-web.so, web_webp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen3Web8Controls3WebC2Ev, LIBOSP_WEB, web_webp);
 
        probeBlockStart();
        add_object_hash_type((void*)this, "Web");
index c96dbb7..7d47718 100755 (executable)
@@ -70,7 +70,7 @@ result UiApp::AddFrame(const Tizen::Ui::Controls::Frame& frame)
        DECLARE_COMMON_VARIABLE;
        result ret;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp8AddFrameERKNS_2Ui8Controls5FrameE, libosp-uifw.so, uiapp_addframep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp8AddFrameERKNS_2Ui8Controls5FrameE, LIBOSP_UIFW, uiapp_addframep);
 
        ret = (this->*uiapp_addframep)(frame);
 
@@ -104,7 +104,7 @@ result UiApp::RemoveFrame(const Tizen::Ui::Controls::Frame &frame)
        result ret;
        bool bOption;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp11RemoveFrameERKNS_2Ui8Controls5FrameE, libosp-uifw.so, uiapp_removeframep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp11RemoveFrameERKNS_2Ui8Controls5FrameE, LIBOSP_UIFW, uiapp_removeframep);
 
        probeBlockStart();
        frame.IsInTouchMode();
@@ -144,7 +144,7 @@ bool Control::IsInTouchMode(void) const
        typedef bool (Control::*methodType)(void) const;
        static methodType control_isintouchmodep;
 
-       GET_REAL_FUNC_OSP(_ZNK5Tizen2Ui7Control13IsInTouchModeEv, libosp-uifw.so, control_isintouchmodep);
+       GET_REAL_FUNC_OSP(_ZNK5Tizen2Ui7Control13IsInTouchModeEv, LIBOSP_UIFW, control_isintouchmodep);
 
        probeBlockStart();
        add_object_hash_class((void*)(this), typeid(*this).name());
@@ -159,7 +159,7 @@ void Control::SetName(const Tizen::Base::String &name)
        static methodType control_setnamep;
        DECLARE_COMMON_VARIABLE;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7Control7SetNameERKNS_4Base6StringE, libosp-uifw.so, control_setnamep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7Control7SetNameERKNS_4Base6StringE, LIBOSP_UIFW, control_setnamep);
 
        (this->*control_setnamep)(name);
 
@@ -187,7 +187,7 @@ result Container::AddControl(const Control &control)
        DECLARE_COMMON_VARIABLE;
        result ret;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container10AddControlERKNS0_7ControlE, libosp-uifw.so, container_addcontrolp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container10AddControlERKNS0_7ControlE, LIBOSP_UIFW, container_addcontrolp);
 
        probeBlockStart();
        if(unlikely(IsRegisteredFrameAnimatorEventListener == false))
@@ -243,7 +243,7 @@ result Container::RemoveControl(const Control &control)
        result ret;
        bool bOption;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container13RemoveControlERKNS0_7ControlE, libosp-uifw.so, container_removecontrolp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container13RemoveControlERKNS0_7ControlE, LIBOSP_UIFW, container_removecontrolp);
 
        probeBlockStart();
        control.IsInTouchMode();
@@ -280,7 +280,7 @@ result Container::RemoveControl(int index)
        result ret;
        bool bOption;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container13RemoveControlEi, libosp-uifw.so, container_removecontrolip);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container13RemoveControlEi, LIBOSP_UIFW, container_removecontrolip);
 
        probeBlockStart();
        Control* pcontrol = GetControl(index);
@@ -316,7 +316,7 @@ void Container::RemoveAllControls(void)
        static methodType container_removeallcontrolp;
        DECLARE_COMMON_VARIABLE;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container17RemoveAllControlsEv, libosp-uifw.so, container_removeallcontrolp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container17RemoveAllControlsEv, LIBOSP_UIFW, container_removeallcontrolp);
 
        probeBlockStart();
        if(isOptionEnabled(OPT_UI))
index 37ed8c9..103e27e 100755 (executable)
@@ -458,7 +458,7 @@ result TouchFlickGestureDetector::AddFlickGestureEventListener(ITouchFlickGestur
        result iret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui25TouchFlickGestureDetector28AddFlickGestureEventListenerERNS0_31ITouchFlickGestureEventListenerE,
-                       libosp-uifw.so, addflickgestureeventlistenerp);
+                       LIBOSP_UIFW, addflickgestureeventlistenerp);
 
        probeBlockStart();
        GestureEventListener& mylistener = GestureEventListener::GetInstance();
@@ -486,7 +486,7 @@ result TouchLongPressGestureDetector::AddLongPressGestureEventListener(ITouchLon
        result iret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui29TouchLongPressGestureDetector32AddLongPressGestureEventListenerERNS0_35ITouchLongPressGestureEventListenerE,
-                       libosp-uifw.so, addlongpressgestureeventlistenerp);
+                       LIBOSP_UIFW, addlongpressgestureeventlistenerp);
 
        probeBlockStart();
        GestureEventListener& mylistener = GestureEventListener::GetInstance();
@@ -514,7 +514,7 @@ result TouchPanningGestureDetector::AddPanningGestureEventListener(ITouchPanning
        result iret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui27TouchPanningGestureDetector30AddPanningGestureEventListenerERNS0_33ITouchPanningGestureEventListenerE,
-                       libosp-uifw.so, addpanninggestureeventlistenerp);
+                       LIBOSP_UIFW, addpanninggestureeventlistenerp);
 
        probeBlockStart();
        GestureEventListener& mylistener = GestureEventListener::GetInstance();
@@ -542,7 +542,7 @@ result TouchPinchGestureDetector::AddPinchGestureEventListener(ITouchPinchGestur
        result iret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui25TouchPinchGestureDetector28AddPinchGestureEventListenerERNS0_31ITouchPinchGestureEventListenerE,
-                       libosp-uifw.so, addpinchgestureeventlistenerp);
+                       LIBOSP_UIFW, addpinchgestureeventlistenerp);
 
        probeBlockStart();
        GestureEventListener& mylistener = GestureEventListener::GetInstance();
@@ -570,7 +570,7 @@ result TouchRotationGestureDetector::AddRotationGestureEventListener(ITouchRotat
        result iret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui28TouchRotationGestureDetector31AddRotationGestureEventListenerERNS0_34ITouchRotationGestureEventListenerE,
-                       libosp-uifw.so, addrotationgestureeventlistenerp);
+                       LIBOSP_UIFW, addrotationgestureeventlistenerp);
 
        probeBlockStart();
        GestureEventListener& mylistener = GestureEventListener::GetInstance();
@@ -598,7 +598,7 @@ result TouchTapGestureDetector::AddTapGestureEventListener(ITouchTapGestureEvent
        result iret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui23TouchTapGestureDetector26AddTapGestureEventListenerERNS0_29ITouchTapGestureEventListenerE,
-                       libosp-uifw.so, addtapgestureeventlistenerp);
+                       LIBOSP_UIFW, addtapgestureeventlistenerp);
 
        probeBlockStart();
        GestureEventListener& mylistener = GestureEventListener::GetInstance();
@@ -626,7 +626,7 @@ result TouchGestureDetector::AddGestureEventListener(ITouchGestureEventListener&
        result iret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui20TouchGestureDetector23AddGestureEventListenerERNS0_26ITouchGestureEventListenerE,
-                       libosp-uifw.so, addgestureeventlistenerp);
+                       LIBOSP_UIFW, addgestureeventlistenerp);
 
        probeBlockStart();
        GestureEventListener& mylistener = GestureEventListener::GetInstance();
index d177f6c..a2c080c 100755 (executable)
@@ -50,8 +50,6 @@
 
 bool touch_pressed = false;
 
-#define LIBECOREINPUT libecore_input_evas.so.1
-
 #define HW_EVENT_LOG(_EVENTTYPE, _DETAILTYPE, _X, _Y, _KEYCODE, _EXTRA)                        \
        setProbePoint(&probeInfo);                                                                                                      \
        INIT_LOG;                                                                                                                                       \
@@ -66,7 +64,7 @@ Eina_Bool ecore_event_evas_key_down(void *data, int type, void *event)
        static Eina_Bool (*ecore_event_evas_key_downp)(void *data, int type, void *event);
        DECLARE_COMMON_VARIABLE;
 
-       GET_REAL_FUNC(ecore_event_evas_key_down, LIBECOREINPUT);
+       GET_REAL_FUNC(ecore_event_evas_key_down, LIBECORE_INPUT_EVAS);
 
        if(isOptionEnabled(OPT_EVENT))
        {
@@ -90,7 +88,7 @@ Eina_Bool ecore_event_evas_key_up(void *data, int type, void *event)
        static Eina_Bool (*ecore_event_evas_key_upp)(void *data, int type, void *event);
        DECLARE_COMMON_VARIABLE;
 
-       GET_REAL_FUNC(ecore_event_evas_key_up, LIBECOREINPUT);
+       GET_REAL_FUNC(ecore_event_evas_key_up, LIBECORE_INPUT_EVAS);
 
        if(isOptionEnabled(OPT_EVENT))
        {
@@ -114,7 +112,7 @@ Eina_Bool ecore_event_evas_mouse_button_down(void *data, int type, void *event)
        static Eina_Bool (*ecore_event_evas_mouse_button_downp)(void *data, int type, void *event);
        DECLARE_COMMON_VARIABLE;
 
-       GET_REAL_FUNC(ecore_event_evas_mouse_button_down, LIBECOREINPUT);
+       GET_REAL_FUNC(ecore_event_evas_mouse_button_down, LIBECORE_INPUT_EVAS);
 
        if(isOptionEnabled(OPT_EVENT))
        {
@@ -136,7 +134,7 @@ Eina_Bool ecore_event_evas_mouse_button_up(void *data, int type, void *event)
        static Eina_Bool (*ecore_event_evas_mouse_button_upp)(void *data, int type, void *event);
        DECLARE_COMMON_VARIABLE;
 
-       GET_REAL_FUNC(ecore_event_evas_mouse_button_up, LIBECOREINPUT);
+       GET_REAL_FUNC(ecore_event_evas_mouse_button_up, LIBECORE_INPUT_EVAS);
 
        if(isOptionEnabled(OPT_EVENT))
        {
@@ -158,7 +156,7 @@ Eina_Bool ecore_event_evas_mouse_move(void *data, int type, void *event)
        static Eina_Bool (*ecore_event_evas_mouse_movep)(void *data, int type, void *event);
        DECLARE_COMMON_VARIABLE;
 
-       GET_REAL_FUNC(ecore_event_evas_mouse_move, LIBECOREINPUT);
+       GET_REAL_FUNC(ecore_event_evas_mouse_move, LIBECORE_INPUT_EVAS);
 
        if(isOptionEnabled(OPT_EVENT))
        {
index 16612c7..74515c6 100755 (executable)
 #define AFTER_ORIGINAL_FILEP_RET(RTYPE, RVAL, SIZE, FILEP, APITYPE, INPUTFORMAT, ...)  \\r
        POST_PROBEBLOCK_BEGIN(LC_RESOURCE, RTYPE, RVAL, INPUTFORMAT, __VA_ARGS__);                      \\r
        GET_FD_FROM_FILEP(FILEP);                                                                                                                       \\r
-       _fstatret = fstat(_fd, &_statbuf);                                                                                                      \\r
+       if(_fd != -1) {                                                                                                                                         \\r
+               _fstatret = fstat(_fd, &_statbuf);                                                                                              \\r
+       }                                                                                                                                                                       \\r
        if(_fstatret != 0) PRINTMSG("ERROR : fstat error\n");                                                           \\r
        POST_PROBEBLOCK_MIDDLE_FD(SIZE, _fd, APITYPE);                                                                          \\r
        POST_PROBEBLOCK_CALLSTACK_RESOURCE(APITYPE);                                                                            \\r
index fb0d738..28f83fe 100755 (executable)
@@ -34,6 +34,7 @@
 #include "daprobe.h"
 #include "probeinfo.h"
 #include "dautil.h"
+#include "dahelper.h"
 #include "da_io.h"
 
 #include <fcntl.h>
@@ -54,7 +55,7 @@ int open(const char* path, int oflag, ...)
        static int (*openp)(const char* path, int oflag, ...);
        int mode = 0;
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(open, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(open, LIBC);
        _filepath = (char*)path;
 
        if(oflag & O_CREAT)
@@ -77,7 +78,7 @@ int openat(int fd, const char* path, int oflag, ...)
        static int (*openatp)(int fd, const char* path, int oflag, ...);
        int mode = 0;
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(openat, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(openat, LIBC);
        _filepath = (char*)path;
 
        if(oflag & O_CREAT)
@@ -99,7 +100,7 @@ int creat(const char* path, mode_t mode)
 {
        static int (*creatp)(const char* path, mode_t mode);
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(creat, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(creat, LIBC);
        _filepath = (char*)path;
 
        ret = creatp(path, mode);
@@ -114,7 +115,7 @@ int close(int fd)
        static int (*closep)(int fd);
        DECLARE_VARIABLE_FD;
 
-       GET_REAL_FUNC(close, libc.so.6);
+       GET_REAL_FUNC(close, LIBC);
 
        bfiltering = false;
        PRE_PROBEBLOCK_BEGIN();
@@ -135,7 +136,7 @@ int access(const char *path, int amode)
 {
        static int (*accessp)(const char *path, int amode);
 
-       BEFORE_ORIGINAL_FILE(access, libc.so.6);
+       BEFORE_ORIGINAL_FILE(access, LIBC);
        _filepath = (char*)path;
 
        ret = accessp(path, amode);
@@ -149,7 +150,7 @@ int faccessat(int fd, const char *path, int amode, int flag)
 {
        static int (*faccessatp)(int fd, const char *path, int amode, int flag);
 
-       BEFORE_ORIGINAL_FILE(faccessat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(faccessat, LIBC);
        _filepath = (char*)path;
 
        ret = faccessatp(fd, path, amode, flag);
@@ -165,7 +166,7 @@ off_t lseek(int fd, off_t offset, int whence)
        static int (*lseekp)(int fd, off_t offset, int whence);
        off_t offret;
 
-       BEFORE_ORIGINAL_FILE(lseek, libc.so.6);
+       BEFORE_ORIGINAL_FILE(lseek, LIBC);
 
        offret = lseekp(fd, offset, whence);
 
@@ -179,7 +180,7 @@ int fsync(int fd)
 {
        static int (*fsyncp)(int fd);
 
-       BEFORE_ORIGINAL_FILE(fsync, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fsync, LIBC);
 
        ret = fsyncp(fd);
 
@@ -192,7 +193,7 @@ int fdatasync(int fd)
 {
        static int (*fdatasyncp)(int fd);
 
-       BEFORE_ORIGINAL_FILE(fdatasync, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fdatasync, LIBC);
 
        ret = fdatasyncp(fd);
 
@@ -205,7 +206,7 @@ int truncate(const char *path, off_t length)
 {
        static int (*truncatep)(const char *path, off_t length);
 
-       BEFORE_ORIGINAL_FILE(truncate, libc.so.6);
+       BEFORE_ORIGINAL_FILE(truncate, LIBC);
        _filepath = (char*)path;
 
        ret = truncatep(path, length);
@@ -220,7 +221,7 @@ int ftruncate(int fd, off_t length)
 {
        static int (*ftruncatep)(int fd, off_t length);
 
-       BEFORE_ORIGINAL_FILE(ftruncate, libc.so.6);
+       BEFORE_ORIGINAL_FILE(ftruncate, LIBC);
 
        ret = ftruncatep(fd, length);
 
@@ -236,7 +237,7 @@ int mkfifo(const char *path, mode_t mode)
 {
        static int (*mkfifop)(const char *path, mode_t mode);
 
-       BEFORE_ORIGINAL_FILE(mkfifo, libc.so.6);
+       BEFORE_ORIGINAL_FILE(mkfifo, LIBC);
        _filepath = (char*)path;
 
        ret = mkfifop(path, mode);
@@ -250,7 +251,7 @@ int mkfifoat(int fd, const char *path, mode_t mode)
 {
        static int (*mkfifoatp)(int fd, const char *path, mode_t mode);
 
-       BEFORE_ORIGINAL_FILE(mkfifoat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(mkfifoat, LIBC);
        _filepath = (char*)path;
 
        ret = mkfifoatp(fd, path, mode);
@@ -265,7 +266,7 @@ int mknod(const char *path, mode_t mode, dev_t dev)
 {
        static int (*mknodp)(const char *path, mode_t mode, dev_t dev);
 
-       BEFORE_ORIGINAL_FILE(mknod, libc.so.6);
+       BEFORE_ORIGINAL_FILE(mknod, LIBC);
        _filepath = (char*)path;
 
        ret = mknodp(path, mode, dev);
@@ -280,7 +281,7 @@ int mknodat(int fd, const char *path, mode_t mode, dev_t dev)
 {
        static int (*mknodatp)(int fd, const char *path, mode_t mode, dev_t dev);
 
-       BEFORE_ORIGINAL_FILE(mknodat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(mknodat, LIBC);
        _filepath = (char*)path;
 
        ret = mknodatp(fd,path, mode,dev);
@@ -299,7 +300,7 @@ int chown(const char *path, uid_t owner, gid_t group)
 {
        static int (*chownp)(const char *path, uid_t owner, gid_t group);
 
-       BEFORE_ORIGINAL_FILE(chown, libc.so.6);
+       BEFORE_ORIGINAL_FILE(chown, LIBC);
        _filepath = (char*)path;
        ret = chownp(path, owner, group);
        AFTER_ORIGINAL_NOFD(0, FD_API_PERMISSION, "%s, %u, %u", path, owner, group);
@@ -310,7 +311,7 @@ int fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag)
 {
        static int (*fchownatp)(int fd, const char *path, uid_t owner, gid_t group, int flag);
 
-       BEFORE_ORIGINAL_FILE(fchownat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fchownat, LIBC);
        _filepath = (char*)path;
        ret = fchownatp(fd, path, owner, group, flag);
        AFTER_ORIGINAL_FD(0, fd, FD_API_PERMISSION,
@@ -322,7 +323,7 @@ int fchown(int fd, uid_t owner, gid_t group)
 {
        static int (*fchownp)(int fd, uid_t owner, gid_t group);
 
-       BEFORE_ORIGINAL_FILE(fchown, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fchown, LIBC);
        ret = fchownp(fd, owner, group);
        AFTER_ORIGINAL_FD(0, fd, FD_API_PERMISSION, "%d, %u, %u", fd, owner, group);
        return ret;
@@ -332,7 +333,7 @@ int lchown(const char *path, uid_t owner, gid_t group)
 {
        static int (*lchownp)(const char *path, uid_t owner, gid_t group);
 
-       BEFORE_ORIGINAL_FILE(lchown, libc.so.6);
+       BEFORE_ORIGINAL_FILE(lchown, LIBC);
        _filepath = (char*)path;
        ret = lchownp(path, owner, group);
        AFTER_ORIGINAL_NOFD(0, FD_API_PERMISSION, "%s, %u, %u", path, owner, group);
@@ -343,7 +344,7 @@ int lockf(int fd, int function, off_t size)
 {
        static int (*lockfp)(int fd, int function, off_t size);
 
-       BEFORE_ORIGINAL_FILE(lockf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(lockf, LIBC);
        ret = lockfp(fd, function, size);
        AFTER_ORIGINAL_FD((unsigned int)size, fd, FD_API_PERMISSION,
                        "%d, %d, %ld", fd, function, size);
@@ -354,7 +355,7 @@ int chmod(const char *path, mode_t mode)
 {
        static int (*chmodp)(const char *path, mode_t mode);
 
-       BEFORE_ORIGINAL_FILE(chmod, libc.so.6);
+       BEFORE_ORIGINAL_FILE(chmod, LIBC);
        _filepath = (char*)path;
        ret = chmodp(path, mode);
        AFTER_ORIGINAL_NOFD(0, FD_API_PERMISSION, "%s, %u", path, mode);
@@ -365,7 +366,7 @@ int fchmodat(int fd, const char *path, mode_t mode, int flag)
 {
        static int (*fchmodatp)(int fd, const char *path, mode_t mode, int flag);
 
-       BEFORE_ORIGINAL_FILE(fchmodat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fchmodat, LIBC);
        _filepath = (char*)path;
        ret = fchmodatp(fd, path, mode, flag);
        AFTER_ORIGINAL_FD(0, fd, FD_API_PERMISSION,
@@ -377,7 +378,7 @@ int fchmod(int fd, mode_t mode)
 {
        static int (*fchmodp)(int fd, mode_t mode);
 
-       BEFORE_ORIGINAL_FILE(fchmod, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fchmod, LIBC);
        ret = fchmodp(fd, mode);
        AFTER_ORIGINAL_FD(0, fd, FD_API_PERMISSION, "%d, %u", fd, mode);
        return ret;
@@ -392,7 +393,7 @@ ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset)
        static ssize_t (*preadp)(int fd, void *buf, size_t nbyte, off_t offset);
        ssize_t sret;
 
-       BEFORE_ORIGINAL_FILE(pread, libc.so.6);
+       BEFORE_ORIGINAL_FILE(pread, LIBC);
 
        sret = preadp(fd, buf, nbyte, offset);
 
@@ -406,7 +407,7 @@ ssize_t read(int fd, void *buf, size_t nbyte)
        static ssize_t (*readp)(int fildes, void *buf, size_t nbyte);
        ssize_t sret;
 
-       BEFORE_ORIGINAL_FILE(read, libc.so.6);
+       BEFORE_ORIGINAL_FILE(read, LIBC);
 
        sret = readp(fd, buf, nbyte);
 
@@ -421,7 +422,7 @@ ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset)
        static ssize_t (*pwritep)(int fd, const void *buf, size_t nbyte, off_t offset);
        ssize_t sret;
 
-       BEFORE_ORIGINAL_FILE(pwrite, libc.so.6);
+       BEFORE_ORIGINAL_FILE(pwrite, LIBC);
 
        sret = pwritep(fd, buf, nbyte, offset);
 
@@ -436,7 +437,7 @@ ssize_t write(int fd, const void *buf, size_t nbyte)
        static ssize_t (*writep)(int fildes, const void *buf, size_t nbyte);
        ssize_t sret;
 
-       BEFORE_ORIGINAL_FILE(write, libc.so.6);
+       BEFORE_ORIGINAL_FILE(write, LIBC);
 
        sret = writep(fd, buf, nbyte);
 
@@ -452,7 +453,7 @@ ssize_t readv(int fd, const struct iovec *iov, int iovcnt)
        static ssize_t (*readvp)(int fd, const struct iovec *iov, int iovcnt);
        ssize_t sret;
 
-       BEFORE_ORIGINAL_FILE(readv, libc.so.6);
+       BEFORE_ORIGINAL_FILE(readv, LIBC);
        sret = readvp(fd,iov,iovcnt);
 
        AFTER_ORIGINAL_FD_RET(VT_SSIZE_T, sret, (unsigned int)sret, fd, FD_API_READ,
@@ -467,7 +468,7 @@ ssize_t writev(int fd, const struct iovec *iov, int iovcnt)
 {
        static ssize_t (*writevp)(int fd, const struct iovec *iov, int iovcnt);
 
-       MAKE_RESOURCE_PREBLOCK(writev, libc.so.6,3,VT_INT,fd,VT_PTR,iov,VT_INT,iovcnt);
+       MAKE_RESOURCE_PREBLOCK(writev, LIBC,3,VT_INT,fd,VT_PTR,iov,VT_INT,iovcnt);
        ssize_t ret;
        ret = writevp(fd,iov,iovcnt);
        MAKE_RESOURCE_POSTBLOCK(VT_SSIZE_T,ret,VT_SSIZE_T,ret,VT_INT,fd, FD_API_WRITE);
@@ -483,7 +484,7 @@ int rmdir(const char *path)
 {
        static int (*rmdirp)(const char *path);
 
-       BEFORE_ORIGINAL_FILE(rmdir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(rmdir, LIBC);
        _filepath = (char*)path;
        ret = rmdirp(path);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s", path);
@@ -494,7 +495,7 @@ int fchdir(int fd)
 {
        static int (*fchdirp)(int fd);
 
-       BEFORE_ORIGINAL_FILE(fchdir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fchdir, LIBC);
        ret = fchdirp(fd);
        AFTER_ORIGINAL_FD(0, fd, FD_API_DIRECTORY, "%d", fd);
        return ret;
@@ -504,7 +505,7 @@ int chdir(const char *path)
 {
        static int (*chdirp)(const char *path);
 
-       BEFORE_ORIGINAL_FILE(chdir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(chdir, LIBC);
        _filepath = (char*)path;
        ret = chdirp(path);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s", path);
@@ -515,7 +516,7 @@ int link(const char *path1, const char *path2)
 {
        static int (*linkp)(const char *path1, const char *path2);
 
-       BEFORE_ORIGINAL_FILE(link, libc.so.6);
+       BEFORE_ORIGINAL_FILE(link, LIBC);
        _filepath = (char*)path1;
        ret = linkp(path1, path2);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s, %s", path1, path2);
@@ -526,7 +527,7 @@ int linkat(int fd1, const char *path1, int fd2, const char *path2, int flag)
 {
        static int (*linkatp)(int fd1, const char *path1, int fd2, const char *path2, int flag);
 
-       BEFORE_ORIGINAL_FILE(linkat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(linkat, LIBC);
        _filepath = (char*)path1;
        ret = linkatp(fd1, path1, fd2, path2, flag);
        AFTER_ORIGINAL_FD(0, fd2, FD_API_DIRECTORY,
@@ -538,7 +539,7 @@ int unlink(const char *path)
 {
        static int (*unlinkp)(const char *path);
 
-       BEFORE_ORIGINAL_FILE(unlink, libc.so.6);
+       BEFORE_ORIGINAL_FILE(unlink, LIBC);
        _filepath = (char*)path;
        ret = unlinkp(path);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s", path);
@@ -549,7 +550,7 @@ int unlinkat(int fd, const char *path, int flag)
 {
        static int (*unlinkatp)(int fd, const char *path, int flag);
 
-       BEFORE_ORIGINAL_FILE(unlinkat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(unlinkat, LIBC);
        _filepath = (char*)path;
        ret = unlinkatp(fd, path, flag);
        AFTER_ORIGINAL_FD(0, fd, FD_API_DIRECTORY, "%d, %s, %d", fd, path, flag);
@@ -560,7 +561,7 @@ int symlink(const char *path1, const char *path2)
 {
        static int (*symlinkp)(const char *path1, const char *path2);
 
-       BEFORE_ORIGINAL_FILE(symlink, libc.so.6);
+       BEFORE_ORIGINAL_FILE(symlink, LIBC);
        _filepath = (char*)path1;
        ret = symlinkp(path1, path2);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s, %s", path1, path2);
@@ -571,7 +572,7 @@ int symlinkat(const char *path1, int fd, const char *path2)
 {
        static int (*symlinkatp)(const char *path1, int fd, const char *path2);
 
-       BEFORE_ORIGINAL_FILE(symlinkat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(symlinkat, LIBC);
        _filepath = (char*)path1;
        ret = symlinkatp(path1, fd, path2);
        AFTER_ORIGINAL_FD(0, fd, FD_API_DIRECTORY, "%s, %d, %s", path1, fd, path2);
@@ -583,7 +584,7 @@ ssize_t readlink(const char* path, char* buf, size_t bufsize)
        static int (*readlinkp)(const char* path, char* buf, size_t bufsize);
        ssize_t sret;
 
-       BEFORE_ORIGINAL_FILE(readlink, libc.so.6);
+       BEFORE_ORIGINAL_FILE(readlink, LIBC);
        _filepath = (char*)path;
 
        sret = readlinkp(path, buf, bufsize);
@@ -599,7 +600,7 @@ ssize_t readlinkat(int fd, const char * path, char * buf, size_t bufsize)
        static int (*readlinkatp)(int fd, const char * path, char * buf, size_t bufsize);
        ssize_t sret;
 
-       BEFORE_ORIGINAL_FILE(readlinkat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(readlinkat, LIBC);
        _filepath = (char*)path;
 
        sret = readlinkatp(fd, path, buf, bufsize);
@@ -614,7 +615,7 @@ int mkdir(const char *path, mode_t mode)
 {
        static int (*mkdirp)(const char *path, mode_t mode);
 
-       BEFORE_ORIGINAL_FILE(mkdir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(mkdir, LIBC);
        _filepath = (char*)path;
        ret = mkdirp(path, mode);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s, %u", path, mode);
@@ -625,7 +626,7 @@ int mkdirat(int fd, const char *path, mode_t mode)
 {
        static int (*mkdiratp)(int fd, const char *path, mode_t mode);
 
-       BEFORE_ORIGINAL_FILE(mkdirat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(mkdirat, LIBC);
        _filepath = (char*)path;
        ret = mkdiratp(fd, path, mode);
        AFTER_ORIGINAL_FD(0, fd, FD_API_DIRECTORY, "%d, %s, %u", fd, path, mode);
@@ -636,7 +637,7 @@ int closedir(DIR *dirp)
 {
        static int (*closedirp)(DIR *dirp);
 
-       BEFORE_ORIGINAL_FILE(closedir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(closedir, LIBC);
        ret = closedirp(dirp);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%p", dirp);
        return ret;
@@ -647,7 +648,7 @@ DIR *fdopendir(int fd)
        static DIR* (*fdopendirp)(int fd);
        DIR* dret;
 
-       BEFORE_ORIGINAL_FILE(fdopendir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fdopendir, LIBC);
 
        dret = fdopendirp(fd);
 
@@ -661,7 +662,7 @@ DIR *opendir(const char *dirname)
        static DIR* (*opendirp)(const char *dirname);
        DIR* dret;
 
-       BEFORE_ORIGINAL_FILE(opendir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(opendir, LIBC);
        _filepath = (char*)dirname;
 
        dret = opendirp(dirname);
@@ -676,7 +677,7 @@ struct dirent *readdir(DIR *dirp)
        static struct dirent* (*readdirp)(DIR *dirp);
        struct dirent* dret;
 
-       BEFORE_ORIGINAL_FILE(readdir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(readdir, LIBC);
 
        dret = readdirp(dirp);
        
@@ -689,7 +690,7 @@ int readdir_r(DIR * dirp, struct dirent * entry, struct dirent ** result)
 {
        static int (*readdir_rp)(DIR * dirp, struct dirent * entry, struct dirent ** result);
 
-       BEFORE_ORIGINAL_FILE(readdir_r, libc.so.6);
+       BEFORE_ORIGINAL_FILE(readdir_r, LIBC);
        ret = readdir_rp(dirp, entry, result);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%p, %p, %p", dirp, entry, result);
        return ret;
@@ -699,7 +700,7 @@ void rewinddir(DIR *dirp)
 {
        static void (*rewinddirp)(DIR *dirp);
 
-       BEFORE_ORIGINAL_FILE(rewinddir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(rewinddir, LIBC);
 
        rewinddirp(dirp);
        
@@ -710,7 +711,7 @@ void seekdir(DIR *dirp, long loc)
 {
        static void (*seekdirp)(DIR *dirp, long loc);
 
-       BEFORE_ORIGINAL_FILE(seekdir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(seekdir, LIBC);
 
        seekdirp(dirp, loc);
 
@@ -723,7 +724,7 @@ long telldir(DIR *dirp)
        static int (*telldirp)(DIR *dirp);
        long lret;
 
-       BEFORE_ORIGINAL_FILE(telldir, libc.so.6);
+       BEFORE_ORIGINAL_FILE(telldir, LIBC);
 
        lret = telldirp(dirp);
 
@@ -741,7 +742,7 @@ int fcntl(int fd, int cmd, ...)
        static int (*fcntlp)(int fd, int cmd, ...);
        int arg = 0;
 
-       BEFORE_ORIGINAL_FILE(fcntl, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fcntl, LIBC);
 
        va_list argl;
        va_start(argl, cmd);
@@ -759,7 +760,7 @@ int dup(int fd)
 {
        static int (*dupp)(int fd);
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(dup, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(dup, LIBC);
 
        ret = dupp(fd);
 
@@ -772,7 +773,7 @@ int dup2(int fd, int fd2)
 {
        static int (*dup2p)(int fd, int fd2);
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(dup2, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(dup2, LIBC);
 
        ret = dup2p(fd, fd2);
 
@@ -782,13 +783,13 @@ int dup2(int fd, int fd2)
 }
 
 //FIXME dlsym error
-// fstat is not in libc.so.6
+// fstat is not in LIBC
 #if 0
 int fstat(int fd, struct stat *buf)
 {
        static int (*fstatp)(int fd, struct stat *buf);
 
-       BEFORE_ORIGINAL_FILE(fstat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fstat, LIBC);
        ret = fstatp(fd, buf);
        AFTER_ORIGINAL_FD(0, fd, FD_API_OTHER, "%d, %p", fd, buf);
        return ret;
@@ -798,7 +799,7 @@ int stat(const char * path, struct stat * buf)
 {
        static int (*statp)(const char * path, struct stat * buf);
 
-       BEFORE_ORIGINAL_FILE(stat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(stat, LIBC);
        _filepath = (char*)path;
        ret = statp(path, buf);
        AFTER_ORIGINAL_NOFD(0, FD_API_OTHER, "%s, %p", path, buf);
@@ -811,7 +812,7 @@ int fstatat(int fd, const char * path, struct stat * buf, int flag)
 {
        static int (*fstatatp)(int fd, const char * path, struct stat * buf, int flag);
 
-       BEFORE_ORIGINAL_FILE(fstatat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fstatat, LIBC);
        _filepath = (char*)path;
        ret = fstatatp(fd, path, buf, flag);
        AFTER_ORIGINAL_FD(0, fd, FD_API_OTHER, "%d, %s, %p, %d", fd, path, buf, flag);
@@ -822,7 +823,7 @@ int lstat(const char * path, struct stat * buf)
 {
        static int (*lstatp)(const char * path, struct stat * buf);
 
-       BEFORE_ORIGINAL_FILE(lstat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(lstat, LIBC);
        _filepath = (char*)path;
        ret = lstatp(path, buf);
        AFTER_ORIGINAL_NOFD(0, FD_API_OTHER, "%s, %p", path, buf);
@@ -833,7 +834,7 @@ int futimens(int fd, const struct timespec times[2])
 {
        static int (*futimensp)(int fd, const struct timespec times[2]);
 
-       BEFORE_ORIGINAL_FILE(futimens, libc.so.6);
+       BEFORE_ORIGINAL_FILE(futimens, LIBC);
        ret = futimensp(fd, times);
        AFTER_ORIGINAL_FD(0, fd, FD_API_OTHER, "%d, %p", fd, times);
        return ret;
@@ -843,7 +844,7 @@ int utimensat(int fd, const char *path, const struct timespec times[2], int flag
 {
        static int (*utimensatp)(int fd, const char *path, const struct timespec times[2], int flag);
 
-       BEFORE_ORIGINAL_FILE(utimensat, libc.so.6);
+       BEFORE_ORIGINAL_FILE(utimensat, LIBC);
        _filepath = (char*)path;
        ret = utimensatp(fd, path, times, flag);
        AFTER_ORIGINAL_FD(0, fd, FD_API_OTHER,
@@ -855,7 +856,7 @@ int utimes(const char *path, const struct timeval times[2])
 {
        static int (*utimesp)(const char *path, const struct timeval times[2]);
 
-       BEFORE_ORIGINAL_FILE(utimes, libc.so.6);
+       BEFORE_ORIGINAL_FILE(utimes, LIBC);
        _filepath = (char*)path;
        ret = utimesp(path, times);
        AFTER_ORIGINAL_NOFD(0, FD_API_OTHER, "%s, %p", path, times);
@@ -866,7 +867,7 @@ int utime(const char *path, const struct utimbuf *times)
 {
        static int (*utimep)(const char *path, const struct utimbuf *times);
 
-       BEFORE_ORIGINAL_FILE(utime, libc.so.6);
+       BEFORE_ORIGINAL_FILE(utime, LIBC);
        _filepath = (char*)path;
        ret = utimep(path, times);
        AFTER_ORIGINAL_NOFD(0, FD_API_OTHER, "%s, %p", path, times);
index 99e68aa..0d2533a 100644 (file)
@@ -37,6 +37,7 @@
 #include "daprobe.h"
 #include "probeinfo.h"
 #include "dautil.h"
+#include "dahelper.h"
 #include "da_io.h"
 
 static enum DaOptions _sopt = OPT_FILE;
@@ -46,7 +47,7 @@ FILE* fopen(const char* filename, const char* mode)
        static FILE* (*fopenp)(const char* filename, const char* mode);
        FILE* fret;
        
-       BEFORE_ORIGINAL_FILE_NOFILTER(fopen, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(fopen, LIBC);
        _filepath = (char*)filename;
        
        fret = fopenp(filename, mode);
@@ -61,7 +62,7 @@ FILE* freopen(const char * filename, const char * mode, FILE * stream)
        static FILE* (*freopenp)(const char * filename, const char * mode, FILE * stream);
        FILE* fret;
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(freopen, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(freopen, LIBC);
        _filepath = (char*)filename;
 
        fret = freopenp(filename, mode, stream);
@@ -77,7 +78,7 @@ FILE* fdopen(int fildes, const char *mode)
        static FILE* (*fdopenp)(int fildes, const char *mode);
        FILE* fret;
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(fdopen, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(fdopen, LIBC);
 
        fret = fdopenp(fildes, mode);
 
@@ -90,7 +91,7 @@ int fflush(FILE* stream)
 {
        static int (*fflushp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(fflush, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fflush, LIBC);
        ret = fflushp(stream);
        AFTER_ORIGINAL_FILEP(0, stream, FD_API_OTHER, "%p", stream);
        return ret;
@@ -101,7 +102,7 @@ int fclose(FILE* stream)
        static int (*fclosep)(FILE* stream);
        DECLARE_VARIABLE_FD;
 
-       GET_REAL_FUNC(fclose, libc.so.6);
+       GET_REAL_FUNC(fclose, LIBC);
 
        bfiltering = false;
        PRE_PROBEBLOCK_BEGIN();
@@ -123,7 +124,7 @@ int remove(const char* filename)
 {
        static int (*removep)(const char* filename);
 
-       BEFORE_ORIGINAL_FILE(remove, libc.so.6);
+       BEFORE_ORIGINAL_FILE(remove, LIBC);
        _filepath = (char*)filename;
        ret = removep(filename);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s", filename);
@@ -134,7 +135,7 @@ int rename(const char* oldname, const char* newname)
 {
        static int (*renamep)(const char* oldname, const char* newname);
 
-       BEFORE_ORIGINAL_FILE(rename, libc.so.6);
+       BEFORE_ORIGINAL_FILE(rename, LIBC);
        _filepath = (char*)newname;
        ret = renamep(oldname, newname);
        AFTER_ORIGINAL_NOFD(0, FD_API_DIRECTORY, "%s, %s", oldname, newname);
@@ -146,7 +147,7 @@ FILE * tmpfile ( void )
        static FILE* (*tmpfilep) ( void );
        FILE* fret;
 
-       BEFORE_ORIGINAL_FILE_NOFILTER(tmpfile, libc.so.6);
+       BEFORE_ORIGINAL_FILE_NOFILTER(tmpfile, LIBC);
        _filepath = "<temp file>";
        fret = tmpfilep();
 
@@ -159,7 +160,7 @@ int fgetpos(FILE* stream, fpos_t* position)
 {
        static int (*fgetposp)(FILE* stream, fpos_t* position);
 
-       BEFORE_ORIGINAL_FILE(fgetpos, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fgetpos, LIBC);
        ret = fgetposp(stream, position);
        AFTER_ORIGINAL_FILEP(0, stream, FD_API_OTHER, "%p, %p", stream, position);
        return ret;
@@ -169,7 +170,7 @@ int fseek(FILE* stream, long int offset, int origin)
 {
        static int (*fseekp)(FILE* stream, long int offset, int origin);
 
-       BEFORE_ORIGINAL_FILE(fseek, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fseek, LIBC);
        ret = fseekp(stream, offset, origin);
        AFTER_ORIGINAL_FILEP((unsigned int)offset, stream, FD_API_OTHER,
                        "%p, %ld, %d", stream, offset, origin);
@@ -180,7 +181,7 @@ int fsetpos(FILE* stream, const fpos_t* pos)
 {
        static int (*fsetposp)(FILE* stream, const fpos_t* pos);
 
-       BEFORE_ORIGINAL_FILE(fsetpos, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fsetpos, LIBC);
        ret = fsetposp(stream, pos);
        AFTER_ORIGINAL_FILEP(0, stream, FD_API_OTHER, "%p, %p", stream, pos);
        return ret;
@@ -191,7 +192,7 @@ long int ftell(FILE* stream)
        static long int (*ftellp)(FILE* stream);
        long int lret;
 
-       BEFORE_ORIGINAL_FILE(ftell, libc.so.6);
+       BEFORE_ORIGINAL_FILE(ftell, LIBC);
        
        lret = ftellp(stream);
 
@@ -204,7 +205,7 @@ void rewind(FILE* stream)
 {
        static void (*rewindp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(rewind, libc.so.6);
+       BEFORE_ORIGINAL_FILE(rewind, LIBC);
 
        rewindp(stream);
        
@@ -215,7 +216,7 @@ void clearerr(FILE* stream)
 {
        static void (*clearerrp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(clearerr, libc.so.6);
+       BEFORE_ORIGINAL_FILE(clearerr, LIBC);
 
        clearerrp(stream);
        
@@ -226,7 +227,7 @@ int feof(FILE* stream)
 {
        static int (*feofp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(feof, libc.so.6);
+       BEFORE_ORIGINAL_FILE(feof, LIBC);
        ret = feofp(stream);
        AFTER_ORIGINAL_FILEP(0, stream, FD_API_OTHER, "%p", stream);
        return ret;
@@ -236,7 +237,7 @@ int ferror(FILE* stream)
 {
        static int (*ferrorp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(ferror, libc.so.6);
+       BEFORE_ORIGINAL_FILE(ferror, LIBC);
        ret = ferrorp(stream);
        AFTER_ORIGINAL_FILEP(0, stream, FD_API_OTHER, "%p", stream);
        return ret;
@@ -246,7 +247,7 @@ int fileno(FILE* stream)
 {
        static int (*filenop)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(fileno, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fileno, LIBC);
        ret = filenop(stream);
        AFTER_ORIGINAL_FILEP(0, stream, FD_API_OTHER, "%p", stream);
        return ret;
@@ -256,7 +257,7 @@ void perror(const char* string)
 {
        static void (*perrorp)(const char* string);
 
-       BEFORE_ORIGINAL_FILE(perror, libc.so.6);
+       BEFORE_ORIGINAL_FILE(perror, LIBC);
 
        perrorp(string);
 
@@ -271,7 +272,7 @@ int vfprintf(FILE* stream, const char* format, va_list arg)
 {
        static int (*vfprintfp)(FILE* stream, const char* format, va_list arg);
 
-       BEFORE_ORIGINAL_FILE(vfprintf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(vfprintf, LIBC);
        ret = vfprintfp(stream, format, arg);
        AFTER_ORIGINAL_FILEP(ret, stream, FD_API_WRITE, "%p, %s", stream, format);
        return ret;
@@ -281,7 +282,7 @@ int vfscanf(FILE* stream, const char* format, va_list arg)
 {
        static int (*vfscanfp)(FILE* stream, const char* format, va_list arg);
 
-       BEFORE_ORIGINAL_FILE(vfscanf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(vfscanf, LIBC);
        ret = vfscanfp(stream, format, arg);
        AFTER_ORIGINAL_FILEP(ret, stream, FD_API_READ, "%p, %s", stream, format);
        return ret;
@@ -291,7 +292,7 @@ int fgetc(FILE* stream)
 {
        static int (*fgetcp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(fgetc, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fgetc, LIBC);
        ret = fgetcp(stream);
        AFTER_ORIGINAL_FILEP((ret == EOF ? 0 : 1), stream, FD_API_READ, "%p", stream);
        return ret;
@@ -303,7 +304,7 @@ char* fgets(char* str, int size, FILE* stream)
        static char* (*fgetsp)(char* str, int num, FILE* stream);
        char* cret;
 
-       BEFORE_ORIGINAL_FILE(fgets, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fgets, LIBC);
        
        cret = fgetsp(str, size, stream);
 
@@ -318,7 +319,7 @@ int fputc(int character, FILE* stream)
 {
        static int (*fputcp)(int character, FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(fputc, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fputc, LIBC);
        ret = fputcp(character, stream);
        AFTER_ORIGINAL_FILEP((ret == EOF ? 0 : 1), stream, FD_API_WRITE,
                        "%d, %p", character, stream);
@@ -329,7 +330,7 @@ int fputs(const char* str, FILE* stream)
 {
        static int (*fputsp)(const char* str, FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(fputs, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fputs, LIBC);
        ret = fputsp(str, stream);
        AFTER_ORIGINAL_FILEP(ret, stream, FD_API_WRITE, "%s, %p", str, stream);
        return ret;
@@ -339,7 +340,7 @@ int getc(FILE* stream)
 {
        static int (*getcp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(getc, libc.so.6);
+       BEFORE_ORIGINAL_FILE(getc, LIBC);
        ret = getcp(stream);
        AFTER_ORIGINAL_FILEP((ret == EOF ? 0 : 1), stream, FD_API_READ, "%p", stream);
        return ret;
@@ -349,7 +350,7 @@ int putc(int character, FILE* stream)
 {
        static int (*putcp)(int character, FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(putc, libc.so.6);
+       BEFORE_ORIGINAL_FILE(putc, LIBC);
        ret = putcp(character, stream);
        AFTER_ORIGINAL_FILEP((ret == EOF ? 0 : 1), stream, FD_API_WRITE,
                        "%d, %p", character, stream);
@@ -360,7 +361,7 @@ int ungetc(int character, FILE* stream)
 {
        static int (*ungetcp)(int character, FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(ungetc, libc.so.6);
+       BEFORE_ORIGINAL_FILE(ungetc, LIBC);
        ret = ungetcp(character, stream);
        AFTER_ORIGINAL_FILEP(0, stream, FD_API_OTHER, "%d, %p", character, stream);
        return ret;
@@ -371,7 +372,7 @@ size_t fread(void* ptr, size_t size, size_t count, FILE* stream)
        static size_t (*freadp)(void* ptr, size_t size, size_t count, FILE* stream);
        size_t tret;
 
-       BEFORE_ORIGINAL_FILE(fread, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fread, LIBC);
 
        tret = freadp(ptr, size, count, stream);
        
@@ -386,7 +387,7 @@ size_t fwrite(const void* ptr, size_t size, size_t count, FILE* stream)
        static size_t (*fwritep)(const void* ptr, size_t size, size_t count, FILE* stream);
        size_t tret;
 
-       BEFORE_ORIGINAL_FILE(fwrite, libc.so.6);
+       BEFORE_ORIGINAL_FILE(fwrite, LIBC);
 
        tret = fwritep(ptr, size, count, stream);
 
@@ -403,7 +404,7 @@ int fprintf(FILE* stream, const char* format, ...)
 {
        static int (*vfprintfp)(FILE* stream, const char* format, ...);
 
-       BEFORE_ORIGINAL_FILE(vfprintf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(vfprintf, LIBC);
 
        va_list arg;
        va_start(arg, format);
@@ -419,7 +420,7 @@ int fscanf(FILE* stream, const char* format, ...)
 {
        static int (*vfscanfp)(FILE* stream, const char* format, ...);
        
-       BEFORE_ORIGINAL_FILE(vfscanf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(vfscanf, LIBC);
 
        va_list arg;
        va_start(arg, format);
@@ -436,7 +437,7 @@ int printf(const char* format, ...)
 {
        static int (*vprintfp)(const char* format, ...);
        
-       BEFORE_ORIGINAL_FILE(vprintf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(vprintf, LIBC);
 
        va_list arg;
        va_start(arg, format);
@@ -453,7 +454,7 @@ int scanf(const char* format, ...)
 {
        static int (*vscanfp)(const char* format, ...);
 
-       BEFORE_ORIGINAL_FILE(vscanf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(vscanf, LIBC);
 
        va_list arg;
        va_start(arg, format);
@@ -469,7 +470,7 @@ int getchar()
 {
        static int (*getcharp)();
 
-       BEFORE_ORIGINAL_FILE(getchar, libc.so.6);
+       BEFORE_ORIGINAL_FILE(getchar, LIBC);
        ret = getcharp();
        AFTER_ORIGINAL_NOFD((ret == EOF ? 0 : 1), FD_API_READ, "%s", "");
        return ret;
@@ -479,7 +480,7 @@ int putchar(int c)
 {
        static int (*putcharp)(int c);
 
-       BEFORE_ORIGINAL_FILE(putchar, libc.so.6);
+       BEFORE_ORIGINAL_FILE(putchar, LIBC);
        ret = putcharp(c);
        AFTER_ORIGINAL_NOFD((ret == EOF ? 0 : 1), FD_API_WRITE, "%d", c);
        return ret;
@@ -490,7 +491,7 @@ char* gets(char* str)
        static char* (*getsp)(char* str);
        char* cret;
 
-       BEFORE_ORIGINAL_FILE(gets, libc.so.6);
+       BEFORE_ORIGINAL_FILE(gets, LIBC);
 
        cret = getsp(str);
        
@@ -504,7 +505,7 @@ int puts(const char* str)
 {
        static int (*putsp)(const char* str);
 
-       BEFORE_ORIGINAL_FILE(puts, libc.so.6);
+       BEFORE_ORIGINAL_FILE(puts, LIBC);
        ret = putsp(str);
        AFTER_ORIGINAL_NOFD(ret, FD_API_WRITE, "%s", str);
        return ret;
@@ -516,7 +517,7 @@ char* tmpnam(char* str)
        static char* (*tmpnamp)(char* str);
        char* cret;
 
-       BEFORE_ORIGINAL_FILE(tmpnam, libc.so.6);
+       BEFORE_ORIGINAL_FILE(tmpnam, LIBC);
 
        cret = tmpnamp(str);
 
@@ -529,7 +530,7 @@ void setbuf(FILE* stream, char* buf)
 {
        static void (*setbufp)(FILE* stream, char* buf);
 
-       BEFORE_ORIGINAL_FILE(setbuf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(setbuf, LIBC);
 
        setbufp(stream, buf);
 
@@ -541,7 +542,7 @@ void setbuffer(FILE* stream, char* buf, size_t size)
 {
        static void (*setbufferp)(FILE* stream, char* buf, size_t size);
 
-       BEFORE_ORIGINAL_FILE(setbuffer, libc.so.6);
+       BEFORE_ORIGINAL_FILE(setbuffer, LIBC);
 
        setbufferp(stream, buf, size);
 
@@ -553,7 +554,7 @@ void setlinebuf(FILE* stream)
 {
        static int (*setlinebufp)(FILE* stream);
 
-       BEFORE_ORIGINAL_FILE(setlinebuf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(setlinebuf, LIBC);
 
        setlinebufp(stream);
 
@@ -564,7 +565,7 @@ int setvbuf(FILE* stream, char* buf, int mode, size_t size)
 {
        static int (*setvbufp)(FILE* stream, char* buf, int mode, size_t size);
 
-       BEFORE_ORIGINAL_FILE(setvbuf, libc.so.6);
+       BEFORE_ORIGINAL_FILE(setvbuf, LIBC);
        ret = setvbufp(stream,buf,mode,size);
        AFTER_ORIGINAL_FILEP(size, stream, FD_API_OTHER,
                        "%p, %p, %d, %u", stream, buf, mode, size);
index 718ec1b..32658b5 100644 (file)
@@ -44,6 +44,7 @@
 #include "daprobe.h"
 #include "probeinfo.h"
 #include "dautil.h"
+#include "dahelper.h"
 #include "da_socket.h"
 
 static enum DaOptions _sopt = OPT_FILE;
@@ -52,7 +53,7 @@ int socket(int domain, int type, int protocol)
 {
        static int (*socketp)(int domain, int type, int protocol);
        
-       BEFORE_ORIGINAL_NOFILTER(socket, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(socket, LIBC);
 
        ret = socketp(domain, type, protocol);
        
@@ -68,7 +69,7 @@ int socketpair(int domain, int type, int protocol,int socket_vector[2])
 {
        static int (*socketpairp)(int domain, int type, int protocol,int socket_vector[2]);
        
-       BEFORE_ORIGINAL_NOFILTER(socketpair, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(socketpair, LIBC);
        
        ret = socketpairp(domain, type, protocol, socket_vector);
        
@@ -86,7 +87,7 @@ int shutdown(int socket, int how)
 {
        static int (*shutdownp)(int socket, int how);
        
-       BEFORE_ORIGINAL_NOFILTER(shutdown, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(shutdown, LIBC);
        
        ret = shutdownp(socket, how);
        
@@ -99,7 +100,7 @@ int bind(int socket, const struct sockaddr *address, socklen_t address_len)
 {
        static int (*bindp)(int socket, const struct sockaddr *address, socklen_t address_len);
        
-       BEFORE_ORIGINAL(bind, libc.so.6);
+       BEFORE_ORIGINAL(bind, LIBC);
        
        ret = bindp(socket, address, address_len);
 
@@ -113,7 +114,7 @@ int listen(int socket, int backlog)
 {
        static int (*listenp)(int socket, int backlog);
        
-       BEFORE_ORIGINAL(listen, libc.so.6);
+       BEFORE_ORIGINAL(listen, LIBC);
        
        ret = listenp(socket, backlog);
        
@@ -126,7 +127,7 @@ int accept(int socket, struct sockaddr *address, socklen_t *address_len)
 {
        static int (*acceptp)(int socket, struct sockaddr *address, socklen_t *address_len);
        
-       BEFORE_ORIGINAL_NOFILTER(accept, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(accept, LIBC);
        
        ret = acceptp(socket, address, address_len);
        
@@ -140,7 +141,7 @@ int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)
 {
        static int (*accept4p)(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags);
        
-       BEFORE_ORIGINAL_NOFILTER(accept4, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(accept4, LIBC);
        
        ret = accept4p(sockfd, addr, addrlen, flags);
        
@@ -154,7 +155,7 @@ int connect(int socket, const struct sockaddr *address, socklen_t address_len)
 {
        static int (*connectp)(int socket, const struct sockaddr *address, socklen_t address_len);
        
-       BEFORE_ORIGINAL(connect, libc.so.6);
+       BEFORE_ORIGINAL(connect, LIBC);
        
        ret = connectp(socket, address, address_len);
        
@@ -168,7 +169,7 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
 {
        static int (*selectp)(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
        
-       BEFORE_ORIGINAL(select, libc.so.6);
+       BEFORE_ORIGINAL(select, LIBC);
        
        ret = selectp(nfds, readfds, writefds,exceptfds, timeout);
        
@@ -182,7 +183,7 @@ int pselect(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds, const
 {
        static int (*pselectp)(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds, const struct timespec *ntimeout, const sigset_t *sigmask);
 
-       BEFORE_ORIGINAL(pselect, libc.so.6);
+       BEFORE_ORIGINAL(pselect, LIBC);
        
        ret = pselectp(nfds, readfds, writefds,exceptfds, ntimeout, sigmask);
        
@@ -197,7 +198,7 @@ ssize_t send(int socket, const void *message, size_t length, int flags)
        static ssize_t (*sendp)(int socket, const void *message, size_t length, int flags);
        ssize_t sret;
  
-       BEFORE_ORIGINAL(send, libc.so.6);
+       BEFORE_ORIGINAL(send, LIBC);
        
        sret = sendp(socket, message, length, flags);
        
@@ -212,7 +213,7 @@ ssize_t sendmsg(int socket, const struct msghdr *message, int flags)
        static ssize_t (*sendmsgp)(int socket, const struct msghdr *message, int flags);
        ssize_t sret;
  
-       BEFORE_ORIGINAL(sendmsg, libc.so.6);
+       BEFORE_ORIGINAL(sendmsg, LIBC);
        
        sret = sendmsgp(socket, message, flags);
        
@@ -227,7 +228,7 @@ ssize_t sendto(int socket, const void *message, size_t length, int flags,const s
        static ssize_t (*sendtop)(int socket, const void *message, size_t length, int flags,const struct sockaddr *dest_addr, socklen_t dest_len);
        ssize_t sret;
  
-       BEFORE_ORIGINAL(sendto, libc.so.6);
+       BEFORE_ORIGINAL(sendto, LIBC);
        
        sret = sendtop(socket, message, length, flags, dest_addr, dest_len);
        
@@ -242,7 +243,7 @@ ssize_t recv(int socket, void *buffer, size_t length, int flags)
        static ssize_t (*recvp)(int socket, void *buffer, size_t length, int flags);
        ssize_t sret;
  
-       BEFORE_ORIGINAL(recv, libc.so.6);
+       BEFORE_ORIGINAL(recv, LIBC);
 
        sret = recvp(socket, buffer, length, flags);
        
@@ -257,7 +258,7 @@ ssize_t recvfrom(int socket, void *buffer, size_t length, int flags, struct sock
        static ssize_t (*recvfromp)(int socket, void *buffer, size_t length, int flags, struct sockaddr *address, socklen_t *address_len);
        ssize_t sret;
 
-       BEFORE_ORIGINAL(recvfrom, libc.so.6);
+       BEFORE_ORIGINAL(recvfrom, LIBC);
        
        sret = recvfromp(socket, buffer, length, flags, address, address_len);
        
@@ -272,7 +273,7 @@ ssize_t recvmsg(int socket, struct msghdr *message, int flags)
        static ssize_t (*recvmsgp)(int socket, struct msghdr *message, int flags);
        ssize_t sret;
  
-       BEFORE_ORIGINAL(recvmsg, libc.so.6);
+       BEFORE_ORIGINAL(recvmsg, LIBC);
        
        sret = recvmsgp(socket, message, flags);
                
@@ -287,7 +288,7 @@ uint32_t htonl(uint32_t hostlong)
        static uint32_t (*htonlp)(uint32_t hostlong);
        uint32_t uret;
  
-       BEFORE_ORIGINAL(htonl, libc.so.6);
+       BEFORE_ORIGINAL(htonl, LIBC);
        
        uret = htonlp(hostlong);
                        
@@ -301,7 +302,7 @@ uint16_t htons(uint16_t hostshort)
        static uint16_t (*htonsp)(uint16_t hostshort);
        uint16_t uret;
  
-       BEFORE_ORIGINAL(htons, libc.so.6);
+       BEFORE_ORIGINAL(htons, LIBC);
        
        uret = htonsp(hostshort);
                                
@@ -315,7 +316,7 @@ uint32_t ntohl(uint32_t netlong)
        static uint32_t (*ntohlp)(uint32_t netlong);
        uint32_t uret;
  
-       BEFORE_ORIGINAL(ntohl, libc.so.6);
+       BEFORE_ORIGINAL(ntohl, LIBC);
        
        uret = ntohlp(netlong);
                                
@@ -329,7 +330,7 @@ uint16_t ntohs(uint16_t netshort)
        static uint16_t (*ntohsp)(uint16_t netshort);
        uint16_t uret;
  
-       BEFORE_ORIGINAL(ntohs, libc.so.6);
+       BEFORE_ORIGINAL(ntohs, LIBC);
        
        uret = ntohsp(netshort);
                                
@@ -344,7 +345,7 @@ uint16_t htobe16(uint16_t host_16bits)
        static uint16_t (*htobe16p)(uint16_t host_16bits);
        uint16_t uret;
  
-       BEFORE_ORIGINAL(htobe16, libc.so.6);
+       BEFORE_ORIGINAL(htobe16, LIBC);
        
        uret = htobe16p(host_16bits);
                                
@@ -358,7 +359,7 @@ uint16_t htole16(uint16_t host_16bits)
        static uint16_t (*htole16p)(uint16_t host_16bits);
        uint16_t uret;
  
-       BEFORE_ORIGINAL(htole16, libc.so.6);
+       BEFORE_ORIGINAL(htole16, LIBC);
        
        uret = htole16p(host_16bits);
                                
@@ -372,7 +373,7 @@ uint16_t be16toh(uint16_t big_endian_16bits)
        static uint16_t (*be16tohp)(uint16_t big_endian_16bits);
        uint16_t uret;
  
-       BEFORE_ORIGINAL(be16toh, libc.so.6);
+       BEFORE_ORIGINAL(be16toh, LIBC);
        
        uret = be16tohp(big_endian_16bits);
                                
@@ -387,7 +388,7 @@ uint16_t le16toh(uint16_t little_endian_16bits)
        static uint16_t (*le16tohp)(uint16_t little_endian_16bits);
        uint16_t uret;
  
-       BEFORE_ORIGINAL(le16toh, libc.so.6);
+       BEFORE_ORIGINAL(le16toh, LIBC);
        
        uret = le16tohp(little_endian_16bits);
                                
@@ -402,7 +403,7 @@ uint32_t htobe32(uint32_t host_32bits)
        static uint32_t (*htobe32p)(uint32_t host_32bits);
        uint32_t uret;
  
-       BEFORE_ORIGINAL(htobe32, libc.so.6);
+       BEFORE_ORIGINAL(htobe32, LIBC);
 
        uret = htobe32p(host_32bits);
  
@@ -417,7 +418,7 @@ uint32_t htole32(uint32_t host_32bits)
        static uint32_t (*htole32p)(uint32_t host_32bits);
        uint32_t uret;
  
-       BEFORE_ORIGINAL(htole32, libc.so.6);
+       BEFORE_ORIGINAL(htole32, LIBC);
 
        uret = htole32p(host_32bits);
  
@@ -432,7 +433,7 @@ uint32_t be32toh(uint32_t big_endian_32bits)
        static uint32_t (*be32tohp)(uint32_t big_endian_32bits);
        uint32_t uret;
  
-       BEFORE_ORIGINAL(be32toh, libc.so.6);
+       BEFORE_ORIGINAL(be32toh, LIBC);
 
        uret = be32tohp(big_endian_32bits);
  
@@ -447,7 +448,7 @@ uint32_t le32toh(uint32_t little_endian_32bits)
        static uint32_t (*le32tohp)(uint32_t little_endian_32bits);
        uint32_t uret;
  
-       BEFORE_ORIGINAL(le32toh, libc.so.6);
+       BEFORE_ORIGINAL(le32toh, LIBC);
 
        uret = le32tohp(little_endian_32bits);
  
@@ -462,7 +463,7 @@ uint64_t htobe64(uint64_t host_64bits)
        static uint64_t (*htobe64p)(uint64_t host_64bits);
        uint64_t uret;
 
-       BEFORE_ORIGINAL(htobe64, libc.so.6);
+       BEFORE_ORIGINAL(htobe64, LIBC);
 
        uret = htobe64p(host_64bits);
  
@@ -477,7 +478,7 @@ uint64_t htole64(uint64_t host_64bits)
        static uint64_t (*htole64p)(uint64_t host_64bits);
        uint64_t uret;
  
-       BEFORE_ORIGINAL(htole64, libc.so.6);
+       BEFORE_ORIGINAL(htole64, LIBC);
 
        uret = htole64p(host_64bits);
  
@@ -492,7 +493,7 @@ uint64_t be64toh(uint64_t big_endian_64bits)
        static uint64_t (*be64tohp)(uint64_t big_endian_64bits);
        uint64_t uret;
  
-       BEFORE_ORIGINAL(be64toh, libc.so.6);
+       BEFORE_ORIGINAL(be64toh, LIBC);
 
        uret = be64tohp(big_endian_64bits);
  
@@ -507,7 +508,7 @@ uint64_t le64toh(uint64_t little_endian_64bits)
        static uint64_t (*le64tohp)(uint64_t little_endian_64bits);
        uint64_t uret;
  
-       BEFORE_ORIGINAL(le64toh, libc.so.6);
+       BEFORE_ORIGINAL(le64toh, LIBC);
 
        uret = le64tohp(little_endian_64bits);
  
@@ -523,7 +524,7 @@ int inet_aton(const char *cp, struct in_addr *inp)
 {
        static int (*inet_atonp)(const char *cp, struct in_addr *inp);
 
-       BEFORE_ORIGINAL(inet_aton, libc.so.6);
+       BEFORE_ORIGINAL(inet_aton, LIBC);
        
        ret = inet_atonp(cp,inp);
 
@@ -537,7 +538,7 @@ in_addr_t inet_addr(const char *cp)
        static in_addr_t (*inet_addrp)(const char *cp);
        in_addr_t iret;
  
-       BEFORE_ORIGINAL(inet_addr, libc.so.6);
+       BEFORE_ORIGINAL(inet_addr, LIBC);
  
        iret = inet_addrp(cp);
        
@@ -551,7 +552,7 @@ in_addr_t inet_network(const char *cp)
        static in_addr_t (*inet_networkp)(const char *cp);
        in_addr_t iret;
  
-       BEFORE_ORIGINAL(inet_network, libc.so.6);
+       BEFORE_ORIGINAL(inet_network, LIBC);
  
        iret = inet_networkp(cp);
  
@@ -565,7 +566,7 @@ char *inet_ntoa(struct in_addr in)
        static char * (*inet_ntoap)(struct in_addr in);
        char* sret;
  
-       BEFORE_ORIGINAL(inet_ntoa, libc.so.6);
+       BEFORE_ORIGINAL(inet_ntoa, LIBC);
  
        sret = inet_ntoap(in);
 
@@ -580,7 +581,7 @@ struct in_addr inet_makeaddr(int net, int host)
        static struct in_addr (*inet_makeaddrp)(int net, int host);
        struct in_addr iret;
  
-       BEFORE_ORIGINAL(inet_makeaddr, libc.so.6);
+       BEFORE_ORIGINAL(inet_makeaddr, LIBC);
  
        iret = inet_makeaddrp(net,host);
  
@@ -596,7 +597,7 @@ in_addr_t inet_lnaof(struct in_addr in)
        static in_addr_t (*inet_lnaofp)(struct in_addr in);
        in_addr_t iret;
  
-       BEFORE_ORIGINAL(inet_lnaof, libc.so.6);
+       BEFORE_ORIGINAL(inet_lnaof, LIBC);
  
        iret = inet_lnaofp(in);
 
@@ -610,7 +611,7 @@ in_addr_t inet_netof(struct in_addr in)
        static in_addr_t (*inet_netofp)(struct in_addr in);
        in_addr_t iret;
  
-       BEFORE_ORIGINAL(inet_netof, libc.so.6);
+       BEFORE_ORIGINAL(inet_netof, LIBC);
  
        iret = inet_netofp(in);
 
@@ -624,7 +625,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size)
        static const char* (*inet_ntopp)(int af, const void *src, char *dst, socklen_t size);
        const char* cret;
  
-       BEFORE_ORIGINAL(inet_ntop, libc.so.6);
+       BEFORE_ORIGINAL(inet_ntop, LIBC);
  
        cret = inet_ntopp(af, src, dst, size);
 
@@ -638,7 +639,7 @@ int inet_pton(int af, const char *src, void *dst)
 {
        static int (*inet_ptonp)(int af, const char *src, void *dst);
  
-       BEFORE_ORIGINAL(inet_pton, libc.so.6);
+       BEFORE_ORIGINAL(inet_pton, LIBC);
  
        ret = inet_ptonp(af, src, dst);
 
@@ -651,7 +652,7 @@ int getaddrinfo(const char *node, const char *service, const struct addrinfo *hi
 {
        static int (*getaddrinfop)(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res);
  
-       BEFORE_ORIGINAL_NOFILTER(getaddrinfo, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(getaddrinfo, LIBC);
  
        ret = getaddrinfop(node, service, hints, res);
 
@@ -664,7 +665,7 @@ void freeaddrinfo(struct addrinfo *res)
 {
        static void (*freeaddrinfop)(struct addrinfo *res);
 
-       BEFORE_ORIGINAL_NOFILTER(freeaddrinfo, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(freeaddrinfo, LIBC);
  
        freeaddrinfop(res);
 
@@ -676,7 +677,7 @@ const char *gai_strerror(int errcode)
        static const char * (*gai_strerrorp)(int errcode);
        const char * cret;
  
-       BEFORE_ORIGINAL(gai_strerror, libc.so.6);
+       BEFORE_ORIGINAL(gai_strerror, LIBC);
  
        cret = gai_strerrorp(errcode);
 
@@ -689,7 +690,7 @@ int gai_suspend(const struct gaicb* const list[], int nitems, const struct times
 {
        static int (*gai_suspendp)(const struct gaicb* const list[], int nitems, const struct timespec *timeout);
 
-       BEFORE_ORIGINAL(gai_suspend, libc.so.6);
+       BEFORE_ORIGINAL(gai_suspend, LIBC);
  
        ret = gai_suspendp(list,nitems,timeout);
 
@@ -702,7 +703,7 @@ int gai_error(struct gaicb *req)
 {
        static int (*gai_errorp)(struct gaicb *req);
  
-       BEFORE_ORIGINAL(gai_error, libc.so.6);
+       BEFORE_ORIGINAL(gai_error, LIBC);
  
        ret = gai_errorp(req);
 
@@ -715,7 +716,7 @@ int gai_cancel(struct gaicb *req)
 {
        static int (*gai_cancelp)(struct gaicb *req);
  
-       BEFORE_ORIGINAL(gai_cancel, libc.so.6);
+       BEFORE_ORIGINAL(gai_cancel, LIBC);
  
        ret = gai_cancelp(req);
 
@@ -728,7 +729,7 @@ int getaddrinfo_a(int mode, struct gaicb *list[], int nitems, struct sigevent *s
 {
        static int (*getaddrinfo_ap)(int mode, struct gaicb *list[], int nitems, struct sigevent *sevp);
  
-       BEFORE_ORIGINAL(getaddrinfo_a, libc.so.6);
+       BEFORE_ORIGINAL(getaddrinfo_a, LIBC);
  
        ret = getaddrinfo_ap(mode, list,nitems, sevp);
 
@@ -742,7 +743,7 @@ int getsockopt(int socket, int level, int option_name, void *option_value, sockl
 {
        static int (*getsockoptp)(int socket, int level, int option_name, void *option_value, socklen_t *option_len);
  
-       BEFORE_ORIGINAL(getsockopt, libc.so.6);
+       BEFORE_ORIGINAL(getsockopt, LIBC);
  
        ret = getsockoptp(socket, level, option_name, option_value, option_len);
 
@@ -756,7 +757,7 @@ int setsockopt(int socket, int level, int option_name, const void *option_value,
 {
        static int (*setsockoptp)(int socket, int level, int option_name, const void *option_value, socklen_t option_len);
  
-       BEFORE_ORIGINAL(setsockopt, libc.so.6);
+       BEFORE_ORIGINAL(setsockopt, LIBC);
 
        ret = setsockoptp(socket, level, option_name, option_value, option_len);
 
@@ -771,7 +772,7 @@ int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen )
 {
        static int (*getsocknamep)(int sockfd, struct sockaddr *addr, socklen_t *addrlen );
  
-       BEFORE_ORIGINAL(getsockname, libc.so.6);
+       BEFORE_ORIGINAL(getsockname, LIBC);
  
        ret = getsocknamep(sockfd, addr, addrlen);
 
@@ -784,7 +785,7 @@ int getdomainname(char *name, size_t len)
 {
        static int (*getdomainnamep)(char *name, size_t len);
  
-       BEFORE_ORIGINAL(getdomainname, libc.so.6);
+       BEFORE_ORIGINAL(getdomainname, LIBC);
  
        ret = getdomainnamep(name, len);
 
@@ -797,7 +798,7 @@ int setdomainname(const char *name, size_t len)
 {
        static int (*setdomainnamep)(const char *name, size_t len);
  
-       BEFORE_ORIGINAL(setdomainname, libc.so.6);
+       BEFORE_ORIGINAL(setdomainname, LIBC);
  
        ret = setdomainnamep(name, len);
 
@@ -810,7 +811,7 @@ int gethostname(char *name, size_t len)
 {
        static int (*gethostnamep)(char *name, size_t len);
  
-       BEFORE_ORIGINAL(gethostname, libc.so.6);
+       BEFORE_ORIGINAL(gethostname, LIBC);
  
        ret = gethostnamep(name, len);
 
@@ -823,7 +824,7 @@ int sethostname(const char *name, size_t len)
 {
        static int (*sethostnamep)(const char *name, size_t len);
  
-       BEFORE_ORIGINAL(sethostname, libc.so.6);
+       BEFORE_ORIGINAL(sethostname, LIBC);
  
        ret = sethostnamep(name, len);
 
@@ -836,7 +837,7 @@ int getpeername(int s, struct sockaddr *addr, socklen_t *len)
 {
        static int (*getpeernamep)(int s, struct sockaddr *addr, socklen_t *len);
 
-       BEFORE_ORIGINAL(getpeername, libc.so.6);
+       BEFORE_ORIGINAL(getpeername, LIBC);
  
        ret = getpeernamep(s, addr, len);
 
@@ -849,7 +850,7 @@ int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_
 {
        static int (*getnameinfop)(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, unsigned int flags);
  
-       BEFORE_ORIGINAL(getnameinfo, libc.so.6);
+       BEFORE_ORIGINAL(getnameinfo, LIBC);
  
        ret = getnameinfop(sa, salen,host, hostlen, serv, servlen, flags);
 
@@ -864,7 +865,7 @@ struct hostent *gethostbyname(const char *name)
        static struct hostent * (*gethostbynamep)(const char *name);
        struct hostent* pret;
  
-       BEFORE_ORIGINAL(gethostbyname, libc.so.6);
+       BEFORE_ORIGINAL(gethostbyname, LIBC);
 
        pret = gethostbynamep(name);
 
@@ -878,7 +879,7 @@ struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type)
        static struct hostent * (*gethostbyaddrp)(const void *addr, socklen_t len, int type);
        struct hostent* pret;
  
-       BEFORE_ORIGINAL(gethostbyaddr, libc.so.6);
+       BEFORE_ORIGINAL(gethostbyaddr, LIBC);
  
        pret = gethostbyaddrp(addr, len, type);
 
@@ -892,7 +893,7 @@ void sethostent(int stayopen)
 {
        static void (*sethostentp)(int stayopen);
 
-       BEFORE_ORIGINAL(sethostent, libc.so.6);
+       BEFORE_ORIGINAL(sethostent, LIBC);
  
        sethostentp(stayopen);
  
@@ -903,7 +904,7 @@ void endhostent(void)
 {
        static void (*endhostentp)(void);
 
-       BEFORE_ORIGINAL(endhostent, libc.so.6);
+       BEFORE_ORIGINAL(endhostent, LIBC);
 
        endhostentp();
  
@@ -914,7 +915,7 @@ void herror(const char *s)
 {
        static void (*herrorp)(const char *s);
 
-       BEFORE_ORIGINAL(herror, libc.so.6);
+       BEFORE_ORIGINAL(herror, LIBC);
  
        herrorp(s);
  
@@ -926,7 +927,7 @@ const char *hstrerror(int err)
        static const char* (*hstrerrorp)(int err);
        const char* cret;
  
-       BEFORE_ORIGINAL(hstrerror, libc.so.6);
+       BEFORE_ORIGINAL(hstrerror, LIBC);
  
        cret = hstrerrorp(err);
 
@@ -940,7 +941,7 @@ struct hostent *gethostent(void)
        static struct hostent* (*gethostentp)(void);
        struct hostent* pret;
  
-       BEFORE_ORIGINAL(gethostent, libc.so.6);
+       BEFORE_ORIGINAL(gethostent, LIBC);
  
        pret = gethostentp();
 
@@ -954,7 +955,7 @@ struct hostent *gethostbyname2(const char *name, int af)
        static struct hostent * (*gethostbyname2p)(const char *name, int af);
        struct hostent* pret;
  
-       BEFORE_ORIGINAL(gethostbyname2, libc.so.6);
+       BEFORE_ORIGINAL(gethostbyname2, LIBC);
  
        pret = gethostbyname2p(name, af);
 
@@ -967,7 +968,7 @@ int gethostent_r(struct hostent *rret, char *buf, size_t buflen, struct hostent
 {
        static int (*gethostent_rp)(struct hostent *rret, char *buf, size_t buflen, struct hostent **result, int *h_errnop);
  
-       BEFORE_ORIGINAL(gethostent_r, libc.so.6);
+       BEFORE_ORIGINAL(gethostent_r, LIBC);
        
        ret = gethostent_rp(rret, buf, buflen, result, h_errnop);
  
@@ -981,7 +982,7 @@ int gethostbyaddr_r(const void *addr, socklen_t len, int type, struct hostent *r
 {
        static int (*gethostbyaddr_rp)(const void *addr, socklen_t len, int type, struct hostent *rret, char *buf, size_t buflen, struct hostent **result, int *h_errnop);
 
-       BEFORE_ORIGINAL(gethostbyaddr_r, libc.so.6);
+       BEFORE_ORIGINAL(gethostbyaddr_r, LIBC);
 
        ret = gethostbyaddr_rp(addr, len, type, rret, buf, buflen, result, h_errnop);
  
@@ -995,7 +996,7 @@ int gethostbyname_r(const char *name, struct hostent *rret, char *buf, size_t bu
 {
        static int (*gethostbyname_rp)(const char *name, struct hostent *rret, char *buf, size_t buflen, struct hostent **result, int *h_errnop);
  
-       BEFORE_ORIGINAL(gethostbyname_r, libc.so.6);
+       BEFORE_ORIGINAL(gethostbyname_r, LIBC);
 
        ret = gethostbyname_rp(name, rret, buf, buflen, result, h_errnop);
 
@@ -1009,7 +1010,7 @@ int gethostbyname2_r(const char *name, int af, struct hostent *rret, char *buf,
 {
        static int (*gethostbyname2_rp)(const char *name, int af, struct hostent *rret, char *buf, size_t buflen, struct hostent **result, int *h_errnop);
  
-       BEFORE_ORIGINAL(gethostbyname2_r, libc.so.6);
+       BEFORE_ORIGINAL(gethostbyname2_r, LIBC);
  
        ret = gethostbyname2_rp(name, af, rret, buf, buflen, result, h_errnop);
 
@@ -1024,7 +1025,7 @@ struct servent *getservbyname(const char *name, const char *proto)
        static struct servent * (*getservbynamep)(const char *name, const char *proto);
        struct servent* pret;
  
-       BEFORE_ORIGINAL(getservbyname, libc.so.6);
+       BEFORE_ORIGINAL(getservbyname, LIBC);
  
        pret = getservbynamep(name, proto);
 
@@ -1037,7 +1038,7 @@ void setservent(int stayopen)
 {
        static void (*setserventp)(int stayopen);
 
-       BEFORE_ORIGINAL(setservent, libc.so.6);
+       BEFORE_ORIGINAL(setservent, LIBC);
  
        setserventp(stayopen);
  
@@ -1048,7 +1049,7 @@ void endservent(void)
 {
        static void (*endserventp)(void);
 
-       BEFORE_ORIGINAL(endservent, libc.so.6);
+       BEFORE_ORIGINAL(endservent, LIBC);
  
        endserventp();
  
@@ -1060,7 +1061,7 @@ struct servent *getservent(void)
        static struct servent * (*getserventp)(void);
        struct servent* pret;
  
-       BEFORE_ORIGINAL(getservent, libc.so.6);
+       BEFORE_ORIGINAL(getservent, LIBC);
  
        pret = getserventp();
        
@@ -1074,7 +1075,7 @@ struct servent *getservbyport(int port, const char *proto)
        static struct servent * (*getservbyportp)(int port, const char *proto);
        struct servent* pret;
  
-       BEFORE_ORIGINAL(getservbyport, libc.so.6);
+       BEFORE_ORIGINAL(getservbyport, LIBC);
  
        pret = getservbyportp(port, proto);
 
@@ -1087,7 +1088,7 @@ int getservent_r(struct servent *result_buf, char *buf, size_t buflen, struct se
 {
        static int (*getservent_rp)(struct servent *result_buf, char *buf, size_t buflen, struct servent **result);
  
-       BEFORE_ORIGINAL(getservent_r, libc.so.6);
+       BEFORE_ORIGINAL(getservent_r, LIBC);
  
        ret = getservent_rp(result_buf, buf, buflen, result);
 
@@ -1101,7 +1102,7 @@ int getservbyname_r(const char *name, const char *proto, struct servent *result_
 {
        static int (*getservbyname_rp)(const char *name, const char *proto, struct servent *result_buf, char *buf, size_t buflen, struct servent **result);
  
-       BEFORE_ORIGINAL(getservbyname_r, libc.so.6);
+       BEFORE_ORIGINAL(getservbyname_r, LIBC);
  
        ret = getservbyname_rp(name, proto, result_buf, buf, buflen, result);
 
@@ -1115,7 +1116,7 @@ int getservbyport_r(int port, const char *proto, struct servent *result_buf, cha
 {
        static int (*getservbyport_rp)(int port, const char *proto, struct servent *result_buf, char *buf, size_t buflen, struct servent **result);
  
-       BEFORE_ORIGINAL(getservbyport_r, libc.so.6);
+       BEFORE_ORIGINAL(getservbyport_r, LIBC);
  
        ret = getservbyport_rp(port, proto, result_buf, buf, buflen, result);
        
@@ -1130,7 +1131,7 @@ struct netent* getnetent(void)
        static struct netent * (*getnetentp)(void);
        struct netent* pret;
  
-       BEFORE_ORIGINAL(getnetent, libc.so.6);
+       BEFORE_ORIGINAL(getnetent, LIBC);
  
        pret = getnetentp();
 
@@ -1144,7 +1145,7 @@ struct netent *getnetbyname(const char *name)
        static struct netent * (*getnetbynamep)(const char *name);
        struct netent* pret;
  
-       BEFORE_ORIGINAL(getnetbyname, libc.so.6);
+       BEFORE_ORIGINAL(getnetbyname, LIBC);
  
        pret = getnetbynamep(name);
 
@@ -1158,7 +1159,7 @@ struct netent *getnetbyaddr(uint32_t net, int type)
        static struct netent * (*getnetbyaddrp)(uint32_t net, int type);
        struct netent * pret;
  
-       BEFORE_ORIGINAL(getnetbyaddr, libc.so.6);
+       BEFORE_ORIGINAL(getnetbyaddr, LIBC);
 
        pret = getnetbyaddrp(net, type);
 
@@ -1171,7 +1172,7 @@ void setnetent(int stayopen)
 {
        static void (*setnetentp)(int stayopen);
 
-       BEFORE_ORIGINAL(setnetent, libc.so.6);
+       BEFORE_ORIGINAL(setnetent, LIBC);
  
        setnetentp(stayopen);
  
@@ -1182,7 +1183,7 @@ void endnetent(void)
 {
        static void (*endnetentp)(void);
 
-       BEFORE_ORIGINAL(endnetent, libc.so.6);
+       BEFORE_ORIGINAL(endnetent, LIBC);
  
        endnetentp();
  
@@ -1193,7 +1194,7 @@ int getnetent_r(struct netent *result_buf, char *buf, size_t buflen, struct nete
 {
        static int (*getnetent_rp)(struct netent *result_buf, char *buf, size_t buflen, struct netent **result, int *h_errnop);
  
-       BEFORE_ORIGINAL(getnetent_r, libc.so.6);
+       BEFORE_ORIGINAL(getnetent_r, LIBC);
  
        ret = getnetent_rp(result_buf, buf, buflen, result, h_errnop);
 
@@ -1207,7 +1208,7 @@ int getnetbyname_r(const char *name, struct netent *result_buf, char *buf, size_
 {
        static int (*getnetbyname_rp)(const char *name, struct netent *result_buf, char *buf, size_t buflen, struct netent **result, int *h_errnop);
  
-       BEFORE_ORIGINAL(getnetbyname_r, libc.so.6);
+       BEFORE_ORIGINAL(getnetbyname_r, LIBC);
  
        ret = getnetbyname_rp(name,result_buf, buf, buflen, result, h_errnop);
 
@@ -1221,7 +1222,7 @@ int getnetbyaddr_r(uint32_t net, int type, struct netent *result_buf, char *buf,
 {
        static int (*getnetbyaddr_rp)(uint32_t net, int type, struct netent *result_buf, char *buf, size_t buflen, struct netent **result, int *h_errnop);
  
-       BEFORE_ORIGINAL(getnetbyaddr_r, libc.so.6);
+       BEFORE_ORIGINAL(getnetbyaddr_r, LIBC);
  
        ret = getnetbyaddr_rp(net, type, result_buf, buf, buflen, result, h_errnop);
 
@@ -1236,7 +1237,7 @@ struct protoent *getprotoent(void)
        static struct protoent * (*getprotoentp)(void);
        struct protoent * pret;
  
-       BEFORE_ORIGINAL(getprotoent, libc.so.6);
+       BEFORE_ORIGINAL(getprotoent, LIBC);
  
        pret = getprotoentp();
 
@@ -1250,7 +1251,7 @@ struct protoent *getprotobyname(const char *name)
        static struct protoent * (*getprotobynamep)(const char *name);
        struct protoent * pret;
  
-       BEFORE_ORIGINAL(getprotobyname, libc.so.6);
+       BEFORE_ORIGINAL(getprotobyname, LIBC);
  
        pret = getprotobynamep(name);
 
@@ -1264,7 +1265,7 @@ struct protoent *getprotobynumber(int proto)
        static struct protoent * (*getprotobynumberp)(int proto);
        struct protoent * pret;
  
-       BEFORE_ORIGINAL(getprotobynumber, libc.so.6);
+       BEFORE_ORIGINAL(getprotobynumber, LIBC);
  
        pret = getprotobynumberp(proto);
 
@@ -1277,7 +1278,7 @@ void setprotoent(int stayopen)
 {
        static void (*setprotoentp)(int stayopen);
 
-       BEFORE_ORIGINAL(setprotoent, libc.so.6);
+       BEFORE_ORIGINAL(setprotoent, LIBC);
  
        setprotoentp(stayopen);
  
@@ -1288,7 +1289,7 @@ void endprotoent(void)
 {
        static void (*endprotoentp)(void);
 
-       BEFORE_ORIGINAL(endprotoent, libc.so.6);
+       BEFORE_ORIGINAL(endprotoent, LIBC);
  
        endprotoentp();
  
@@ -1299,7 +1300,7 @@ int getprotoent_r(struct protoent *result_buf, char *buf, size_t buflen, struct
 {
        static int (*getprotoent_rp)(struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result);
  
-       BEFORE_ORIGINAL(getprotoent_r, libc.so.6);
+       BEFORE_ORIGINAL(getprotoent_r, LIBC);
  
        ret = getprotoent_rp(result_buf, buf, buflen, result);
 
@@ -1313,7 +1314,7 @@ int getprotobyname_r(const char *name, struct protoent *result_buf, char *buf, s
 {
        static int (*getprotobyname_rp)(const char *name, struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result);
  
-       BEFORE_ORIGINAL(getprotobyname_r, libc.so.6);
+       BEFORE_ORIGINAL(getprotobyname_r, LIBC);
  
        ret = getprotobyname_rp(name, result_buf, buf, buflen, result);
 
@@ -1327,7 +1328,7 @@ int getprotobynumber_r(int proto, struct protoent *result_buf, char *buf, size_t
 {
        static int (*getprotobynumber_rp)(int proto, struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result);
  
-       BEFORE_ORIGINAL(getprotobynumber_r, libc.so.6);
+       BEFORE_ORIGINAL(getprotobynumber_r, LIBC);
  
        ret = getprotobynumber_rp(proto, result_buf, buf, buflen, result);
 
@@ -1342,7 +1343,7 @@ unsigned int if_nametoindex (__const char *__ifname)
        static unsigned int (*if_nametoindexp)(__const char *__ifname);
        unsigned int uret;
  
-       BEFORE_ORIGINAL(if_nametoindex, libc.so.6);
+       BEFORE_ORIGINAL(if_nametoindex, LIBC);
  
        uret = if_nametoindexp(__ifname);
 
@@ -1356,7 +1357,7 @@ char *if_indextoname (unsigned int __ifindex, char *__ifname)
        static char * (*if_indextonamep)(unsigned int __ifindex, char *__ifname);
        char * cret;
        
-       BEFORE_ORIGINAL(if_indextoname, libc.so.6);
+       BEFORE_ORIGINAL(if_indextoname, LIBC);
  
        cret = if_indextonamep(__ifindex, __ifname);
  
@@ -1371,7 +1372,7 @@ struct if_nameindex *if_nameindex (void)
        static struct if_nameindex * (*if_nameindexp)(void);
        struct if_nameindex * pret;
  
-       BEFORE_ORIGINAL_NOFILTER(if_nameindex, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(if_nameindex, LIBC);
        
        pret = if_nameindexp();
  
@@ -1384,7 +1385,7 @@ void if_freenameindex (struct if_nameindex *__ptr)
 {
        static void (*if_freenameindexp)(struct if_nameindex *__ptr);
 
-       BEFORE_ORIGINAL_NOFILTER(if_freenameindex, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(if_freenameindex, LIBC);
  
        if_freenameindexp(__ptr);
  
@@ -1395,7 +1396,7 @@ int getifaddrs(struct ifaddrs **ifap)
 {
        static int (*getifaddrsp)(struct ifaddrs **ifap);
  
-       BEFORE_ORIGINAL_NOFILTER(getifaddrs, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(getifaddrs, LIBC);
  
        ret = getifaddrsp(ifap);
 
@@ -1408,7 +1409,7 @@ void freeifaddrs(struct ifaddrs *ifa)
 {
        static void (*freeifaddrsp)(struct ifaddrs *ifa);
 
-       BEFORE_ORIGINAL_NOFILTER(freeifaddrs, libc.so.6);
+       BEFORE_ORIGINAL_NOFILTER(freeifaddrs, LIBC);
  
        freeifaddrsp(ifa);
  
@@ -1420,7 +1421,7 @@ int poll(struct pollfd *ufds, unsigned int nfds, int timeout)
 {
        static int (*pollp)(struct pollfd *ufds, unsigned int nfds, int timeout);
  
-       BEFORE_ORIGINAL(poll, libc.so.6);
+       BEFORE_ORIGINAL(poll, LIBC);
  
        ret = pollp(ufds, nfds, timeout);
 
@@ -1433,7 +1434,7 @@ int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts, co
 {
        static int (*ppollp)(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts, const sigset_t *sigmask);
  
-       BEFORE_ORIGINAL(ppoll, libc.so.6);
+       BEFORE_ORIGINAL(ppoll, LIBC);
  
        ret = ppollp(fds, nfds, timeout_ts, sigmask);
 
index a714220..755d9e8 100644 (file)
@@ -41,7 +41,7 @@ int daemon_close_allv(const int except_fds[])
        int i, saved_errno, ret;
        int* fds;
 
-       GET_REAL_FUNCP(daemon_close_allv, libdaemon.so.0, daemon_close_allvp);
+       GET_REAL_FUNCP(daemon_close_allv, LIBDAEMON, daemon_close_allvp);
 
        probeBlockStart();
        // get number of fds
index 71dc7e2..6dd9ff1 100644 (file)
@@ -43,7 +43,7 @@ int pthread_mutex_init(pthread_mutex_t *mutex,
        static int (*pthread_mutex_initp)(pthread_mutex_t *mutex,
                        const pthread_mutexattr_t *attr);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutex_init, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutex_init, LIBPTHREAD);
 
        ret = pthread_mutex_initp(mutex, attr);
 
@@ -56,7 +56,7 @@ int pthread_mutex_init(pthread_mutex_t *mutex,
 int pthread_mutex_destroy(pthread_mutex_t *mutex) {
        static int (*pthread_mutex_destroyp)(pthread_mutex_t *mutex);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutex_destroy, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutex_destroy, LIBPTHREAD);
 
        ret = pthread_mutex_destroyp(mutex);
 
@@ -69,7 +69,7 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex) {
 int real_pthread_mutex_lock(pthread_mutex_t *mutex) {
        static int (*pthread_mutex_lockp)(pthread_mutex_t *mutex);
 
-       GET_REAL_FUNC(pthread_mutex_lock, libpthread.so.0);
+       GET_REAL_FUNC(pthread_mutex_lock, LIBPTHREAD);
 
        return pthread_mutex_lockp(mutex);
 }
@@ -78,7 +78,7 @@ int pthread_mutex_lock(pthread_mutex_t *mutex) {
        static int (*pthread_mutex_lockp)(pthread_mutex_t *mutex);
        
        DECLARE_VARIABLE_STANDARD;
-       GET_REAL_FUNC(pthread_mutex_lock, libpthread.so.0);
+       GET_REAL_FUNC(pthread_mutex_lock, LIBPTHREAD);
 
        PRE_PROBEBLOCK_BEGIN();
        // send WAIT_START log
@@ -122,7 +122,7 @@ int pthread_mutex_timedlock(pthread_mutex_t *mutex,
                        const struct timespec *abs_timeout);
 
        DECLARE_VARIABLE_STANDARD;
-       GET_REAL_FUNC(pthread_mutex_timedlock, libpthread.so.0);
+       GET_REAL_FUNC(pthread_mutex_timedlock, LIBPTHREAD);
 
        PRE_PROBEBLOCK_BEGIN();
        // send WAIT_START log
@@ -163,7 +163,7 @@ int pthread_mutex_timedlock(pthread_mutex_t *mutex,
 int pthread_mutex_trylock(pthread_mutex_t *mutex) {
        static int (*pthread_mutex_trylockp)(pthread_mutex_t *mutex);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutex_trylock, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutex_trylock, LIBPTHREAD);
 
        ret = pthread_mutex_trylockp(mutex);
 
@@ -176,7 +176,7 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex) {
 int real_pthread_mutex_unlock(pthread_mutex_t *mutex) {
        static int (*pthread_mutex_unlockp)(pthread_mutex_t *mutex);
 
-       GET_REAL_FUNC(pthread_mutex_unlock, libpthread.so.0);
+       GET_REAL_FUNC(pthread_mutex_unlock, LIBPTHREAD);
 
        return pthread_mutex_unlockp(mutex);
 }
@@ -184,7 +184,7 @@ int real_pthread_mutex_unlock(pthread_mutex_t *mutex) {
 int pthread_mutex_unlock(pthread_mutex_t *mutex) {
        static int (*pthread_mutex_unlockp)(pthread_mutex_t *mutex);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutex_unlock, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutex_unlock, LIBPTHREAD);
 
        ret = pthread_mutex_unlockp(mutex);
 
@@ -197,7 +197,7 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex) {
 int pthread_mutexattr_init(pthread_mutexattr_t *attr) {
        static int (*pthread_mutexattr_initp)(pthread_mutexattr_t *attr);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_init, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_init, LIBPTHREAD);
 
        ret = pthread_mutexattr_initp(attr);
 
@@ -210,7 +210,7 @@ int pthread_mutexattr_init(pthread_mutexattr_t *attr) {
 int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) {
        static int (*pthread_mutexattr_destroyp)(pthread_mutexattr_t *attr);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_destroy, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_destroy, LIBPTHREAD);
 
        ret = pthread_mutexattr_destroyp(attr);
 
@@ -225,7 +225,7 @@ int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr,
        static int (*pthread_mutexattr_getprioceilingp)(
                        const pthread_mutexattr_t *attr, int *prioceiling);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_getprioceiling, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_getprioceiling, LIBPTHREAD);
 
        ret = pthread_mutexattr_getprioceilingp(attr, prioceiling);
 
@@ -240,7 +240,7 @@ int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr,
        static int (*pthread_mutexattr_setprioceilingp)(
                        pthread_mutexattr_t *attr, int prioceiling);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_setprioceiling, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_setprioceiling, LIBPTHREAD);
 
        ret = pthread_mutexattr_setprioceilingp(attr, prioceiling);
 
@@ -255,7 +255,7 @@ int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr,
        static int (*pthread_mutexattr_getprotocolp)(
                        const pthread_mutexattr_t *attr, int *protocol);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_getprotocol, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_getprotocol, LIBPTHREAD);
 
        ret = pthread_mutexattr_getprotocolp(attr, protocol);
 
@@ -270,7 +270,7 @@ int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr,
        static int (*pthread_mutexattr_setprotocolp)(
                        pthread_mutexattr_t *attr, int protocol);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_setprotocol, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_setprotocol, LIBPTHREAD);
 
        ret = pthread_mutexattr_setprotocolp(attr, protocol);
 
@@ -285,7 +285,7 @@ int pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr,
        static int (*pthread_mutexattr_getpsharedp)(
                        const pthread_mutexattr_t *attr, int *pshared);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_getpshared, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_getpshared, LIBPTHREAD);
 
        ret = pthread_mutexattr_getpsharedp(attr, pshared);
 
@@ -300,7 +300,7 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
        static int (*pthread_mutexattr_setpsharedp)(
                        pthread_mutexattr_t *attr, int pshared);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_setpshared, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_setpshared, LIBPTHREAD);
 
        ret = pthread_mutexattr_setpsharedp(attr, pshared);
 
@@ -314,7 +314,7 @@ int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type) {
        static int (*pthread_mutexattr_gettypep)(
                        const pthread_mutexattr_t *attr, int *type);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_gettype, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_gettype, LIBPTHREAD);
 
        ret = pthread_mutexattr_gettypep(attr, type);
 
@@ -328,7 +328,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) {
        static int (*pthread_mutexattr_settypep)(
                        pthread_mutexattr_t *attr, int type);
 
-       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_settype, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_mutexattr_settype, LIBPTHREAD);
 
        ret = pthread_mutexattr_settypep(attr, type);
 
@@ -349,7 +349,7 @@ int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) {
        static int (*pthread_cond_initp)(pthread_cond_t *cond,
                        const pthread_condattr_t *attr);
 
-       BEFORE_ORIGINAL_SYNC(pthread_cond_init, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_cond_init, LIBPTHREAD);
 
        ret = pthread_cond_initp(cond, attr);
 
@@ -362,7 +362,7 @@ int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) {
 int pthread_cond_destroy(pthread_cond_t *cond) {
        static int (*pthread_cond_destroyp)(pthread_cond_t *cond);
 
-       BEFORE_ORIGINAL_SYNC(pthread_cond_destroy, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_cond_destroy, LIBPTHREAD);
 
        ret = pthread_cond_destroyp(cond);
 
@@ -377,7 +377,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) {
                        pthread_mutex_t *mutex);
 
        DECLARE_VARIABLE_STANDARD;
-       GET_REAL_FUNC(pthread_cond_wait, libpthread.so.0);
+       GET_REAL_FUNC(pthread_cond_wait, LIBPTHREAD);
 
        PRE_PROBEBLOCK_BEGIN();
        // send WAIT_START log
@@ -421,7 +421,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
                                pthread_mutex_t *mutex, const struct timespec *abstime);
 
        DECLARE_VARIABLE_STANDARD;
-       GET_REAL_FUNC(pthread_cond_timedwait, libpthread.so.0);
+       GET_REAL_FUNC(pthread_cond_timedwait, LIBPTHREAD);
 
        PRE_PROBEBLOCK_BEGIN();
        // send WAIT_START log
@@ -462,7 +462,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
 int pthread_cond_signal(pthread_cond_t *cond) {
        static int (*pthread_cond_signalp)(pthread_cond_t *cond);
 
-       BEFORE_ORIGINAL_SYNC(pthread_cond_signal, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_cond_signal, LIBPTHREAD);
 
        ret = pthread_cond_signalp(cond);
 
@@ -475,7 +475,7 @@ int pthread_cond_signal(pthread_cond_t *cond) {
 int pthread_cond_broadcast(pthread_cond_t *cond) {
        static int (*pthread_cond_broadcastp)(pthread_cond_t *cond);
 
-       BEFORE_ORIGINAL_SYNC(pthread_cond_broadcast, libpthread.so.0);
+       BEFORE_ORIGINAL_SYNC(pthread_cond_broadcast, LIBPTHREAD);
 
        ret = pthread_cond_broadcastp(cond);
 
index e542536..8ee23ce 100644 (file)
@@ -116,7 +116,7 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
        static int (*pthread_createp)(pthread_t *thread,
                        const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg);
 
-       BEFORE_ORIGINAL_THREAD(pthread_create, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_create, LIBPTHREAD);
 
        if(blockresult)
        {
@@ -145,7 +145,7 @@ int pthread_join(pthread_t thread, void **retval)
        static int (*pthread_joinp)(pthread_t thread, void **retval);
 
        DECLARE_VARIABLE_STANDARD;
-       GET_REAL_FUNC(pthread_join, libpthread.so.0);
+       GET_REAL_FUNC(pthread_join, LIBPTHREAD);
 
        PRE_PROBEBLOCK_BEGIN();
        // send WAIT_START log
@@ -188,7 +188,7 @@ void pthread_exit(void *retval)
        static void (*pthread_exitp)(void *retval) __attribute__((noreturn));
 
        DECLARE_VARIABLE_STANDARD;
-       GET_REAL_FUNC(pthread_exit, libpthread.so.0);
+       GET_REAL_FUNC(pthread_exit, LIBPTHREAD);
 
        PRE_PROBEBLOCK_BEGIN();
        newerrno = 0;
@@ -212,7 +212,7 @@ int pthread_cancel(pthread_t thread)
 {
        static int (*pthread_cancelp)(pthread_t thread);
 
-       BEFORE_ORIGINAL_THREAD(pthread_cancel, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_cancel, LIBPTHREAD);
 
        ret = pthread_cancelp(thread);
        
@@ -225,7 +225,7 @@ int pthread_detach(pthread_t thread)
 {
        static int (*pthread_detachp)(pthread_t thread);
 
-       BEFORE_ORIGINAL_THREAD(pthread_detach, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_detach, LIBPTHREAD);
 
        ret = pthread_detachp(thread);
        
@@ -239,7 +239,7 @@ pthread_t pthread_self(void)
        pthread_t ret_pthr;
        static pthread_t (*pthread_selfp)(void);
 
-       BEFORE_ORIGINAL_THREAD(pthread_self, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_self, LIBPTHREAD);
 
        ret_pthr = pthread_selfp();
        
@@ -264,7 +264,7 @@ int pthread_equal(pthread_t t1, pthread_t t2)
 {
        static int (*pthread_equalp)(pthread_t t1, pthread_t t2);
 
-       BEFORE_ORIGINAL_THREAD(pthread_equal, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_equal, LIBPTHREAD);
 
        ret = pthread_equalp(t1, t2);
        
@@ -278,7 +278,7 @@ int pthread_setcancelstate(int state, int *oldstate)
        pthread_t pSelf;
        static int (*pthread_setcancelstatep)(int state, int *oldstate);
 
-       BEFORE_ORIGINAL_THREAD(pthread_setcancelstate, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_setcancelstate, LIBPTHREAD);
 
        pSelf = pthread_self();
        ret = pthread_setcancelstatep(state, oldstate);
@@ -294,7 +294,7 @@ int pthread_setcanceltype(int type, int *oldtype)
        pthread_t pSelf;
        static int (*pthread_setcanceltypep)(int type, int *oldtype);
 
-       BEFORE_ORIGINAL_THREAD(pthread_setcanceltype, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_setcanceltype, LIBPTHREAD);
 
        pSelf = pthread_self();
        ret = pthread_setcanceltypep(type, oldtype);
@@ -310,7 +310,7 @@ int pthread_attr_init(pthread_attr_t *attr)
        pthread_t thread = 0;
        static int (*pthread_attr_initp)(pthread_attr_t *attr);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_init, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_init, LIBPTHREAD);
 
        ret = pthread_attr_initp(attr);
 
@@ -324,7 +324,7 @@ int pthread_attr_destroy(pthread_attr_t *attr)
        pthread_t thread = 0;
        static int (*pthread_attr_destroyp)(pthread_attr_t *attr);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_destroy, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_destroy, LIBPTHREAD);
 
        ret = pthread_attr_destroyp(attr);
 
@@ -339,7 +339,7 @@ int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
        static int (*pthread_attr_getdetachstatep)(const pthread_attr_t *attr,
                        int *detachstate);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getdetachstate, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getdetachstate, LIBPTHREAD);
 
        ret = pthread_attr_getdetachstatep(attr, detachstate);
 
@@ -355,7 +355,7 @@ int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
        static int (*pthread_attr_setdetachstatep)(pthread_attr_t *attr, 
                        int detachstate);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setdetachstate, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setdetachstate, LIBPTHREAD);
 
        ret = pthread_attr_setdetachstatep(attr, detachstate);
 
@@ -371,7 +371,7 @@ int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize)
        static int (*pthread_attr_getstacksizep)(const pthread_attr_t *attr,
                        size_t *stacksize);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getstacksize, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getstacksize, LIBPTHREAD);
 
        ret = pthread_attr_getstacksizep(attr, stacksize);
 
@@ -387,7 +387,7 @@ int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
        static int (*pthread_attr_setstacksizep)(pthread_attr_t *attr, 
                        size_t stacksize);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setstacksize, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setstacksize, LIBPTHREAD);
 
        ret = pthread_attr_setstacksizep(attr, stacksize);
 
@@ -403,7 +403,7 @@ int pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
        static int (*pthread_attr_getstackaddrp)(const pthread_attr_t *attr,
                        void **stackaddr);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getstackaddr, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getstackaddr, LIBPTHREAD);
 
        ret = pthread_attr_getstackaddrp(attr, stackaddr);
 
@@ -419,7 +419,7 @@ int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
        static int (*pthread_attr_setstackaddrp)(pthread_attr_t *attr, 
                        void *stackaddr);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setstackaddr, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setstackaddr, LIBPTHREAD);
 
        ret = pthread_attr_setstackaddrp(attr, stackaddr);
 
@@ -435,7 +435,7 @@ int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inheritsched)
        static int (*pthread_attr_getinheritschedp)(const pthread_attr_t *attr,
                        int *inheritsched);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getinheritsched, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getinheritsched, LIBPTHREAD);
 
        ret = pthread_attr_getinheritschedp(attr, inheritsched);
 
@@ -451,7 +451,7 @@ int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched)
        static int (*pthread_attr_setinheritschedp)(pthread_attr_t *attr, 
                        int inheritsched);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setinheritsched, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setinheritsched, LIBPTHREAD);
 
        ret = pthread_attr_setinheritschedp(attr, inheritsched);
 
@@ -468,7 +468,7 @@ int pthread_attr_getschedparam(const pthread_attr_t *attr,
        static int (*pthread_attr_getschedparamp)(const pthread_attr_t *attr,
                        struct sched_param *param);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getschedparam, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getschedparam, LIBPTHREAD);
 
        ret = pthread_attr_getschedparamp(attr, param);
 
@@ -485,7 +485,7 @@ int pthread_attr_setschedparam(pthread_attr_t *attr,
        static int (*pthread_attr_setschedparamp)(pthread_attr_t *attr,
                        const struct sched_param *param);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setschedparam, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setschedparam, LIBPTHREAD);
 
        ret = pthread_attr_setschedparamp(attr, param);
 
@@ -501,7 +501,7 @@ int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
        static int (*pthread_attr_getschedpolicyp)(const pthread_attr_t *attr,
                        int *policy);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getschedpolicy, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getschedpolicy, LIBPTHREAD);
 
        ret = pthread_attr_getschedpolicyp(attr, policy);
 
@@ -517,7 +517,7 @@ int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
        static int (*pthread_attr_setschedpolicyp)(pthread_attr_t *attr, 
                        int policy);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setschedpolicy, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setschedpolicy, LIBPTHREAD);
 
        ret = pthread_attr_setschedpolicyp(attr, policy);
 
@@ -533,7 +533,7 @@ int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize)
        static int (*pthread_attr_getguardsizep)(const pthread_attr_t *attr,
                        size_t *guardsize);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getguardsize, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getguardsize, LIBPTHREAD);
 
        ret = pthread_attr_getguardsizep(attr, guardsize);
 
@@ -549,7 +549,7 @@ int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize)
        static int (*pthread_attr_setguardsizep)(pthread_attr_t *attr, 
                        size_t guardsize);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setguardsize, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setguardsize, LIBPTHREAD);
 
        ret = pthread_attr_setguardsizep(attr, guardsize);
 
@@ -565,7 +565,7 @@ int pthread_attr_getscope(const pthread_attr_t *attr, int *contentionscope)
        static int (*pthread_attr_getscopep)(const pthread_attr_t *attr,
                        int *contentionscope);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getscope, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getscope, LIBPTHREAD);
 
        ret = pthread_attr_getscopep(attr, contentionscope);
 
@@ -581,7 +581,7 @@ int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope)
        static int (*pthread_attr_setscopep)(pthread_attr_t *attr, 
                        int contentionscope);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setscope, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setscope, LIBPTHREAD);
 
        ret = pthread_attr_setscopep(attr, contentionscope);
 
@@ -598,7 +598,7 @@ int pthread_attr_getstack(const pthread_attr_t *attr,
        static int (*pthread_attr_getstackp)(const pthread_attr_t *attr,
                        void **stackaddr, size_t *stacksize);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_getstack, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_getstack, LIBPTHREAD);
 
        ret = pthread_attr_getstackp(attr, stackaddr, stacksize);
 
@@ -615,7 +615,7 @@ int pthread_attr_setstack(pthread_attr_t *attr,
        static int (*pthread_attr_setstackp)(pthread_attr_t *attr,
                        void *stackaddr, size_t stacksize);
 
-       BEFORE_ORIGINAL_THREAD(pthread_attr_setstack, libpthread.so.0);
+       BEFORE_ORIGINAL_THREAD(pthread_attr_setstack, LIBPTHREAD);
 
        ret = pthread_attr_setstackp(attr, stackaddr, stacksize);
 
index 86be9ec..ea387b9 100644 (file)
@@ -133,7 +133,7 @@ int app_efl_main(int *argc, char ***argv, app_event_callback_s *callback, void *
        static int (*app_efl_mainp)(int* argc, char*** argv, app_event_callback_s* callback, void* user_data);
        int ret;
 
-       GET_REAL_FUNC(app_efl_main, libcapi-appfw-application.so.0);
+       GET_REAL_FUNC(app_efl_main, LIBCAPI_APPFW_APPLICATION);
 
        gAppCallback.create = callback->create;
        gAppCallback.terminate = callback->terminate;
index f7599fa..be634ff 100755 (executable)
@@ -237,7 +237,7 @@ void _EcoreEvasMgr::SetEcoreEvas(const _EcoreEvas& ecoreevas)
        static methodType _ecoreevasmgr_setecoreevasp;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui13_EcoreEvasMgr12SetEcoreEvasERKNS0_10_EcoreEvasE,
-                       libosp-uifw.so, _ecoreevasmgr_setecoreevasp);
+                       LIBOSP_UIFW, _ecoreevasmgr_setecoreevasp);
 
        probeBlockStart();
        evas_event_callback_add(ecoreevas.GetEvas(),
@@ -255,7 +255,7 @@ result Control::SetShowState(bool state)
        result ret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7Control12SetShowStateEb,
-                       libosp-uifw.so, control_setshowstatep);
+                       LIBOSP_UIFW, control_setshowstatep);
 
        ret = (this->*control_setshowstatep)(state);
 
@@ -293,7 +293,7 @@ result Frame::SetCurrentForm(const Form& form)
        result ret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5Frame14SetCurrentFormERKNS1_4FormE,
-                       libosp-uifw.so, frame_setcurrentformp);
+                       LIBOSP_UIFW, frame_setcurrentformp);
 
        ret = (this->*frame_setcurrentformp)(form);
 
@@ -316,7 +316,7 @@ result FrameAnimator::SetCurrentForm(const Tizen::Ui::Controls::Form& form)
        result ret;
 
        GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations13FrameAnimator14SetCurrentFormERKNS0_8Controls4FormE,
-                       libosp-uifw.so, frameanimator_setcurrentformp);
+                       LIBOSP_UIFW, frameanimator_setcurrentformp);
 
        ret = (this->*frameanimator_setcurrentformp)(form);
 
index 1c58e70..5eed0a9 100644 (file)
@@ -25,7 +25,7 @@ bool _DisplayManager::RenderAll(bool check)
        static methodtype mp;
        bool ret;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager9RenderAllEb, libosp-uifw.so, mp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager9RenderAllEb, LIBOSP_UIFW, mp);
        probeBlockStart();
        probeBlockEnd();
 
@@ -43,7 +43,7 @@ bool _DisplayManager::Render(_RootVisualElement& root, bool check)
        static methodtype mp;
        bool ret;
        
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager6RenderERNS1_18_RootVisualElementEb, libosp-uifw.so, mp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager6RenderERNS1_18_RootVisualElementEb, LIBOSP_UIFW, mp);
        probeBlockStart();
        probeBlockEnd();
        ret = (this->*mp)(root, check);
@@ -59,7 +59,7 @@ result _DisplayManager::PostRender(_RootVisualElement& root)
        static methodtype mp;
        result ret;
        
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager10PostRenderERNS1_18_RootVisualElementE, libosp-uifw.so, mp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager10PostRenderERNS1_18_RootVisualElementE, LIBOSP_UIFW, mp);
        probeBlockStart();
        probeBlockEnd();
 
@@ -78,7 +78,7 @@ result _DisplayManager::Flush(void)
        static methodtype mp;
        result ret;
        
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager5FlushEv, libosp-uifw.so, mp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager5FlushEv, LIBOSP_UIFW, mp);
        probeBlockStart();
        probeBlockEnd();
        ret = (this->*mp)();
@@ -94,7 +94,7 @@ bool _DisplayManager::UpdateScene(bool force)
        static methodtype mp;
        bool ret;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager11UpdateSceneEb, libosp-uifw.so, mp);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager11UpdateSceneEb, LIBOSP_UIFW, mp);
        probeBlockStart();
        probeBlockEnd();
        ret = (this->*mp)(force);
index d2eb68c..197c464 100755 (executable)
@@ -149,7 +149,7 @@ SceneManager* SceneManager::GetInstance(void)
        static int initialized = 0;
        SceneManager* ret;
 
-       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui6Scenes12SceneManager11GetInstanceEv, libosp-uifw.so, scenemanager_getinstancep);
+       GET_REAL_FUNC_OSP(_ZN5Tizen2Ui6Scenes12SceneManager11GetInstanceEv, LIBOSP_UIFW, scenemanager_getinstancep);
 
        ret = scenemanager_getinstancep();
 
index 5d450b7..95dfbbf 100755 (executable)
@@ -48,7 +48,7 @@ Evas_Object *elm_win_add(Evas_Object *parent, const char* name, Elm_Win_Type typ
 {
        static Evas_Object * (*elm_win_addp)(Evas_Object *parent, const char* name, Elm_Win_Type type);
 
-       BEFORE_ORIGINAL_SNAPSHOT(elm_win_add, libelementary.so);
+       BEFORE_ORIGINAL_SNAPSHOT(elm_win_add, LIBELEMENTARY);
        
        ret = elm_win_addp(parent, name, type);
        
@@ -61,7 +61,7 @@ Evas_Object *         elm_controlbar_add (Evas_Object *parent)
 {
        static Evas_Object * (*elm_controlbar_addp)(Evas_Object *parent);
 
-       BEFORE_ORIGINAL_SNAPSHOT(elm_controlbar_add, libelementary.so);
+       BEFORE_ORIGINAL_SNAPSHOT(elm_controlbar_add, LIBELEMENTARY);
 
        ret = elm_controlbar_addp(parent);
        
@@ -76,7 +76,7 @@ Evas_Object *elm_naviframe_add(Evas_Object *parent)
 {
        static Evas_Object * (*elm_naviframe_addp)(Evas_Object *parent);
 
-       BEFORE_ORIGINAL_SNAPSHOT(elm_naviframe_add, libelementary.so);
+       BEFORE_ORIGINAL_SNAPSHOT(elm_naviframe_add, LIBELEMENTARY);
 
        ret = elm_naviframe_addp(parent);
        
@@ -89,7 +89,7 @@ Evas_Object *elm_pager_add(Evas_Object *parent)
 {
        static Evas_Object * (*elm_pager_addp)(Evas_Object *parent);
 
-       BEFORE_ORIGINAL_SNAPSHOT(elm_pager_add, libelementary.so);
+       BEFORE_ORIGINAL_SNAPSHOT(elm_pager_add, LIBELEMENTARY);
 
        ret = elm_pager_addp(parent);