{"id":283,"date":"2022-05-07T12:55:32","date_gmt":"2022-05-07T04:55:32","guid":{"rendered":"https:\/\/www.guger.top\/?p=283"},"modified":"2022-05-07T12:57:41","modified_gmt":"2022-05-07T04:57:41","slug":"%e6%b5%b7%e6%80%9d%e4%bd%bf%e7%94%a8gdbserver%e8%bf%9b%e8%a1%8c%e7%a8%8b%e5%ba%8f%e8%b0%83%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.guger.top\/index.php\/2022\/05\/07\/%e6%b5%b7%e6%80%9d%e4%bd%bf%e7%94%a8gdbserver%e8%bf%9b%e8%a1%8c%e7%a8%8b%e5%ba%8f%e8%b0%83%e8%af%95\/","title":{"rendered":"\u6d77\u601d\u4f7f\u7528gdbserver\u8fdb\u884c\u7a0b\u5e8f\u8c03\u8bd5"},"content":{"rendered":"<p>\u4f7f\u7528\u7684\u662fgdb8.1\u7248\u672c<a href=\"https:\/\/ftp.gnu.org\/gnu\/gdb\/\" target=\"_blank\"  rel=\"nofollow\" >\u94fe\u63a5<\/a><br \/>\n\u4e0a\u624b\u5f00\u59cb\u5148\u4fee\u6539<br \/>\n\u521b\u5efa\u65b0\u73af\u5883<br \/>\nError: \u2018log2\u2019 is not a member of \u2018std\u2019<br \/>\n\u5c06std::\u5220\u9664<br \/>\n\u5c06<\/p>\n<pre><code class=\"language-c\">  (std::pow (2, std::ceil (std::log2 (name_count * 4 \/ 3))));\n  \/\/\u65e7\u7684\n   (std::pow (2, std::ceil (log2 (name_count * 4 \/ 3))));\n    \/\/\u65b0\u7684<\/code><\/pre>\n<p>\u5728obstack.h\u4e2d\u589e\u52a0\u5b9a\u4e49<br \/>\nundefined reference to  _obstack_free&#039; \u9519\u8bef<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a\u4f7f\u7528\u5b8f\u5b9a\u4e49\u4f7f\u7528_obstack_free\u51fd\u6570\u66ff\u6362obstack_free<\/p>\n<pre><code class=\"language-c\">#ifndef obstack_free\n#define _obstack_free obstack_free\n#endif<\/code><\/pre>\n<p>gdb\u5bbf\u4e3b\u673a\uff08\u865a\u62df\u673a\u7684\u7f16\u8bd1\uff09<br \/>\n\u9996\u5148\u4e0b\u8f7d\u4e00\u4e2aexpat\u5426\u5219\u540e\u7eed\u8fd0\u884c\u4f1a\u51fa\u9519\uff01<br \/>\n\u5728gdb\u76ee\u5f55\u4e0b\u6267\u884c<\/p>\n<pre><code class=\"language-shell\">.\/configure --target=arm-himix100-linux   --with-expat -with-libexpat-prefix=\/usr\/local\/expat --program-prefix=arm-himix100-linux --prefix=\/your_path\/gdb-8.1\/bin\nmake -j8&&make install<\/code><\/pre>\n<p>\u8fdb\u884c\u7f16\u8bd1<br \/>\n\u5728gdb\/gdbserver\u76ee\u5f55\u4e0b<\/p>\n<pre><code class=\"language-shell\">.\/configure --prefix=\/your_path\/gdb-8.2\/gdb\/gdbserver\/bin --host=arm-himix100-linux LD=arm-himix100-linux-ld CC=arm-himix100-linux-gcc CXX=arm-himix100-linux-g++\nmake -j8&&make install<\/code><\/pre>\n<p>\u8fdb\u884cgdbserver\u7f16\u8bd1<br \/>\n\u8fd0\u884c\u547d\u4ee4\u65f6\u9700\u8981<\/p>\n<pre><code class=\"language-shell\">.\/gdbserver :6666 serial 1#gdbserver\u540d\u79f0 \u52a0ip\uff1a\u7aef\u53e3 ip\u53ef\u7701\u7565 \u540e\u9762\u8ddf\u9700\u8981\u6267\u884c\u7684\u6267\u884c\u6587\u4ef6\u548c\u76f8\u5173\u8f93\u5165\u53c2\u6570<\/code><\/pre>\n<p>\u5728\u865a\u62df\u673a\u4e2d\u6267\u884c\u7f16\u8bd1\u597d\u7684gdb\u6587\u4ef6<\/p>\n<pre><code class=\"language-shell\">remote server xxxxxx:6666<\/code><\/pre>\n<p>\u6216\u8005\u914d\u7f6eeclipse<br \/>\n<img decoding=\"async\" src=\"https:\/\/cache.image.guger.top\/2022\/05\/06\/6275150e0eccf.png\" alt=\"1651840299012.png\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/cache.image.guger.top\/2022\/05\/06\/627514cfb07f3.png\" alt=\"1651840236654.png\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/cache.image.guger.top\/2022\/05\/06\/6275154b8454d.png\" alt=\"1651840360509.png\" \/><br \/>\n\u914d\u7f6e\u597d\u4e86\u4ee5\u540e\u5373\u53ef\u8fdb\u884c\u8fdc\u7a0b\u8c03\u8bd5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528\u7684\u662fgdb8.1\u7248\u672c\u94fe\u63a5 \u4e0a\u624b\u5f00\u59cb\u5148\u4fee\u6539 \u521b\u5efa\u65b0\u73af\u5883 Error: \u2018log2\u2019 is not a member of \u2018st &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":""},"categories":[32,21],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","hentry","category-linux","category-21"],"_links":{"self":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/comments?post=283"}],"version-history":[{"count":0,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/posts\/283\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/media?parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/categories?post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/tags?post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}