{"id":6490,"date":"2020-01-21T11:28:06","date_gmt":"2020-01-21T03:28:06","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6490"},"modified":"2020-01-21T16:46:21","modified_gmt":"2020-01-21T08:46:21","slug":"ltrace","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/ltrace","title":{"rendered":"ltrace\u547d\u4ee4 – \u8ddf\u8e2a\u8fdb\u7a0b\u8c03\u7528\u5e93\u51fd\u6570\u7684\u60c5\u51b5"},"content":{"rendered":"\n
ltrace\u547d\u4ee4\u662f\u7528\u6765\u8ddf\u8e2a\u8fdb\u7a0b\u8c03\u7528\u5e93\u51fd\u6570\u7684\u60c5\u51b5\uff0cltrace\u5176\u5b9e\u4e5f\u662f\u57fa\u4e8eptrace\u3002\u6211\u4eec\u77e5\u9053\uff0cptrace\u80fd\u591f\u4e3b\u8981\u662f\u7528\u6765\u8ddf\u8e2a\u7cfb\u7edf\u8c03\u7528\uff0c\u90a3\u4e48\u5b83\u662f\u5982\u4f55\u8ddf\u8e2a\u5e93\u51fd\u6570\u5462\uff1f \u9996\u5148ltrace\u6253\u5f00elf\u6587\u4ef6\uff0c\u5bf9\u5176\u8fdb\u884c\u5206\u6790\u3002\u5728elf\u6587\u4ef6\u4e2d\uff0c\u51fa\u4e8e\u52a8\u6001\u8fde\u63a5\u7684\u9700\u8981\uff0c\u9700\u8981\u5728elf\u6587\u4ef6\u4e2d\u4fdd\u5b58\u51fd\u6570\u7684\u7b26\u53f7\uff0c\u4f9b\u8fde\u63a5\u5668\u4f7f\u7528\u3002 <\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>ltrace [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u6700\u57fa\u672c\u5e94\u7528\uff0c\u4e0d\u5e26\u4efb\u4f55\u53c2\u6570\uff1a<\/p>\n\n\n\n \u8f93\u51fa\u8c03\u7528\u65f6\u95f4\u5f00\u9500\uff1a<\/p>\n\n\n\n \u663e\u793a\u7cfb\u7edf\u8c03\u7528\uff1a<\/p>\n\n\n\n \u8ba1\u7b97\u65f6\u95f4\u548c\u8c03\u7528\uff0c\u5e76\u5728\u7a0b\u5e8f\u9000\u51fa\u65f6\u6253\u5370\u6458\u8981\uff1a<\/p>\n\n\n\n \u6253\u5370\u8c03\u8bd5\u4fe1\u606f\uff1a<\/p>\n\n\n\n ltrace\u547d\u4ee4\u662f\u7528\u6765\u8ddf\u8e2a\u8fdb\u7a0b\u8c03\u7528\u5e93\u51fd\u6570\u7684\u60c5\u51b5\uff0cltrace\u5176\u5b9e\u4e5f\u662f\u57fa\u4e8eptrace\u3002\u6211\u4eec\u77e5\u9053\uff0cptrace\u80fd […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6490"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6490"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6490\/revisions"}],"predecessor-version":[{"id":6558,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6490\/revisions\/6558"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-a<\/td> \u5bf9\u9f50\u5177\u4f53\u67d0\u4e2a\u5217\u7684\u8fd4\u56de\u503c <\/td><\/tr> -c<\/td> \u8ba1\u7b97\u65f6\u95f4\u548c\u8c03\u7528\uff0c\u5e76\u5728\u7a0b\u5e8f\u9000\u51fa\u65f6\u6253\u5370\u6458\u8981 <\/td><\/tr> -d<\/td> \u6253\u5370\u8c03\u8bd5\u4fe1\u606f <\/td><\/tr> -f<\/td> \u8ddf\u8e2a\u5b50\u8fdb\u7a0b <\/td><\/tr> -l<\/td> \u53ea\u6253\u5370\u67d0\u4e2a\u5e93\u4e2d\u7684\u8c03\u7528 <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# ltrace .\/a.out <\/pre>\n\n\n\n
[root@linuxcool ~]# ltrace -T .\/a.out <\/pre>\n\n\n\n
[root@linuxcool ~]# ltrace -S .\/a.out <\/pre>\n\n\n\n
[root@linuxcool ~]# ltrace -c .\/a.out <\/pre>\n\n\n\n
[root@linuxcool ~]# ltrace -d .\/a.out <\/pre>\n","protected":false},"excerpt":{"rendered":"