{"id":5039,"date":"2021-02-03T00:47:29","date_gmt":"2021-02-02T16:47:29","guid":{"rendered":"https:\/\/damogame.cn\/wordpress\/?p=5039"},"modified":"2021-02-03T00:47:29","modified_gmt":"2021-02-02T16:47:29","slug":"gdb-%e8%b0%83%e8%af%95%e5%8f%8a%e4%bc%98%e5%8c%96","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/5039","title":{"rendered":"gdb \u8c03\u8bd5\u53ca\u4f18\u5316"},"content":{"rendered":"<p><a href=\"https:\/\/www.cnblogs.com\/tham\/p\/6827262.html\">\u539f\u6587\u5730\u5740<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u8c03\u8bd5\u7a0b\u5e8f\u65f6\uff0c\u5728gdb\u5185p var\uff0c\u4f1a\u63d0\u793a<\/p>\n<p>No symbol &#8220;var&#8221; in current context.<\/p>\n<p>\u5373\u4f7f\u6ca1\u6709\u4f7f\u7528\u4efb\u4f55\u7f16\u8bd1\u4f18\u5316\u9009\u9879\uff0c\u4ecd\u7136\u4e0d\u80fd\u67e5\u770b\uff0c\u53ef\u80fd\u662f\u8fd9\u4e9b\u53d8\u91cf\u88ab\u4f18\u5316\u5230\u5bc4\u5b58\u5668\u4e2d\uff0cgdb\u65e0\u6cd5\u8bfb\u53d6\u3002<\/p>\n<p>g++\u7f16\u8bd1\u65f6\u5c40\u90e8\u53d8\u91cf\u88ab\u4f18\u5316\u5230\u5bc4\u5b58\u5668\u91cc\u4e86\uff0c\u6b64\u65f6\u662f\u65e0\u6cd5\u5728\u5185\u5b58\u4e2d\u67e5\u770b\u53d8\u91cf\u7684\u503c\u7684\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<p>\u5728\u7f16\u8bd1\u662f\u52a0\u5165 \u2018-gstabs+\u2019 \u00a0\u9009\u9879\uff0c\u6bd4\u5982:<\/p>\n<p>g++ -g -Wall \u00a0-gstabs+ -o main.o main.cpp<\/p>\n<p>gdb main\uff0c\u5c31\u53ef\u4ee5\u67e5\u770b\u5c40\u90e8\u53d8\u91cf\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"cb_post_title_url\" href=\"http:\/\/www.cnblogs.com\/frydsh\/p\/3388828.html\" target=\"_blank\" rel=\"noopener\">\u4f7f\u7528GDB\u7684\u6e90\u4ee3\u7801\u67e5\u770b\u529f\u80fd<\/a><\/h2>\n<h2>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u5728\u8c03\u8bd5\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u81ea\u7531\u5730\u67e5\u770b\u76f8\u5173\u7684\u6e90\u4ee3\u7801\uff08\u5982\u679c\u6709\u6e90\u4ee3\u7801\u7684\u8bdd\uff09\u662f\u4e00\u9879\u6700\u57fa\u672c\u7684\u7279\u6027\u3002<br \/>\n\u4e00\u4e9bIDE\u5728\u8fd9\u65b9\u9762\u505a\u5f97\u76f8\u5f53\u597d\uff0cGDB\u5f53\u7136\u4e5f\u63d0\u4f9b\u4e86\u8fd9\u9879\u7279\u6027\uff0c\u867d\u7136\u4e0d\u5982IDE\u76f4\u89c2\uff0c\u4f46\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u8981\u6bd4IDE\u66f4\u52a0\u7075\u6d3b\u548c\u5feb\u6377\u3002<br \/>\nGDB\u4e4b\u6240\u4ee5\u80fd\u591f\u77e5\u9053\u5bf9\u5e94\u7684\u6e90\u4ee3\u7801\uff0c\u662f\u56e0\u4e3a\u8c03\u8bd5\u7248\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u4e2d\u8bb0\u5f55\u4e86\u6e90\u4ee3\u7801\u7684\u4f4d\u7f6e\uff1b\u56e0\u4e3a\u6e90\u4ee3\u7801\u7684\u4f4d\u7f6e\u5728\u7f16\u8bd1\u4e4b\u540e\u53ef\u80fd\u4f1a\u79fb\u52a8\u5230\u5176\u5b83\u5730\u65b9\uff0c\u6240\u4ee5GDB\u8fd8\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e2d\u67e5\u627e\u6e90\u4ee3\u7801\uff0c\u53e6\u5916GDB\u4e5f\u5141\u8bb8\u660e\u786e\u6307\u5b9a\u6e90\u4ee3\u7801\u7684\u641c\u7d22\u4f4d\u7f6e\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cGDB\u5728\u7f16\u8bd1\u65f6\u76ee\u5f55\u4e2d\u641c\u7d22\uff0c\u5982\u679c\u5931\u8d25\u5219\u5728\u5f53\u524d\u76ee\u5f55\u4e2d\u641c\u7d22\uff0c\u5373<span id=\"MathJax-Element-1-Frame\" class=\"MathJax\" style=\"margin: 0px; padding: 0px; display: inline; font-style: normal; font-weight: normal; line-height: normal; font-size: 14px; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; overflow-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;\" tabindex=\"0\" role=\"presentation\" data-mathml=\"&lt;math xmlns=&quot;http:\/\/www.w3.org\/1998\/Math\/MathML&quot;&gt;&lt;mi&gt;c&lt;\/mi&gt;&lt;mi&gt;d&lt;\/mi&gt;&lt;mi&gt;i&lt;\/mi&gt;&lt;mi&gt;r&lt;\/mi&gt;&lt;mo&gt;:&lt;\/mo&gt;&lt;\/math&gt;\"><span id=\"MathJax-Span-1\" class=\"math\"><span id=\"MathJax-Span-2\" class=\"mrow\"><span id=\"MathJax-Span-3\" class=\"mi\">c<\/span><span id=\"MathJax-Span-4\" class=\"mi\">d<\/span><span id=\"MathJax-Span-5\" class=\"mi\">i<\/span><span id=\"MathJax-Span-6\" class=\"mi\">r<\/span><span id=\"MathJax-Span-7\" class=\"mo\">:<\/span><\/span><\/span><span class=\"MJX_Assistive_MathML\" role=\"presentation\">cdir:<\/span><\/span>cwd\uff0c\u5176\u4e2d<span id=\"MathJax-Element-2-Frame\" class=\"MathJax\" style=\"margin: 0px; padding: 0px; display: inline; font-style: normal; font-weight: normal; line-height: normal; font-size: 14px; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; overflow-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;\" tabindex=\"0\" role=\"presentation\" data-mathml=\"&lt;math xmlns=&quot;http:\/\/www.w3.org\/1998\/Math\/MathML&quot;&gt;&lt;mi&gt;c&lt;\/mi&gt;&lt;mi&gt;d&lt;\/mi&gt;&lt;mi&gt;i&lt;\/mi&gt;&lt;mi&gt;r&lt;\/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x6307;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x7684;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x662F;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x7F16;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x8BD1;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x65F6;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x76EE;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x5F55;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#xFF08;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mi&gt;c&lt;\/mi&gt;&lt;mi&gt;o&lt;\/mi&gt;&lt;mi&gt;m&lt;\/mi&gt;&lt;mi&gt;p&lt;\/mi&gt;&lt;mi&gt;i&lt;\/mi&gt;&lt;mi&gt;l&lt;\/mi&gt;&lt;mi&gt;a&lt;\/mi&gt;&lt;mi&gt;t&lt;\/mi&gt;&lt;mi&gt;i&lt;\/mi&gt;&lt;mi&gt;o&lt;\/mi&gt;&lt;mi&gt;n&lt;\/mi&gt;&lt;mi&gt;d&lt;\/mi&gt;&lt;mi&gt;i&lt;\/mi&gt;&lt;mi&gt;r&lt;\/mi&gt;&lt;mi&gt;e&lt;\/mi&gt;&lt;mi&gt;c&lt;\/mi&gt;&lt;mi&gt;t&lt;\/mi&gt;&lt;mi&gt;o&lt;\/mi&gt;&lt;mi&gt;r&lt;\/mi&gt;&lt;mi&gt;y&lt;\/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#xFF09;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#xFF0C;&lt;\/mo&gt;&lt;\/mrow&gt;&lt;\/math&gt;\"><span id=\"MathJax-Span-8\" class=\"math\"><span id=\"MathJax-Span-9\" class=\"mrow\"><span id=\"MathJax-Span-10\" class=\"mi\">c<\/span><span id=\"MathJax-Span-11\" class=\"mi\">d<\/span><span id=\"MathJax-Span-12\" class=\"mi\">i<\/span><span id=\"MathJax-Span-13\" class=\"mi\">r<\/span><span id=\"MathJax-Span-14\" class=\"texatom\"><span id=\"MathJax-Span-15\" class=\"mrow\"><span id=\"MathJax-Span-16\" class=\"mo\">\u6307<\/span><\/span><\/span><span id=\"MathJax-Span-17\" class=\"texatom\"><span id=\"MathJax-Span-18\" class=\"mrow\"><span id=\"MathJax-Span-19\" class=\"mo\">\u7684<\/span><\/span><\/span><span id=\"MathJax-Span-20\" class=\"texatom\"><span id=\"MathJax-Span-21\" class=\"mrow\"><span id=\"MathJax-Span-22\" class=\"mo\">\u662f<\/span><\/span><\/span><span id=\"MathJax-Span-23\" class=\"texatom\"><span id=\"MathJax-Span-24\" class=\"mrow\"><span id=\"MathJax-Span-25\" class=\"mo\">\u7f16<\/span><\/span><\/span><span id=\"MathJax-Span-26\" class=\"texatom\"><span id=\"MathJax-Span-27\" class=\"mrow\"><span id=\"MathJax-Span-28\" class=\"mo\">\u8bd1<\/span><\/span><\/span><span id=\"MathJax-Span-29\" class=\"texatom\"><span id=\"MathJax-Span-30\" class=\"mrow\"><span id=\"MathJax-Span-31\" class=\"mo\">\u65f6<\/span><\/span><\/span><span id=\"MathJax-Span-32\" class=\"texatom\"><span id=\"MathJax-Span-33\" class=\"mrow\"><span id=\"MathJax-Span-34\" class=\"mo\">\u76ee<\/span><\/span><\/span><span id=\"MathJax-Span-35\" class=\"texatom\"><span id=\"MathJax-Span-36\" class=\"mrow\"><span id=\"MathJax-Span-37\" class=\"mo\">\u5f55<\/span><\/span><\/span><span id=\"MathJax-Span-38\" class=\"texatom\"><span id=\"MathJax-Span-39\" class=\"mrow\"><span id=\"MathJax-Span-40\" class=\"mo\">\uff08<\/span><\/span><\/span><span id=\"MathJax-Span-41\" class=\"mi\">c<\/span><span id=\"MathJax-Span-42\" class=\"mi\">o<\/span><span id=\"MathJax-Span-43\" class=\"mi\">m<\/span><span id=\"MathJax-Span-44\" class=\"mi\">p<\/span><span id=\"MathJax-Span-45\" class=\"mi\">i<\/span><span id=\"MathJax-Span-46\" class=\"mi\">l<\/span><span id=\"MathJax-Span-47\" class=\"mi\">a<\/span><span id=\"MathJax-Span-48\" class=\"mi\">t<\/span><span id=\"MathJax-Span-49\" class=\"mi\">i<\/span><span id=\"MathJax-Span-50\" class=\"mi\">o<\/span><span id=\"MathJax-Span-51\" class=\"mi\">n<\/span><span id=\"MathJax-Span-52\" class=\"mi\">d<\/span><span id=\"MathJax-Span-53\" class=\"mi\">i<\/span><span id=\"MathJax-Span-54\" class=\"mi\">r<\/span><span id=\"MathJax-Span-55\" class=\"mi\">e<\/span><span id=\"MathJax-Span-56\" class=\"mi\">c<\/span><span id=\"MathJax-Span-57\" class=\"mi\">t<\/span><span id=\"MathJax-Span-58\" class=\"mi\">o<\/span><span id=\"MathJax-Span-59\" class=\"mi\">r<\/span><span id=\"MathJax-Span-60\" class=\"mi\">y<\/span><span id=\"MathJax-Span-61\" class=\"texatom\"><span id=\"MathJax-Span-62\" class=\"mrow\"><span id=\"MathJax-Span-63\" class=\"mo\">\uff09<\/span><\/span><\/span><span id=\"MathJax-Span-64\" class=\"texatom\"><span id=\"MathJax-Span-65\" class=\"mrow\"><span id=\"MathJax-Span-66\" class=\"mo\">\uff0c<\/span><\/span><\/span><\/span><\/span><span class=\"MJX_Assistive_MathML\" role=\"presentation\">cdir\u6307\u7684\u662f\u7f16\u8bd1\u65f6\u76ee\u5f55\uff08compilationdirectory\uff09\uff0c<\/span><\/span>cwd\u6307\u7684\u662f\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff08current working directory\uff09\u3002<\/h2>\n<h2>\n\u5728GDB\u4e2d\u4f7f\u7528\u67e5\u770b\u6e90\u4ee3\u7801\u76f8\u5173\u7684\u547d\u4ee4\u65f6\uff0c\u6709\u4e00\u4e2a\u5f53\u524d\u6587\u4ef6\u7684\u6982\u5ff5\uff0c\u5f53\u547d\u4ee4\u7684\u4f4d\u7f6e\u53c2\u6570\u6ca1\u6709\u9650\u5b9a\u4e00\u4e2a\u6587\u4ef6\u7684\u65f6\u5019\uff08\u4e0d\u8bba\u662f\u660e\u786e\u9650\u5b9a\u8fd8\u662f\u9690\u542b\u9650\u5b9a\uff09\uff0c\u5c06\u4f7f\u7528\u5f53\u524d\u6587\u4ef6\u3002\u5f53\u524d\u6587\u4ef6\u9ed8\u8ba4\u662fmain\u51fd\u6570\u6240\u5728\u6587\u4ef6\uff0c\u5982\u679c\u7a0b\u5e8f\u5f53\u524d\u6b63\u5904\u4e8e\u65ad\u70b9\u4f4d\u7f6e\uff0c\u5219\u65ad\u70b9\u6240\u5728\u6587\u4ef6\u5373\u4e3a\u5f53\u524d\u6587\u4ef6\u3002<br \/>\n\u4e0e\u5f53\u524d\u6587\u4ef6\u7684\u6982\u5ff5\u7c7b\u4f3c\uff0c\u8fd8\u5b58\u5728\u4e00\u4e2a\u5f53\u524d\u884c\u7684\u6982\u5ff5\uff0c\u5b83\u9ed8\u8ba4\u4e3amain\u51fd\u6570\u7684\u5f00\u59cb\u5904\u3002\u5982\u679c\u4f7f\u7528gdb\u8f7d\u5165\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u7136\u540e\u5355\u5355\u6267\u884c\u4e00\u6761\u7b80\u5355\u7684list\u547d\u4ee4\uff0c\u4f60\u4f1a\u53d1\u73b0\u8f93\u51fa\u7684\u6e90\u4ee3\u7801\u5e76\u975e\u662f\u4ece\u7b2c\u4e00\u884c\u5f00\u59cb\u7684\uff0c\u8fd9\u662f\u56e0\u4e3a\u5f53\u524d\u884c\u9ed8\u8ba4\u5728main\u51fd\u6570\u9644\u8fd1\u5904\u7684\u7f18\u6545\u3002<br \/>\n1.\u8bbe\u7f6e\u548c\u83b7\u53d6\u6e90\u4ee3\u7801\u663e\u793a\u6570\u91cf\uff1a<br \/>\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cGDB\u663e\u793a\u6307\u5b9a\u4f4d\u7f6e\u5904\u4ee5\u53ca\u5176\u524d\u540e\u768410\u884c\u4ee3\u7801\uff0c\u4f46\u662f\u8fd9\u662f\u4e00\u4e2a\u53ef\u8bbe\u7f6e\u7684\u503c\u3002<br \/>\nset listsize count\uff1a\u8bbe\u7f6elist\u547d\u4ee4\u663e\u793a\u7684\u6e90\u4ee3\u7801\u6570\u91cf\u6700\u591a\u4e3acount\u884c\uff0c0\u8868\u793a\u4e0d\u9650\u5236\u884c\u6570\u3002<br \/>\nshow listsize\uff1a\u663e\u793alistsize\u7684\u503c\u3002<br \/>\n2.\u7f16\u8f91\u6e90\u4ee3\u7801\uff1a<br \/>\n\u5728\u4e00\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u5e0c\u671b\u5728\u7f16\u8f91\u5668\u4e2d\u663e\u793a\u6216\u8005\u7f16\u8f91\u6e90\u4ee3\u7801\uff0cGDB\u5141\u8bb8\u6211\u4eec\u4f7f\u7528\u81ea\u5df1\u559c\u6b22\u7684\u7f16\u8f91\u5668\u3002<br \/>\n\u53ef\u5728\u73af\u5883\u53d8\u91cfEDITOR\u4e2d\u6307\u5b9aGDB\u4f7f\u7528\u7684\u7f16\u8f91\u5668\uff0c\u4f8b\u5982\uff1aEDITOR=\/usr\/bin\/gedit;export EDITOR;gdb<br \/>\nedit location\uff1a\u5728\u7f16\u8f91\u5668\u4e2d\u7f16\u8f91\u4f4d\u7f6elocation\u5904\u7684\u6e90\u4ee3\u7801\uff0c\u5982\u679c\u7701\u7565location\uff0c\u5219\u7f16\u8f91\u5f53\u524d\u4f4d\u7f6e\u3002<br \/>\n3.\u641c\u7d22\u6e90\u4ee3\u7801\uff1a<br \/>\n\u6709\u7684\u65f6\u5019\uff0c\u6211\u4eec\u5e0c\u671b\u5728\u5f53\u524d\u6587\u4ef6\u4e2d\u8fdb\u884c\u641c\u7d22\uff0cGDB\u63d0\u4f9b\u4e86\u8fd9\u6837\u7684\u547d\u4ee4\u3002<br \/>\nsearch regexp\uff1a\u4ece\u5f53\u524d\u884c\u7684\u4e0b\u4e00\u884c\u5f00\u59cb\u5411\u524d\u641c\u7d22\u3002<br \/>\nrev regexp \uff1a\u4ece\u5f53\u524d\u884c\u7684\u4e0a\u4e00\u884c\u5f00\u59cb\u5411\u540e\u641c\u7d22\u3002<br \/>\n\u6709\u7684\u65f6\u5019\uff0c\u4f60\u4f1a\u53d1\u73b0search\u547d\u4ee4\u603b\u662f\u63d0\u793a\u201cExpression not found\u201d\uff0c\u8fd9\u662f\u56e0\u4e3a\u5f53\u524d\u884c\u53ef\u80fd\u5df2\u7ecf\u662f\u6700\u540e\u4e00\u884c\u4e86\uff0c\u7279\u522b\u662f\u6587\u4ef6\u5f88\u77ed\u7684\u65f6\u5019\u3002\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u4efb\u4f55list\u547d\u4ee4\u90fd\u4f1a\u5f71\u54cd\u5f53\u524d\u884c\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e14\u7531\u4e8e\u6bcf\u6b21\u90fd\u662f\u591a\u884c\u8f93\u51fa\uff0c\u6240\u4ee5\u5bf9\u5f53\u524d\u884c\u7684\u5f71\u54cd\u5e76\u975e\u7b80\u5355\u5730\u5411\u524d\u4e00\u884c\u6216\u8005\u5411\u540e\u4e00\u884c\u3002<br \/>\nsearch\u547d\u4ee4\u672c\u8eab\u4e5f\u4f1a\u5f71\u54cd\u5f53\u524d\u884c\u7684\u4f4d\u7f6e\u3002<br \/>\n4.\u6e90\u4ee3\u7801\u4f4d\u7f6e\uff1a<br \/>\nGDB\u4e4b\u6240\u4ee5\u53ef\u4ee5\u67e5\u770b\u5230\u6e90\u4ee3\u7801\uff0c\u662f\u56e0\u4e3a\u5b83\u77e5\u9053\u6e90\u4ee3\u7801\u653e\u5728\u54ea\u91cc\u3002<br \/>\n\u5728\u4e00\u4e2a\u8c03\u8bd5\u4f1a\u8bdd\u4e2d\uff0cGDB\u7ef4\u62a4\u4e86\u4e00\u4e2a\u6e90\u4ee3\u7801\u67e5\u627e\u76ee\u5f55\u5217\u8868\uff0c\u9ed8\u8ba4\u503c\u662f\u7f16\u8bd1\u76ee\u5f55\u548c\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002\u5f53GDB\u9700\u8981\u4e00\u4e2a\u6e90\u6587\u4ef6\u7684\u65f6\u5019\uff0c\u5b83\u4f9d\u6b21\u5728\u8fd9\u4e9b\u76ee\u5f55\u4e2d\u67e5\u627e\uff0c\u76f4\u5230\u627e\u5230\u4e00\u4e2a\u6216\u8005\u629b\u51fa\u9519\u8bef\u3002<br \/>\nGDB\u8fd8\u7ef4\u62a4\u4e86\u4e00\u4e2a\u8def\u5f84\u66ff\u6362\u89c4\u5219\uff0c\u5c06\u8981\u641c\u7d22\u7684\u539f\u59cb\u8def\u5f84\u6309\u7167\u627e\u5230\u7684\u7b2c\u4e00\u4e2a\u89c4\u5219\u505a\u524d\u7f00\u66ff\u6362\uff0c\u7136\u540e\u518d\u5728\u6e90\u7801\u641c\u7d22\u76ee\u5f55\u4e2d\u67e5\u627e\u6587\u4ef6\u3002<br \/>\nGDB\u5141\u8bb8\u660e\u786e\u6307\u5b9a\u6e90\u4ee3\u7801\u4f4d\u7f6e\uff0c\u6216\u8005\u8def\u5f84\u66ff\u6362\u89c4\u5219\uff0c\u4ee5\u5e94\u4ed8\u6e90\u4ee3\u7801\u4f4d\u7f6e\u8fc1\u79fb\u7684\u60c5\u51b5\u3002<br \/>\ndirectory path-list\uff1a\u5c06\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u6e90\u4ee3\u7801\u641c\u7d22\u76ee\u5f55\u52a0\u5165\u5230\u5f53\u524d\u6e90\u7801\u641c\u7d22\u76ee\u5f55\u5217\u8868\u7684\u524d\u9762\uff0c\u76ee\u5f55\u4e4b\u95f4\u4f7f\u7528\u7a7a\u683c\u95f4\u9694\u3002<br \/>\ndirectory\uff1a\u4e0d\u5e26\u53c2\u6570\u7684directory\u5c06\u6e90\u7801\u641c\u7d22\u76ee\u5f55\u6062\u590d\u4e3a\u9ed8\u8ba4\u503c\u3002<br \/>\nset directories path-list\uff1a\u5c06\u6e90\u7801\u76ee\u5f55\u8bbe\u7f6e\u4e3apath-list\uff0c\u4f46\u662f\u4f1a\u8865\u4e0a\u9ed8\u8ba4\u76ee\u5f55\u3002<br \/>\nshow directories\uff1a\u663e\u793a\u6e90\u7801\u641c\u7d22\u76ee\u5f55\u5217\u8868\u3002<br \/>\nset substitute-path from to\uff1a\u8bbe\u7f6e\u76ee\u5f55\u66ff\u6362\u89c4\u5219\uff0c\u653e\u7f6e\u5728\u89c4\u5219\u5217\u8868\u7684\u672b\u7aef\u3002<br \/>\nunset substitute-path [path]\uff1a\u5220\u9664path\u5bf9\u5e94\u7684\u66ff\u6362\u89c4\u5219\uff0c\u6216\u8005\u5220\u9664\u6240\u6709\u7684\u66ff\u6362\u89c4\u5219\u3002<br \/>\nshow substitute-path [path]\uff1a\u663e\u793apath\u5bf9\u5e94\u7684\u66ff\u6362\u89c4\u5219\uff0c\u6216\u8005\u663e\u793a\u6240\u6709\u7684\u66ff\u6362\u89c4\u5219\u3002<br \/>\n5.\u67e5\u770b\u673a\u5668\u7801\uff1a<br \/>\n\u5728\u4e00\u4e9b\u5fc5\u8981\u7684\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u67e5\u770b\u6c47\u7f16\u4ee3\u7801\u6765\u8bca\u65ad\u95ee\u9898\u3002GDB\u63d0\u4f9b\u4e86\u8fd9\u79cd\u53ef\u80fd\u3002<br \/>\nGDB\u63d0\u4f9b\u4e86\u4e24\u79cd\u80fd\u529b\uff1a\u663e\u793a\u6e90\u4ee3\u7801\u4f4d\u7f6e\u4e0e\u6307\u4ee4\u5730\u5740\u4e4b\u95f4\u7684\u6620\u5c04\uff1b\u663e\u793a\u6307\u5b9a\u4f4d\u7f6e\u7684\u6c47\u7f16\u4ee3\u7801\u3002<br \/>\ninfo line linespec\uff1a\u663e\u793a\u6e90\u4ee3\u7801linespec\u5904\u5bf9\u5e94\u7684\u6c47\u7f16\u5730\u5740\u8303\u56f4\u3002<br \/>\ninfo line *addr\uff1a\u663e\u793a\u5730\u5740addr\u5904\u5bf9\u5e94\u7684\u6e90\u4ee3\u7801\u4f4d\u7f6e\u3002<br \/>\ndisassemble\uff0cdisassemble \/m\uff0cdisassemble \/r\uff1a\u663e\u793a\u6307\u5b9a\u5730\u5740\u8303\u56f4\u5185\u7684\u6c47\u7f16\u4ee3\u7801\uff0c\u67094\u79cd\u4f7f\u7528\u5f62\u5f0f\uff0c<\/h2>\n<h2>\u00a0 \u00a0 \u00a0 \u00a0 \u7b2c\u4e00\u79cd\u4e0d\u5e26\u53c2\u6570\uff0c\u663e\u793a\u5f53\u524d\u6b63\u5728\u6267\u884c\u7684\u51fd\u6570\u7684\u6c47\u7f16\u4ee3\u7801\uff1b<\/h2>\n<h2>\u00a0 \u00a0 \u00a0 \u00a0 \u7b2c\u4e8c\u79cd\u662f\u4e00\u4e2a\u53c2\u6570\uff0c\u663e\u793a\u8be5\u5730\u5740\u6240\u5728\u51fd\u6570\u7684\u6c47\u7f16\u4ee3\u7801\uff1b<\/h2>\n<h2>\u00a0 \u00a0 \u00a0 \u00a0 \u7b2c\u4e09\u79cd\u662f\u4e24\u4e2a\u53c2\u6570\u7684disassemble start,end\uff0c\u663e\u793a\u5730\u5740\uff3bstart\uff0cend\uff09\u5185\u7684\u6c47\u7f16\u4ee3\u7801\uff1b<\/h2>\n<h2>\u00a0 \u00a0 \u00a0 \u00a0 \u7b2c\u56db\u79cd\u662f\u4e24\u4e2a\u53c2\u6570\u7684disassemble start,+length\uff0c\u663e\u793a\u5730\u5740\uff3bstart\uff0cstart+length\uff09\u5185\u7684\u6c47\u7f16\u4ee3\u7801\u3002<\/h2>\n<h2>\u00a0 \u00a0 \u00a0 \u00a0 \u53c2\u6570\u53ef\u4ee5\u662f16\u8fdb\u5236\u7684\u5730\u5740\uff0c\u4e5f\u53ef\u4ee5\u662f\u51fd\u6570\u540d\u3002\/m\u8868\u793a\u6df7\u5408\u8f93\u51fa\u6e90\u4ee3\u7801\u548c\u6c47\u7f16\u4ee3\u7801\uff0c\/r\u8868\u793a\u6df7\u5408\u8f93\u51fa\u4e8c\u8fdb\u5236\u548c\u6c47\u7f16\u4ee3\u7801\u3002<br \/>\nset disassembly-flavor instruction-set\uff1a\u8bbe\u7f6e\u663e\u793a\u6c47\u7f16\u4ee3\u7801\u65f6\u4f7f\u7528\u7684\u98ce\u683c\uff0c\u76ee\u524d\u53ea\u9488\u5bf9intel x86\u7cfb\u5217\uff0c\u53ef\u53d6\u7684\u503c\u4e3aatt\u548cintel\uff0c\u9ed8\u8ba4\u662fatt\u3002<br \/>\nshow disassembly-flavor\uff1a\u663e\u793adisassembly-flavor\u8bbe\u7f6e<br \/>\nset disassemble-next-line on|off|auto\uff1a\u5f53\u7a0b\u5e8f\u505c\u6b62\u4e0b\u6765\u7684\u65f6\u5019\uff0c\u662f\u5426\u663e\u793a\u4e0b\u4e00\u884c\u6e90\u4ee3\u7801\u7684\u6c47\u7f16\u4ee3\u7801\uff0c\u9ed8\u8ba4\u4e3aoff\u3002<br \/>\nshow disassemble-next-line\uff1a\u663e\u793adisassemble-next-line\u8bbe\u7f6e\u3002<br \/>\n6.\u663e\u793a\u6307\u5b9a\u4f4d\u7f6e\u7684\u6e90\u4ee3\u7801\uff1a<br \/>\nlist\u547d\u4ee4\u53ef\u7528\u4e8e\u663e\u793a\u6307\u5b9a\u4f4d\u7f6e\u5904\u7684\u6e90\u4ee3\u7801\u3002list\u547d\u4ee4\u4f1a\u5f71\u54cd\u5f53\u524d\u884c\u548c\u5f53\u524d\u6587\u4ef6\u3002<br \/>\nlist\u547d\u4ee4\u6709\u591a\u79cd\u65b9\u5f0f\u6307\u5b9a\u8981\u663e\u793a\u7684\u6e90\u4ee3\u7801\u8303\u56f4\uff0c\u53ef\u4ee5\u662f\u884c\u53f7\uff0c\u51fd\u6570\u540d\uff0c\u751a\u81f3\u662f\u6307\u4ee4\u5730\u5740\u3002<br \/>\n\u5e38\u7528\u7684\u5982\u4e0b\uff1a<br \/>\nlist linenum\uff1a\u663e\u793a\u6307\u5b9a\u884c\u6570\u9644\u8fd1\u7684\u4ee3\u7801\u3002<br \/>\nlist function\uff1a\u663e\u793a\u6307\u5b9a\u51fd\u6570\u9644\u8fd1\u7684\u4ee3\u7801\u3002<br \/>\nlist \uff0aaddr\uff1a\u663e\u793a\u6307\u5b9a\u5730\u5740\u9644\u8fd1\u7684\u4ee3\u7801\u3002<\/h2>\n<h2><a href=\"http:\/\/blog.csdn.net\/mergerly\/article\/details\/8538272\" target=\"_blank\" rel=\"noopener\">\u5229\u7528gdb\u5728\u6c47\u7f16\u6307\u4ee4\u7ea7\u8c03\u8bd5C\u7a0b\u5e8f<\/a><\/h2>\n<div>\u5173\u4e8e<span class=\"wp_keywordlink_affiliate\"><a title=\"\u67e5\u770b GDB \u4e2d\u7684\u5168\u90e8\u6587\u7ae0\" href=\"http:\/\/lenky.info\/tag\/gdb\/\" target=\"_blank\" rel=\"noopener\">GDB<\/a><\/span><span class=\"wp_keywordlink_affiliate\"><a title=\"\u67e5\u770b \u8c03\u8bd5 \u4e2d\u7684\u5168\u90e8\u6587\u7ae0\" href=\"http:\/\/lenky.info\/tag\/%e8%b0%83%e8%af%95\/\" target=\"_blank\" rel=\"noopener\">\u8c03\u8bd5<\/a><\/span><span class=\"wp_keywordlink_affiliate\"><a title=\"\u67e5\u770b C\u7a0b\u5e8f \u4e2d\u7684\u5168\u90e8\u6587\u7ae0\" href=\"http:\/\/lenky.info\/tag\/c%e7%a8%8b%e5%ba%8f\/\" target=\"_blank\" rel=\"noopener\">C\u7a0b\u5e8f<\/a><\/span>\u7684<a href=\"http:\/\/sourceware.org\/gdb\/documentation\/\" target=\"_blank\" rel=\"noopener\">\u5e38\u7528\u547d\u4ee4\u4e0e\u624b\u6bb5<\/a>\u5c31\u4e0d\u591a\u8bf4\u4e86\uff0c\u8fd9\u91cc\u4e3b\u8981\u4ecb\u7ecd\u4e00\u4e0b\u5982\u4f55\u5bf9C\u7a0b\u5e8f\u505a\u5230<span class=\"wp_keywordlink_affiliate\"><a title=\"\u67e5\u770b \u6c47\u7f16 \u4e2d\u7684\u5168\u90e8\u6587\u7ae0\" href=\"http:\/\/lenky.info\/tag\/%e6%b1%87%e7%bc%96\/\" target=\"_blank\" rel=\"noopener\">\u6c47\u7f16<\/a><\/span>\u6307\u4ee4\u7ea7\u522b\u7684\u8c03\u8bd5\u3002<\/div>\n<div>\n\u9996\u5148\u662f\u83b7\u53d6\u6c47\u7f16\u4ee3\u7801\uff0c\u8fd9\u53ef\u4ee5\u901a\u8fc7disassemble\u547d\u4ee4\u6216x\u547d\u4ee4\u6216\u7c7b\u4f3c\u7684\u547d\u4ee4\uff1a<\/div>\n<div><\/div>\n<div>\n<pre class=\"cpp\">[root@localhost test]# gdb .\/a.out -q\r\n(gdb) list\r\n1   #include&lt;stdio.h&gt;\r\n2   #include&lt;malloc.h&gt;\r\n3\r\n4   int callee(int a, int b, int c, int d, int e)\r\n5   {\r\n6       return 1;\r\n7   }\r\n8\r\n9   int main(){\r\n10      callee(1,2,3,4,5);\r\n(gdb) disassemble main\r\nDump of assembler code for function main:\r\n0x0000000000400463 &lt;main+0&gt;:  push   %rbp\r\n0x0000000000400464 &lt;main+1&gt;:  mov    %rsp,%rbp\r\n0x0000000000400467 &lt;main+4&gt;:  mov    $0x5,%r8d\r\n0x000000000040046d &lt;main+10&gt;: mov    $0x4,%ecx\r\n0x0000000000400472 &lt;main+15&gt;: mov    $0x3,%edx\r\n0x0000000000400477 &lt;main+20&gt;: mov    $0x2,%esi\r\n0x000000000040047c &lt;main+25&gt;: mov    $0x1,%edi\r\n0x0000000000400481 &lt;main+30&gt;: callq  0x400448 &lt;callee&gt;\r\n0x0000000000400486 &lt;main+35&gt;: mov    $0x2,%eax\r\n0x000000000040048b &lt;main+40&gt;: leaveq\r\n0x000000000040048c &lt;main+41&gt;: retq\r\nEnd of assembler dump.\r\n(gdb) x\/10i main\r\n0x400463 &lt;main&gt;:  push   %rbp\r\n0x400464 &lt;main+1&gt;:    mov    %rsp,%rbp\r\n0x400467 &lt;main+4&gt;:    mov    $0x5,%r8d\r\n0x40046d &lt;main+10&gt;:   mov    $0x4,%ecx\r\n0x400472 &lt;main+15&gt;:   mov    $0x3,%edx\r\n0x400477 &lt;main+20&gt;:   mov    $0x2,%esi\r\n0x40047c &lt;main+25&gt;:   mov    $0x1,%edi\r\n0x400481 &lt;main+30&gt;:   callq  0x400448 &lt;callee&gt;\r\n0x400486 &lt;main+35&gt;:   mov    $0x2,%eax\r\n0x40048b &lt;main+40&gt;:   leaveq\r\n(gdb)<\/pre>\n<p>\u63a5\u7740\uff0c\u5229\u7528display\u547d\u4ee4\u81ea\u52a8\u663e\u793a\u5f53\u524d\u6b63\u8981\u6267\u884c\u7684\u6c47\u7f16\u6307\u4ee4\uff0c<a href=\"http:\/\/sourceware.org\/gdb\/current\/onlinedocs\/gdb\/Auto-Display.html#Auto-Display\" target=\"_blank\" rel=\"noopener\">display\u547d\u4ee4<\/a>\u53ef\u4ee5\u5728\u6bcf\u6b21\u7a0b\u5e8f\u6682\u505c\u65f6\u81ea\u52a8\u6253\u5370\u6307\u5b9a\u53d8\u91cf\u7684\u503c\u3002\u800c\u6211\u4eec\u8981\u663e<\/div>\n<div><\/div>\n<div>\u793a\u7684\u6c47\u7f16\u6307\u4ee4\u5728ip\u5bc4\u5b58\u5668\u5185\uff08\u5f53\u7136\uff0cip\u5bc4\u5b58\u5668\u5185\u5b58\u50a8\u7684\u662f\u673a\u5668\u7801\uff09\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u770b\uff08\u5148\u5f97\u628a\u7a0b\u5e8f\u6267\u884c\u8d77\u6765\uff09\uff1a<\/div>\n<div><\/div>\n<div>\n<pre class=\"cpp\">(gdb) b main\r\nBreakpoint 1 at 0x400467: file t3.5.c, line 10.\r\n(gdb) r\r\nStarting program: \/root\/test\/a.out \r\n \r\nBreakpoint 1, main () at t3.5.c:10\r\n10      callee(1,2,3,4,5);\r\n(gdb) info reg\r\nrax            0x3cd2153a60 261222644320\r\nrbx            0x3cd101bbc0 261204589504\r\nrcx            0x4004a0 4195488\r\nrdx            0x7fffc5f6fa38   140736514685496\r\nrsi            0x7fffc5f6fa28   140736514685480\r\nrdi            0x1  1\r\nrbp            0x7fffc5f6f940   0x7fffc5f6f940\r\nrsp            0x7fffc5f6f940   0x7fffc5f6f940\r\nr8             0x3cd21522d0 261222638288\r\nr9             0x3cd0e0d620 261202433568\r\nr10            0x0  0\r\nr11            0x3cd1e1d8a0 261219276960\r\nr12            0x0  0\r\nr13            0x7fffc5f6fa20   140736514685472\r\nr14            0x0  0\r\nr15            0x0  0\r\nrip            0x400467 0x400467 &lt;main+4&gt;\r\neflags         0x246    [ PF ZF IF ]\r\ncs             0x33 51\r\nss             0x2b 43\r\nds             0x0  0\r\nes             0x0  0\r\nfs             0x0  0\r\ngs             0x0  0\r\nfctrl          0x37f    895\r\nfstat          0x0  0\r\nftag           0xffff   65535\r\nfiseg          0x0  0\r\nfioff          0x0  0\r\nfoseg          0x0  0\r\nfooff          0x0  0\r\nfop            0x0  0\r\nmxcsr          0x1f80   [ IM DM ZM OM UM PM ]\r\n(gdb)<\/pre>\n<div><strong>\u770b\u6c47\u7f16\u6307\u4ee4\uff1a<br \/>\n<\/strong><\/div>\n<div>\n<pre class=\"cpp\">(gdb) p $rip\r\n$2 = (void(*)()) 0x400467 &lt;main+4&gt;\r\n(gdb) x\/i $rip\r\n0x400467 &lt;main+4&gt;:    mov    $0x5,%r8d\r\n(gdb)<\/pre>\n<p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u5229\u7528\u4e00\u4e2a\u540d\u4e3a<a href=\"http:\/\/sourceware.org\/gdb\/current\/onlinedocs\/gdb\/Registers.html#Registers\" target=\"_blank\" rel=\"noopener\">pc<\/a>\u7684gdb\u5185\u90e8\u53d8\u91cf\uff1a<\/div>\n<div>\n<pre class=\"cpp\">(gdb) p $pc\r\n$3 = (void(*)()) 0x400467 &lt;main+4&gt;\r\n(gdb) x\/i $pc\r\n0x400467 &lt;main+4&gt;:    mov    $0x5,%r8d\r\n(gdb)<\/pre>\n<p>\u7ed3\u5408display\u547d\u4ee4\u548c\u5bc4\u5b58\u5668\u6216pc\u5185\u90e8\u53d8\u91cf\uff0c\u6211\u4eec\u505a\u5982\u4e0b\u8bbe\u7f6e\uff1a<\/p><\/div>\n<div>\n<pre class=\"cpp\">(gdb) display \/i $pc\r\n1: x\/i $pc\r\n0x400467 &lt;main+4&gt;:    mov    $0x5,%r8d\r\n(gdb)<\/pre>\n<p>\u540c\u65f6\u663e\u793a\u591a\u6761\u6c47\u7f16\uff0c\u6bd4\u59823\u6761\uff1a<\/p><\/div>\n<div>\n<pre class=\"cpp\">(gdb) display \/3i $pc\r\n(gdb) b main\r\nBreakpoint 1 at 0x400467: file t3.5.c, line 10.\r\n(gdb) r\r\nStarting program: \/root\/test\/a.out \r\n \r\nBreakpoint 1, main () at t3.5.c:10\r\n10      callee(1,2,3,4,5);\r\n1: x\/3i $pc\r\n0x400467 &lt;main+4&gt;:    mov    $0x5,%r8d\r\n0x40046d &lt;main+10&gt;:   mov    $0x4,%ecx\r\n0x400472 &lt;main+15&gt;:   mov    $0x3,%edx\r\n(gdb)<\/pre>\n<p>\u63a5\u4e0b\u6765\uff0c\u5229\u7528<a href=\"http:\/\/sourceware.org\/gdb\/current\/onlinedocs\/gdb\/Continuing-and-Stepping.html#Continuing-and-Stepping\" target=\"_blank\" rel=\"noopener\">ni<\/a>\uff08nexti\uff09\u6216si\uff08stepi\uff09\u547d\u4ee4\u8fdb\u884c\u6c47\u7f16\u6307\u4ee4\u7ea7\u7684\u8c03\u8bd5\uff0c\u5982\u4e0b\u6240\u793a\u53ef\u4ee5\u770b\u5230\u53c2\u6570\u662f\u5982\u4f55\u4f20\u9012\u7684\uff1a<\/div>\n<div>\n<pre class=\"cpp\">(gdb) display \/i $pc\r\n1: x\/i $pc\r\n0x400467 &lt;main+4&gt;:    mov    $0x5,%r8d\r\n(gdb) ni\r\n0x000000000040046d  10      callee(1,2,3,4,5);\r\n1: x\/i $pc\r\n0x40046d &lt;main+10&gt;:   mov    $0x4,%ecx\r\n(gdb) ni\r\n0x0000000000400472  10      callee(1,2,3,4,5);\r\n1: x\/i $pc\r\n0x400472 &lt;main+15&gt;:   mov    $0x3,%edx\r\n(gdb) ni\r\n0x0000000000400477  10      callee(1,2,3,4,5);\r\n1: x\/i $pc\r\n0x400477 &lt;main+20&gt;:   mov    $0x2,%esi\r\n(gdb) ni\r\n0x000000000040047c  10      callee(1,2,3,4,5);\r\n1: x\/i $pc\r\n0x40047c &lt;main+25&gt;:   mov    $0x1,%edi\r\n(gdb)<\/pre>\n<p>\u66f4\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u6cd5\u662f\u5229\u7528<a href=\"http:\/\/sourceware.org\/gdb\/current\/onlinedocs\/gdb\/TUI-Commands.html#TUI-Commands\" target=\"_blank\" rel=\"noopener\">layout<\/a>\u663e\u793a\u6c47\u7f16\u4ee3\u7801\u7a97\u53e3\uff1a<\/div>\n<div>\n<pre class=\"cpp\">(gdb) help layout\r\nChange the layout of windows.\r\nUsage: layout prev | next | &lt;layout_name&gt;\r\nLayout names are:\r\n   src   : Displays source and command windows.\r\n   asm   : Displays disassembly and command windows.\r\n   split : Displays source, disassembly and command windows.\r\n   regs  : Displays registerwindow. If existing layout\r\n           is source\/command or assembly\/command, the\r\n           registerwindow is displayed. If the\r\n           source\/assembly\/command (split) is displayed,\r\n           theregisterwindow is displayed with\r\n           the window that has current logical focus.\r\n \r\n(gdb) layout asm   lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\r\n   x0x400463 &lt;main&gt;                 push   %rbp                                                x\r\n   x0x400464 &lt;main+1&gt;               mov    %rsp,%rbp                                           x\r\n   x0x400467 &lt;main+4&gt;               mov    $0x5,%r8d                                           x\r\n   x0x40046d &lt;main+10&gt;              mov    $0x4,%ecx                                           x\r\n   x0x400472 &lt;main+15&gt;              mov    $0x3,%edx                                           x\r\n   x0x400477 &lt;main+20&gt;              mov    $0x2,%esi                                           x\r\n   x0x40047c &lt;main+25&gt;              mov    $0x1,%edi                                           x\r\n   x0x400481 &lt;main+30&gt;              callq  0x400448 &lt;callee&gt;                                   x\r\n   x0x400486 &lt;main+35&gt;              mov    $0x2,%eax                                           x\r\n   x0x40048b &lt;main+40&gt;              leaveq                                                     x\r\n   x0x40048c &lt;main+41&gt;              retq                                                       x\r\n   x0x40048d                        nop                                                        x\r\n   x0x40048e                        nop                                                        x\r\n   x0x40048f                        nop                                                        x\r\n   x0x400490 &lt;__libc_csu_fini&gt;      repz retq                                                  x\r\n   x0x400492                        nopl   0x0(%rax)                                           x\r\n   x0x400499                        nopl   0x0(%rax)                                           x\r\n   x0x4004a0 &lt;__libc_csu_init&gt;      mov    %r12,-0x20(%rsp)                                    x\r\n   x0x4004a5 &lt;__libc_csu_init+5&gt;    mov    %r13,-0x18(%rsp)                                    x\r\n   x0x4004aa &lt;__libc_csu_init+10&gt;   lea    0x2001bb(%rip),%r12        # 0x60066c               x\r\n   x0x4004b1 &lt;__libc_csu_init+17&gt;   mov    %r14,-0x10(%rsp)                                    x\r\n   x0x4004b6 &lt;__libc_csu_init+22&gt;   mov    %r15,-0x8(%rsp)                                     x\r\n   x0x4004bb &lt;__libc_csu_init+27&gt;   mov    %rsi,%r14                                           x\r\n   x0x4004be &lt;__libc_csu_init+30&gt;   mov    %rbx,-0x30(%rsp)                                    x\r\n   x0x4004c3 &lt;__libc_csu_init+35&gt;   mov    %rbp,-0x28(%rsp)                                    x\r\n   x0x4004c8 &lt;__libc_csu_init+40&gt;   sub    $0x38,%rsp                                          x\r\n mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj\r\nexec No process In:                                                           Line: ??   PC: 0x0\r\n(gdb)<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 &nbsp; \u8c03\u8bd5\u7a0b\u5e8f\u65f6\uff0c\u5728g<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[117],"class_list":["post-5039","post","type-post","status-publish","format-standard","hentry","tag-01-linux"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=5039"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5039\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=5039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=5039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=5039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}