<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/developer/tools-software/tools/f/armds-forum/417/arm-ds-5-tutorial-for-android</link><description> Note: This was originally posted on 5th December 2011 at http://forums.arm.com Hi, I&amp;#39;ve created a step by step blog post for using DS-5 as debugger tool for Android http://kernel.ozandroid.info/?p=83 Hope this is useful for others. Cheers </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/752?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f4c2aa8f-f3f5-43ec-b578-96ef490b3446</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 21st January 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;What is your device you are testing on?&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/753?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e9c9e953-582c-468c-a9b7-dc3c983e897d</guid><dc:creator>mighter mighter</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 17th January 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Hi! First of all, thanks for your work. That is the first debugger that somehow works. I tried it on android ndk sample projects - it went fine. But on my own projects I have encountered problems. &lt;/span&gt;&lt;br /&gt;&lt;span&gt;I do everything like in tutorial, but execution of the app stops, I hit Run/Continue button, but only get message:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;wait&lt;/span&gt;&lt;br /&gt;&lt;span&gt;continue&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Stopped due to signal 11: SIGSEGV (Invalid memory segment access)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Execution stopped at: 0x80CB1314&lt;/span&gt;&lt;br /&gt;&lt;span&gt;In thread 1 (OS thread id 1793)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;0x80CB1314&amp;#160;&amp;#160; LDR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; r0,[r0,#0x38]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Any hints?&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/751?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b4fba6e5-3b75-4c12-b4f2-476587744dd0</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 19th December 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;did u add &amp;quot;LOCAL_CFLAGS += -g&amp;quot; in your jni/Android.mk ?&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span&gt;No, I haven&amp;#39;t added it, as (I think) it&amp;#39;s not needed, as in my AndroidManifest.xml I have android:debuggable=&amp;quot;true&amp;quot;. I&amp;#39;ve also tested now with &amp;quot;LOCAL_CFLAGS += -g&amp;quot;, and no difference.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Most time when I use &amp;quot;Download and debug an Android application&amp;quot; I do get error &amp;quot;[1]&amp;#160;&amp;#160; Segmentation fault&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; run-as com.examp...&amp;quot; (it&amp;#39;s as I think form gdbserver)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;But debugging works on SGS2 now with some &amp;quot;special&amp;quot; taken actions (as in my post from 17 December 2011 - 03:26 PM).&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/750?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:23f61847-15fb-4749-9aaa-6f439d65e81d</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 17th December 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Finally I&amp;#39;ve got DS-5 Debugger &amp;#39;working&amp;#39; with SGS2 on GB (2.3). But it&amp;#39;s a little painful.&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;EDIT: Debugging on SGS2 with ICS (4.0 LPQ) works fine, at least! No need to use below manual.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;First of all, option in DS-5 named &amp;quot;Download and debug an Android application&amp;quot; wasn&amp;#39;t work as expected.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;ll describe it more later, after I do more tests with it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;To make debugging work on SGS2 (and Windows) I need to:&lt;/span&gt;&lt;br /&gt;&lt;span&gt;0. Create DS-5 Debugger profile as in tutorial, but change &amp;quot;Debug operation&amp;quot; to &amp;quot;Attach to a running Android application&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;1. Build and Install apk&lt;/span&gt;&lt;br /&gt;&lt;span&gt;You can use &amp;quot;Android application&amp;quot; debugging profile. It will:&lt;/span&gt;&lt;br /&gt;&lt;span&gt;- build .apk&lt;/span&gt;&lt;br /&gt;&lt;span&gt;- install it on device&lt;/span&gt;&lt;br /&gt;&lt;span&gt;- run it&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Of course you need build your .so first if you haven&amp;#39;t for example added ndk-build to your&lt;/span&gt;&lt;br /&gt;&lt;span&gt;project &amp;quot;Builders&amp;quot; (which is really easy as of NDK v7 - no need to use cygwin).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;2. Run activity on device(if it wasn&amp;#39;t started in point 1), and then close it by &amp;#39;back button&amp;#39;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;As I know, process of this activity will be still running (but activity thread/application(?) will be closed).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Closing activity is very important. I couldn&amp;#39;t get debbuging work without this point!.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;3. Start debugging using your DS-5 debug profile.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;You shouldn&amp;#39;t get any errors, and in &amp;quot;Debug Control&amp;quot; there should be break on thread waiting on &amp;quot;epoll_wait&amp;quot;.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Debugger should attach to your process (but activity isn&amp;#39;t running) and pause it.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;4. Set breakpoint(s) in your C/C++ code. (optional)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;5. Press &amp;quot;Run/Continue&amp;quot; (green button in &amp;quot;Debug Control&amp;quot;).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;It will not run your activity! It will just continue run of your paused android process (in point 3).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;6. Then start your activity on device. You should see breakpoint hit (if you set it in point 4).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;7. You can also add breakpoints later, but first you need to pause application.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;In &amp;quot;Debug Control&amp;quot; window press yellow II button, and then you can&lt;/span&gt;&lt;br /&gt;&lt;span&gt;add/remove breakpoints, and next press again &amp;quot;Run/Continue&amp;quot; button.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;But this doesn&amp;#39;t work always (but most time do).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Sometimes I get errors at point 3 or at point 6 (gdbserver: &amp;quot;[1]&amp;#160;&amp;#160; Segmentation fault&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; run-as com.examp...&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Then you need to try again from point 2. (run and close activity...).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Problem with this configuration is that, if your application crashing at start,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;you won&amp;#39;t be able to debug it &lt;/span&gt;&lt;a href="http://forums.arm.com/public/style_emoticons/default/sad.gif"&gt;&lt;img alt=":(" src="http://forums.arm.com/public/style_emoticons/default/sad.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span&gt;You need to successfully run and close activity (process of activity must remain running).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I think that this one could be workarounded by changes in code (to run your main code at some condition/variable,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;which will be chnaged manually on debugging session at second activity run).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I would really thanks to DS-5 team and @nicksydney. Good job!&lt;/span&gt;&lt;br /&gt;&lt;span&gt;It&amp;#39;s first debbuger (and tutorial for it) that worked for me!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;PS. Really nice view to see debugging working on device after 6+ months of&lt;/span&gt;&lt;br /&gt;&lt;span&gt;using of LOGI/__android_log_print and analysing/filtering LogCat &lt;/span&gt;&lt;a href="http://forums.arm.com/public/style_emoticons/default/smile.gif"&gt;&lt;img alt=":)" src="http://forums.arm.com/public/style_emoticons/default/smile.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span&gt;But I think that it cannot replace my VisualStudio+Mali OpenGL ES 2.0 emulator setup,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;at least for now, but I will definitly help when testing code/application on real device!&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/749?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:818027cc-446a-4731-a12b-d496fa197b04</guid><dc:creator>iosif hamlatzis</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 17th March 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Did you replaced gdbserv from ARM Extras &amp;quot;menu&amp;quot; (as in link from first post of this topic)?&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m trying to debug my game on the emulator, I did replace the gdbserver from the ARM extras folder, but every time I press the debug button, my eclipse IDE does a recompile and replaces every file on my folder, so the the gdbserver from DS-5 is replaced.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Also if I manage to replace again the gdbserver before the game launches then the correct debugger is launched but as you can see from my screenshot the game stops a lot sooner than my game&amp;#39;s entry point/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dl.dropbox.com/u/45547852/Android/debug_capture.png" rel="nofollow"&gt;http://dl.dropbox.co...bug_capture.png&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;ve placed a breakpoint in my &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;void android_main(android_app* pApplication)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;but it never fires&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/748?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e218a0a4-0aa7-44f1-a5f3-f4cf4ff57bba</guid><dc:creator>Barney Williams</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 14th February 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Hi Krystian,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I had not replaced gdbserv from the ARM Extras menu.&amp;#160; I have now though and still get the problem.&amp;#160; I will try your other suggestions and let you know how I get on.&amp;#160; Thanks for all your help!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Barney&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/747?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:97aa0a75-f742-4fff-90b4-9c7069e089ef</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 6th February 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Did you replaced gdbserv from ARM Extras &amp;quot;menu&amp;quot; (as in link from first post of this topic)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m using 2.3.5 (from around 09.2011). &amp;quot;Real&amp;quot; GDB Server comes from device &amp;quot;manufacturer&amp;quot;, AFIK this gdbserv is only some kind of bridge between real GDB server and application. So it might be it (new version of Android in device --&amp;gt; possible new/fixed version of GDB Server).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Also you might try to update Kies as it comes with new USB drivers that allows USB debugging. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If above won&amp;#39;t help, you might try to switch USB cable to other USB port .&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Today at work I saw problems with debugging Java/Dalvik code (or even problems with adb connection), when 1,8m USB cable was plugged into back PC USB ports (it might be some USB3.0 ports). When cable was plugged into front-PC USB ports, then there was no problems at all.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;When I plug SGS2 to combo USB+eSata+&amp;quot;Charge&amp;quot; port in my laptop, it connects/disconnects device every 1-2s. I need use only &amp;#39;regular&amp;#39; USB ports.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/745?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:85f3ff7b-3dc1-4a08-abe5-6e41c618093d</guid><dc:creator>Barney Williams</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 6th February 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Hi Krystian,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Sorry I should have said,&amp;#160; I get this error when my code hits a breakpoint.&amp;#160; I did follow your steps above, including step 2 - it is the only reason it works at all, thank you!&amp;#160; I will try and post more information when I get home later.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I am running Android 2.3.3 so maybe upgrading to 2.3.5+ will help.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Thanks, &lt;/span&gt;&lt;br /&gt;&lt;span&gt;Barney&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/746?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b5008e6f-c9da-42e7-abff-0102408d7eb4</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 6th February 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, I had similar or even same crashes. I don&amp;#39;t see any problems with debugging non &amp;quot;main&amp;quot; threads (even if log says &amp;quot;AAAAAH, Can&amp;#39;t debug threads!&amp;quot; &lt;/span&gt;&lt;a href="http://forums.arm.com/public/style_emoticons/default/wink.gif"&gt;&lt;img alt=";)" src="http://forums.arm.com/public/style_emoticons/default/wink.gif" /&gt;&lt;/a&gt;&lt;span&gt; ) . I&amp;#39;m using NativeActivity, so my NDK/C++ code does not&amp;#160; run on main thread but on it&amp;#39;s own thread.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Did you followed steps exactly as in my post? Most important thing before &lt;/span&gt;&lt;strong&gt;each&lt;/strong&gt;&lt;span&gt; ndk&lt;/span&gt;&lt;strong&gt; &lt;/strong&gt;&lt;span&gt;debugging session on SGS2 is point &amp;quot;&lt;/span&gt;&lt;strong&gt;two&lt;/strong&gt;&lt;span&gt;&amp;quot; - run activity, and &lt;/span&gt;&lt;strong&gt;close it&lt;/strong&gt;&lt;span&gt;, but do &lt;/span&gt;&lt;strong&gt;NOT&lt;/strong&gt;&lt;span&gt; terminate it! Then you can start debugging by &amp;quot;Attach to a running Android application&amp;quot; (as in this &amp;quot;SGS2 NDK debug tutorial&amp;quot;).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Write what steps make you trouble, so I help you.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/744?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e6b88cc4-c117-40d4-9a77-395547f849a4</guid><dc:creator>Barney Williams</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 5th February 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Hi Krsystian,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Thank you for your Galaxy S2 instructions, I am also using the S2 and I was wondeirng how you solved this error:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;ERROR(LUX42): Stopped due to signal 5: SIGTRAP (Trace trap (used by debugger))&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Application terminated due to signal 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I have read that this was a problem related to only being able to debug on the main thread but you aren&amp;#39;t having this problem?&amp;#160; I get this error whenever I hit a breakpoint.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Barney&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/743?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a712a2f9-59a4-49ee-86de-61d798d5b416</guid><dc:creator>Abel Zhang</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 18th December 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;[size=&amp;quot;4&amp;quot;]It is [/size][size=&amp;quot;4&amp;quot;][size=&amp;quot;4&amp;quot;][size=&amp;quot;4&amp;quot;] one of Hot topics&amp;#160; [size=&amp;quot;4&amp;quot;]about [/size][/size]Debugging native code of Android NDK is, but it is igored about Compiling native code of Android NDK with ARMCC .[/size]&lt;/span&gt;&lt;br /&gt;&lt;span&gt;[/size]&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/742?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fd606b61-bb34-417e-b9f6-a7315f4e51a8</guid><dc:creator>Abel Zhang</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 18th December 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;C[size=&amp;quot;4&amp;quot;]ould ARMCC in DS-5 pro be used to compile the native code of Android NDK? If could, then how to do?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;We&amp;#160; try to use ARMCC to compile NEON intrincis in the native code of&amp;#160; Android NDK, but found none guideline or articles, any sugessions?&amp;#160; thanks a lot... [/size]&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/740?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:80d5291b-24f1-42eb-82dd-574b74d1d4a5</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 11th August 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;ICS is an &amp;quot;Ice Cream Sandwich&amp;quot; - Android 4.0.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Originally on SGSII there was GB (Gingerbread - Android 2.3), and there was problems with debugging, but after Samsung updated software on SGSII to ICS (4.0), everything works much better.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/741?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:61dd99e9-1941-4450-bfea-8787652b96b0</guid><dc:creator>Gerardo Orozco</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 10th August 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Hello Krystian.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m having exactly the same problem you are describing with DS-5, on a Samsung Galaxy Ace and&amp;#160; a Samsung Galaxy Y Phone.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Your detailed steps of &amp;quot;Attaching to a running Android application&amp;quot; are working fine - thank you very much for that -,&amp;#160; but I&amp;#39;m curious of your Edit, where you are using something called ICS.&amp;#160; Could you elaborate a bit on this workaround you found?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Thank you very much in Advance!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Gerardo&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/738?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:76ed2867-8bbb-4a96-a34c-d1134eab01a5</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 20th March 2012 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You could try to replace gdbserver inside NDK (like ...\android-ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Does LogCat says anything useful? Maybe you are trying to use for example OpenGL ES 2.0 in emulator (which isn&amp;#39;t supported)?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Also, hitting breakpoint at begining of android_main is a little bit tricky...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;--&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Just for note, debugging on SGS2 with official ICS (4.0) works fine now (or at least same as on other devices)!&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/739?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:81524261-88a5-4a63-84db-fe8082a148a6</guid><dc:creator>Daniel Schmidt</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 12th December 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Absolutely&amp;#160;&amp;#160; nicksydney..I am also a user of Nexus and I am still not getting any issues while debugging on Java. I haven&amp;#39;t use NDK yet and that&amp;#39;s why I have not proper information on that. And I don&amp;#39;t think it should be create any issues while debugging on Java.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/737?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5b343458-3db3-45af-ab2c-34e01262cbc0</guid><dc:creator>Nanik T</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 11th December 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Hi Krystian,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I don&amp;#39;t have SGS2 with me so it&amp;#39;s bit hard to replicate your problem, but the normal steps that I do before debugging the app inside a real device is to use the simulator and see whether you are able to do that, if you are able to do that this means that there could be some device specific configuration or settings that is needed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m using Nexus S and able to do debugging both Java and using NDK without any problem, so maybe there is something specific to SGS2, are there any other devices that you can try with for comparison.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Sorry can&amp;#39;t help too much with your problem.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/736?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a2a0ae91-809e-42a0-9e37-edf22c464505</guid><dc:creator>Krystian Bigaj</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 10th December 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Thanks for great tutorials, but I have a problems with it...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;ve followed your tutorial closely, but I&amp;#39;m not able to get it works correctly (not sure where I could make mistake). I&amp;#39;ve tried it two times, but still no luck &lt;/span&gt;&lt;a href="http://forums.arm.com/public/style_emoticons/default/sad.gif"&gt;&lt;img alt=":(" src="http://forums.arm.com/public/style_emoticons/default/sad.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;ve tried with HelloNeon example, and also with NativeActivity (which I&amp;#39;m most interested to get debugging work - I don&amp;#39;t want to touch any Java code)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;My system is Win7 x64 Pro, and device is Samsung Galaxy S2 (GT-I9100) running 2.3.5 (I91000XXKI4). Eclipse 3.7.1 (32-bit). I&amp;#39;ve replaced gdbserver in NDK with one found in ARM Extras (as in tutorial), and I can confirm that my &amp;#39;samples\native-activity\libs\armeabi\gdbserver&amp;#39; is correct one.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Also I have tried to rebuild NDK app and .apk, after setting debuggable=&amp;quot;true&amp;quot; (tutorial tells to run ndk-build first, and then set debugabble=&amp;quot;true&amp;quot;, but AFIK debugging symbols are generated only if debuggable=&amp;quot;tru&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;What else information could be useful to diagnose this case?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Example log from Commands window:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Connected to unknown platform&lt;br /&gt;Execution stopped at: 0xAFD0C59C&lt;br /&gt;0xAFD0C59C&amp;#160;&amp;#160; POP&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {r4,r7}&lt;br /&gt;file &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\bin\app_process&amp;quot;&lt;br /&gt;WARNING(IMG53): app_process has no line debug information &lt;br /&gt;add-symbol-file &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\bin\libc.so&amp;quot;&lt;br /&gt;Loading library symbols: libc.so&lt;br /&gt;WARNING(IMG53): libc.so has no line debug information &lt;br /&gt;add-symbol-file &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\obj\local\armeabi\libnative-activity.so&amp;quot;&lt;br /&gt;Loading library symbols: libnative-activity.so&lt;br /&gt;cd &amp;quot;D:\Dev\Android\workspace&amp;quot;&lt;br /&gt;Working directory &amp;quot;D:\Dev\Android\workspace&amp;quot;&lt;br /&gt;directory &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity&amp;quot;&lt;br /&gt;Source directories searched: D:\Dev\Android\android-ndk-r7\samples\native-activity;$cdir;$cwd;$idir&lt;br /&gt;break -p &amp;quot;D:/Dev/Android/android-ndk-r7/samples/native-activity/jni/main.c&amp;quot;:270&lt;br /&gt;Breakpoint 1 at 0x81302AD8&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; on file main.c, line 270&lt;br /&gt;run&lt;br /&gt;Starting target with image D:\Dev\Android\android-ndk-r7\samples\native-activity\bin\app_process&lt;br /&gt;Running from entry point&lt;br /&gt;ERROR(LUX42): Stopped due to signal 5: SIGTRAP (Trace trap (used by debugger))&lt;br /&gt;Application terminated due to signal 5&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Sometimes in Commands I get:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;Connected to unknown platform&lt;br /&gt;Execution stopped at: 0xAFD0C59C&lt;br /&gt;0xAFD0C59C&amp;#160;&amp;#160; POP&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {r4,r7}&lt;br /&gt;file &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\bin\app_process&amp;quot;&lt;br /&gt;WARNING(IMG53): app_process has no line debug information &lt;br /&gt;add-symbol-file &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\bin\libc.so&amp;quot;&lt;br /&gt;Loading library symbols: libc.so&lt;br /&gt;WARNING(IMG53): libc.so has no line debug information &lt;br /&gt;add-symbol-file &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\obj\local\armeabi\libnative-activity.so&amp;quot;&lt;br /&gt;Loading library symbols: libnative-activity.so&lt;br /&gt;cd &amp;quot;D:\Dev\Android\workspace&amp;quot;&lt;br /&gt;Working directory &amp;quot;D:\Dev\Android\workspace&amp;quot;&lt;br /&gt;directory &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity&amp;quot;&lt;br /&gt;Source directories searched: D:\Dev\Android\android-ndk-r7\samples\native-activity;$cdir;$cwd;$idir&lt;br /&gt;break -d -p &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\jni\main.c&amp;quot;:270&lt;br /&gt;Breakpoint 1 at 0x81302AD8&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; on file main.c, line 270&lt;br /&gt;condition 1 &lt;br /&gt;break-script 1 &amp;quot;&amp;quot;&lt;br /&gt;ignore 1 0&lt;br /&gt;break-stop-on-threads 1 &lt;br /&gt;unsilence 1&lt;br /&gt;Breakpoint 1 unsilenced&lt;br /&gt;break -d -p &amp;quot;D:\Dev\Android\android-ndk-r7\samples\native-activity\jni\main.c&amp;quot;:237&lt;br /&gt;Breakpoint 2 at 0x81302A4A&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; on file main.c, line 237&lt;br /&gt;condition 2 &lt;br /&gt;break-script 2 &amp;quot;&amp;quot;&lt;br /&gt;ignore 2 0&lt;br /&gt;break-stop-on-threads 2 &lt;br /&gt;unsilence 2&lt;br /&gt;Breakpoint 2 unsilenced&lt;br /&gt;enable 2&lt;br /&gt;Breakpoint 2 enabled&lt;br /&gt;enable 1&lt;br /&gt;Breakpoint 1 enabled&lt;br /&gt;disable 1&lt;br /&gt;Breakpoint 1 disabled&lt;br /&gt;enable 1&lt;br /&gt;Breakpoint 1 enabled&lt;br /&gt;run&lt;br /&gt;Starting target with image D:\Dev\Android\android-ndk-r7\samples\native-activity\bin\app_process&lt;br /&gt;Running from entry point&lt;br /&gt;Stopped due to signal 19: SIGSTOP (Stop executing (can&amp;#39;t be caught or ignored))&lt;br /&gt;Execution stopped at: 0xAFD0C59C&lt;br /&gt;0xAFD0C59C&amp;#160;&amp;#160; POP&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {r4,r7}&lt;br /&gt;wait&lt;br /&gt;continue&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Log from App Console window:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Attached; pid = 10615&lt;br /&gt;Listening on sockaddr socket debug-socket&lt;br /&gt;libthread_db:td_ta_new: Probing system for platform bug.&lt;br /&gt;libthread_db:_get_task_permitted_caps: Found CapPerm of 0 in /proc/10848/task/10848/status&lt;br /&gt;libthread_db:_get_task_permitted_caps: Found CapPerm of 0 in /proc/10615/task/10615/status&lt;br /&gt;libthread_db:_get_task_permitted_caps: Found CapPerm of 2097152 in /proc/10615/task/10616/status&lt;br /&gt;libthread_db:td_ta_new: AAAAAH, Can&amp;#39;t debug threads!&lt;br /&gt;&lt;br /&gt;Child terminated with signal = 0x5 (SIGTRAP)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Very often I get errors like:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;Failed gdbserver configuration:&lt;br /&gt;Timeout. PID not found!&lt;br /&gt;Failed gdbserver configuration:&lt;br /&gt;Timeout. PID not found!&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Is there anyone who can tell me what&amp;#39;s wrong? I can add, that I&amp;#39;m trying to get NDK debugging for about &lt;/span&gt;&lt;strong&gt;half&lt;/strong&gt;&lt;span&gt; year(!) on SGS2, but with no luck &lt;/span&gt;&lt;a href="http://forums.arm.com/public/style_emoticons/default/sad.gif"&gt;&lt;img alt=":(" src="http://forums.arm.com/public/style_emoticons/default/sad.gif" /&gt;&lt;/a&gt;&lt;span&gt; I&amp;#39;ve tried several tutorials (with Sequoyah, Tegra Android Dev, etc.) - non of them worked for me. Now I&amp;#39;ve tried ARM DS-5, but again - not working.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Is it something wrong with SGS2 or it&amp;#39;s just me?&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/735?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f169f3b0-59d4-47ec-9b17-641bb9b6c9fa</guid><dc:creator>Hung Nguyen</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 8th December 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Thanks you very much!!!&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ARM DS-5 Tutorial For Android</title><link>https://community.arm.com/thread/734?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:54:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e6bdd1dc-f0b0-443e-9a2a-920782b8a0ee</guid><dc:creator>Alban Rampon</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 5th December 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Great job Nanik!&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Your step-by-step guide with pictures should hopefully make it easy for everyone.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Kindly, Alban&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>