本文共 12122 字,大约阅读时间需要 40 分钟。
ltrace ls
neo@netkiller:~/workspace/Document$ ltrace ls__libc_start_main(0x407bb0, 1, 0x7fff827aea38, 0x413730, 0x413720原文出处:Netkiller 系列 手札 本文作者:陈景峯 转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。strrchr("ls", '/') = NULLsetlocale(6, "") = "en_US.UTF-8"bindtextdomain("coreutils", "/usr/share/locale") = "/usr/share/locale"textdomain("coreutils") = "coreutils"__cxa_atexit(0x40abb0, 0, 0, 0x736c6974756572, 1) = 0isatty(1) = 1getenv("QUOTING_STYLE") = NULLgetenv("LS_BLOCK_SIZE") = NULLgetenv("BLOCK_SIZE") = NULLgetenv("BLOCKSIZE") = NULLgetenv("POSIXLY_CORRECT") = NULLgetenv("BLOCK_SIZE") = NULLgetenv("COLUMNS") = NULLioctl(1, 21523, 0x7fff827ae910) = 0getenv("TABSIZE") = NULLgetopt_long(1, 0x7fff827aea38, "abcdfghiklmnopqrstuvw:xABCDFGHI:"..., 0x00416a60, -1) = -1__errno_location() = 0x7f89323f16a8malloc(40) = 0x02543870memcpy(0x02543870, "", 40) = 0x02543870__errno_location() = 0x7f89323f16a8malloc(40) = 0x025438a0memcpy(0x025438a0, "", 40) = 0x025438a0malloc(18400) = 0x025438d0malloc(32) = 0x025434c0strlen(".") = 1malloc(2) = 0x025480c0memcpy(0x025480c0, ".", 2) = 0x025480c0__errno_location() = 0x7f89323f16a8opendir(".") = 0x025480e0readdir(0x025480e0) = 0x02548108readdir(0x025480e0) = 0x02548120readdir(0x025480e0) = 0x02548138readdir(0x025480e0) = 0x02548150strlen("Tex") = 3malloc(4) = 0x02550110memcpy(0x02550110, "Tex", 4) = 0x02550110readdir(0x025480e0) = 0x02548168readdir(0x025480e0) = 0x02548188strlen("makedoc") = 7malloc(8) = 0x02550130memcpy(0x02550130, "makedoc", 8) = 0x02550130readdir(0x025480e0) = 0x025481a8readdir(0x025480e0) = 0x025481c8strlen("Docbook") = 7malloc(8) = 0x02550150memcpy(0x02550150, "Docbook", 8) = 0x02550150readdir(0x025480e0) = NULLclosedir(0x025480e0) = 0free(NULL) = malloc(72) = 0x025480e0_setjmp(0x61c040, 0x25480e0, 0x2543af8, 3, 1) = 0__errno_location() = 0x7f89323f16a8strcoll("makedoc", "Docbook") = 9__errno_location() = 0x7f89323f16a8strcoll("Tex", "Docbook") = 16__errno_location() = 0x7f89323f16a8strcoll("Tex", "makedoc") = 7memcpy(0x025480f0, "\3208T\002", 8) = 0x025480f0realloc(NULL, 144) = 0x02548130malloc(168) = 0x025481d0__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac0e0, 8192, 0x2550150, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac0e0, 8192, 0x2550150, 0x7fff827ac0e0, 0) = 6__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac0e0, 8192, 0x2550130, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac0e0, 8192, 0x2550130, 0x7fff827ac0e0, 0) = 6__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac0e0, 8192, 0x2550110, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac0e0, 8192, 0x2550110, 0x7fff827ac0e0, 0) = 6__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac110, 8192, 0x2550150, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac110, 8192, 0x2550150, 0x7fff827ac110, 0) = 6__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac050, 8192, 0x2550150, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac050, 8192, 0x2550150, 0x7fff827ac050, 0) = 6fwrite_unlocked("Docbook", 1, 7, 0x7f8931bab780) = 7__overflow(0x7f8931bab780, 32, 0, 8, 0xffffffff) = 32__overflow(0x7f8931bab780, 32, 1, 8, 0xffffffff) = 32__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac110, 8192, 0x2550130, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac110, 8192, 0x2550130, 0x7fff827ac110, 0) = 6__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac050, 8192, 0x2550130, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac050, 8192, 0x2550130, 0x7fff827ac050, 0) = 6fwrite_unlocked("makedoc", 1, 7, 0x7f8931bab780) = 7__overflow(0x7f8931bab780, 32, 1, 8, 7) = 32__overflow(0x7f8931bab780, 32, 2, 8, 7) = 32__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac110, 8192, 0x2550110, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac110, 8192, 0x2550110, 0x7fff827ac110, 0) = 6__errno_location() = 0x7f89323f16a8__ctype_get_mb_cur_max(0x7fff827ac050, 8192, 0x2550110, -1, 0) = 6__ctype_get_mb_cur_max(0x7fff827ac050, 8192, 0x2550110, 0x7fff827ac050, 0) = 6fwrite_unlocked("Tex", 1, 3, 0x7f8931bab780) = 3__overflow(0x7f8931bab780, 10, 0, 120, 3Docbook makedoc Tex) = 10free(0x025480c0) = free(NULL) = free(0x025434c0) = exit(0 __fpending(0x7f8931bab780, 0, 0x7f8931bac330, 0x7f8931bac330, 0x25434b0) = 0fclose(0x7f8931bab780) = 0__fpending(0x7f8931bab860, 0, 0x7f8931bacdf0, 0, 0x7f89323f17a0) = 0fclose(0x7f8931bab860) = 0+++ exited (status 0) +++