{"id":7664,"date":"2020-05-23T18:38:09","date_gmt":"2020-05-23T10:38:09","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=7664"},"modified":"2022-05-24T15:36:34","modified_gmt":"2022-05-24T07:36:34","slug":"addr2line","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/addr2line","title":{"rendered":"addr2line\u547d\u4ee4 – \u51fd\u6570\u5730\u5740\u89e3\u6790\u5de5\u5177"},"content":{"rendered":"\n

addr2line\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201daddress to line\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u5c06\u51fd\u6570\u5730\u5740\u89e3\u6790\u6210\u6587\u4ef6\u540d\u6216\u884c\u53f7\u7684\u5de5\u5177\u3002\u7ed9\u51fa\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u7684\u5730\u5740\u6216\u4e00\u4e2a\u53ef\u91cd\u5b9a\u4f4d\u5bf9\u8c61\u4e2d\u7684\u504f\u79fb\u90e8\u5206\u7684\u5730\u5740\uff0c\u4f7f\u7528\u8c03\u8bd5\u4fe1\u606f\u6765\u627e\u51fa\u4e0e\u4e4b\u76f8\u5173\u7684\u6587\u4ef6\u540d\u548c\u884c\u53f7\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>addr2line [\u53c2\u6570] [\u5730\u5740]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-a<\/td>\u5728\u51fd\u6570\u540d\u3001\u6587\u4ef6\u548c\u884c\u53f7\u4fe1\u606f\u4e4b\u524d\uff0c\u663e\u793a\u5730\u5740\uff0c\u4ee5\u5341\u516d\u8fdb\u5236\u5f62\u5f0f<\/td><\/tr>
-b<\/td>\u6307\u5b9a\u76ee\u6807\u6587\u4ef6\u7684\u683c\u5f0f\u4e3abfdname<\/td><\/tr>
-e<\/td>\u6307\u5b9a\u9700\u8981\u8f6c\u6362\u5730\u5740\u7684\u53ef\u6267\u884c\u6587\u4ef6\u540d<\/td><\/tr>
-j<\/td>\u7ed9\u51fa\u7684\u5730\u5740\u4ee3\u8868\u6307\u5b9asection\u504f\u79fb\uff0c\u800c\u975e\u7edd\u5bf9\u5730\u5740<\/td><\/tr>
-C<\/td>\u5c06\u4f4e\u7ea7\u522b\u7684\u7b26\u53f7\u540d\u89e3\u7801\u4e3a\u7528\u6237\u7ea7\u522b\u7684\u540d\u5b57<\/td><\/tr>
-f<\/td>\u5728\u663e\u793a\u6587\u4ef6\u540d\u3001\u884c\u53f7\u7684\u540c\u65f6\u663e\u793a\u51fd\u6570\u540d\u4fe1\u606f<\/td><\/tr>
-p<\/td>\u6bcf\u4e00\u4e2a\u5730\u5740\u7684\u4fe1\u606f\u5360\u4e00\u884c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u67e5\u770b\u6587\u4ef6\u540d\u3001\u884c\u53f7\u548c\u51fd\u6570\u540d\u76f8\u5173\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# addr2line -f -e libvitae.so<\/strong><\/pre>\n\n\n\n

\u67e5\u770b\u6587\u4ef6\u540d\u3001\u884c\u53f7\u3001\u51fd\u6570\u540d\u53ca\u5341\u516d\u8fdb\u5236\u5f62\u5f0f\u5730\u5740\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# addr2line -a libvitae.so<\/strong><\/pre>\n\n\n\n

\u67e5\u627e\u6307\u5b9a\u7684\u5730\u5740\u6240\u5bf9\u5e94\u7684\u4ee3\u7801\u4f4d\u7f6e\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# addr2line 0x00000000004005e7 -e test -f -C -s<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"

addr2line\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201daddress to line\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u5c06\u51fd\u6570\u5730\u5740\u89e3\u6790\u6210\u6587\u4ef6\u540d\u6216 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7664"}],"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=7664"}],"version-history":[{"count":11,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7664\/revisions"}],"predecessor-version":[{"id":9993,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7664\/revisions\/9993"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=7664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=7664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=7664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}