{"action":"created","issue":{"url":"https://api.github.com/repos/SmingHub/Sming/issues/350","repository_url":"https://api.github.com/repos/SmingHub/Sming","labels_url":"https://api.github.com/repos/SmingHub/Sming/issues/350/labels{/name}","comments_url":"https://api.github.com/repos/SmingHub/Sming/issues/350/comments","events_url":"https://api.github.com/repos/SmingHub/Sming/issues/350/events","html_url":"https://github.com/SmingHub/Sming/pull/350","id":111508701,"number":350,"title":"Initial integration of the GDBStub project.","user":{"login":"slaff","id":247452,"avatar_url":"https://avatars.githubusercontent.com/u/247452?v=3","gravatar_id":"","url":"https://api.github.com/users/slaff","html_url":"https://github.com/slaff","followers_url":"https://api.github.com/users/slaff/followers","following_url":"https://api.github.com/users/slaff/following{/other_user}","gists_url":"https://api.github.com/users/slaff/gists{/gist_id}","starred_url":"https://api.github.com/users/slaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slaff/subscriptions","organizations_url":"https://api.github.com/users/slaff/orgs","repos_url":"https://api.github.com/users/slaff/repos","events_url":"https://api.github.com/users/slaff/events{/privacy}","received_events_url":"https://api.github.com/users/slaff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SmingHub/Sming/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":32,"created_at":"2015-10-14T22:39:34Z","updated_at":"2016-02-15T20:47:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SmingHub/Sming/pulls/350","html_url":"https://github.com/SmingHub/Sming/pull/350","diff_url":"https://github.com/SmingHub/Sming/pull/350.diff","patch_url":"https://github.com/SmingHub/Sming/pull/350.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/SmingHub/Sming/issues/comments/184387302","html_url":"https://github.com/SmingHub/Sming/pull/350#issuecomment-184387302","issue_url":"https://api.github.com/repos/SmingHub/Sming/issues/350","id":184387302,"user":{"login":"sle118","id":5656564,"avatar_url":"https://avatars.githubusercontent.com/u/5656564?v=3","gravatar_id":"","url":"https://api.github.com/users/sle118","html_url":"https://github.com/sle118","followers_url":"https://api.github.com/users/sle118/followers","following_url":"https://api.github.com/users/sle118/following{/other_user}","gists_url":"https://api.github.com/users/sle118/gists{/gist_id}","starred_url":"https://api.github.com/users/sle118/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sle118/subscriptions","organizations_url":"https://api.github.com/users/sle118/orgs","repos_url":"https://api.github.com/users/sle118/repos","events_url":"https://api.github.com/users/sle118/events{/privacy}","received_events_url":"https://api.github.com/users/sle118/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T20:47:53Z","updated_at":"2016-02-15T20:47:53Z","body":"I have setup a new environment in Ubuntu. I started by getting esp-alt-sdk and making it. Then I followed some instructions from https://blog.attachix.com/live-debugging-with-open-source-tools-programming-for-esp8266-part-4/\r\n\r\nMainly:\r\n```\r\ngit clone https://github.com/slaff/Sming.git  -b feature/gdb-dev\r\ncd Sming/Sming\r\ngit submodule init\r\ngit submodule update --recursive\r\n```\r\n\r\nand then\r\n\r\n```\r\nexport ENABLE_GDB=1\r\nmake clean\r\nmake\r\n```\r\n\r\n\r\nBuild completed with no error. Then I built the Basic_Debug with ENABLE_GDB=1 and checked the output object:\r\n```\r\nxtensa-lx106-elf-objdump -dtr out/build/app.out |grep \"gdbstub_init\"\r\n```\r\n```\r\n402373c8 g       .irom0.text\t00000000 gdbstub_init_debug_entry\r\n4020d74c g     F .irom0.text\t00000023 gdbstub_init\r\n4020d74c <gdbstub_init>:\r\n4020d761:\t29c645        \tcall0\t402373c8 <gdbstub_init_debug_entry>\r\n4020d7ae:\tfff001        \tl32r\ta0, 4020d770 <gdbstub_init+0x24>\r\n4020d7e8:\tffe321        \tl32r\ta2, 4020d774 <gdbstub_init+0x28>\r\n40211a5b:\tef4771        \tl32r\ta7, 4020d778 <gdbstub_init+0x2c>\r\n402205a4:\tb47571        \tl32r\ta7, 4020d778 <gdbstub_init+0x2c>\r\n40233ba6:\t66f441        \tl32r\ta4, 4020d778 <gdbstub_init+0x2c>\r\n40233be0:\t66e641        \tl32r\ta4, 4020d778 <gdbstub_init+0x2c>\r\n40233bf4:\t66e261        \tl32r\ta6, 4020d77c <gdbstub_init+0x30>\r\n40235c16:\td7b345        \tcall0\t4020d74c <gdbstub_init>\r\n402373c8 <gdbstub_init_debug_entry>:\r\n```\r\n\r\nThere is a call to initialize the gdb stub \r\n```\r\n40235c0d:\t00fa45        \tcall0\t40236bb4 <cpp_core_initialize>\r\n40235c10:\tfff821        \tl32r\ta2, 40235bf0 <_Z41__static_initialization_and_destruction_0ii+0x2c>\r\n40235c13:\t000785        \tcall0\t40235c8c <_ZN11SystemClass10initializeEv>\r\n40235c16:\td7b345        \tcall0\t4020d74c <gdbstub_init>\r\n40235c19:\tfff601        \tl32r\ta0, 40235bf4 <_Z41__static_initialization_and_destruction_0ii+0x30>\r\n```\r\nAnd the stub seems to install the UART handler\r\n```\r\n4020d74c <gdbstub_init>:\r\n4020d74c:\tf0c112        \taddi\ta1, a1, -16\r\n4020d74f:\t036102        \ts32i\ta0, a1, 12\r\n4020d752:\tfffc21        \tl32r\ta2, 4020d744 <install_exceptions+0x3c>\r\n4020d755:\tfffc01        \tl32r\ta0, 4020d748 <install_exceptions+0x40>\r\n4020d758:\t0000c0        \tcallx0\ta0\r\n4020d75b:\tfff685        \tcall0\t4020d6c4 <install_uart_hdlr>\r\n4020d75e:\tfffa85        \tcall0\t4020d708 <install_exceptions>\r\n4020d761:\t29c645        \tcall0\t402373c8 <gdbstub_init_debug_entry>\r\n4020d764:\t29cf85        \tcall0\t40237460 <gdbstub_do_break>\r\n```\r\n\r\nNow when I start debugging from Eclipse, I am getting the following from the gdb console:\r\n```\r\n351,861 17-target-select remote /dev/ttyUSB0\r\n352,259 18-list-thread-groups\r\n363,243 =thread-group-started,id=\"i1\",pid=\"42000\"\r\n363,243 =thread-created,id=\"1\",group-id=\"i1\"\r\n363,246 19-list-thread-groups --available\r\n363,276 &\"Register 42 is not available\\n\"\r\n363,276 ~\"0x67d72040 in ?? ()\\n\"\r\n363,276 *stopped,frame={addr=\"0x67d72040\",func=\"??\",args=[]},thread-id=\"1\",stopped-threads=\"all\"\r\n363,281 17^connected\r\n363,281 (gdb) \r\n```\r\nLooking at the console, this translates to \r\n```\r\n0x67d72040 in ?? ()\r\nRegister 42 is not available\r\nIgnoring packet error, continuing...\r\nIgnoring packet error, continuing...\r\nIgnoring packet error, continuing...\r\nIgnoring packet error, continuing...\r\nIgnoring packet error, continuing...\r\n```\r\nI would really appreciate help from anyone. I need debugging capabilities to finish my image library as I have to debug to find out where code triggers wdt."}}