摘要: Declaration Following is the declaration for sprintf() function.int sprintf(char *str, const char *format, ...) Example The following example shows the usage of sprintf() function. #include #include ... 阅读全文
posted @ 2013-08-23 23:27 dorothychai 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1: #include 2: int system(const char *command); 3: 4: while (something) { 5: int ret = system("foo"); 6: if (WIFSIGNALED(ret) && ... 阅读全文
posted @ 2013-08-23 23:19 dorothychai 阅读(329) 评论(0) 推荐(0) 编辑
摘要: Source code: 1: #include 2: void myStartupFun (void) __attribute__ ((constructor)); 3: void myCleanupFun (void) __attribute__ ((destructor)); 4: 5: /... 阅读全文
posted @ 2013-08-23 22:50 dorothychai 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Source file: 1: #define __USE_GNU //import! 2: #include 3: #include 4: void getFuncNameByAddr(void *this_fn, void *call_site) { 5: Dl_info DlInfo... 阅读全文
posted @ 2013-08-23 22:38 dorothychai 阅读(341) 评论(0) 推荐(0) 编辑
摘要: myFun.h 1: #include 2: 3: void __cyg_profile_func_enter(void *this_fn, void *call_site) 4: __attribute__((no_instrument_function)); 5: void _... 阅读全文
posted @ 2013-08-23 22:27 dorothychai 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1: int save_out = dup(fileno(stdout));//backup stdout 2: int out = open("cout.log", O_RDWR|O_CREAT|O_APPEND, 0600); 3: int nRet; 4: fflush(stdout); 5... 阅读全文
posted @ 2013-08-23 22:19 dorothychai 阅读(413) 评论(0) 推荐(0) 编辑