Hello libs debugging line numbers

38 views
Skip to first unread message

Mitch Besser

unread,
Nov 9, 2016, 11:32:09 AM11/9/16
to android-ndk
I was playing with https://github.com/googlesamples/android-ndk/tree/master/hello-libs example with Android Studio and the line numbers while debugging into the C++ code seem off. 

For example, stepping into:


starts executing gpower on line #37

if (n > 31) {

and not line #35 <if (n == 0)> as you would expect.

I was looking for a way to see the assembly underneath to see if I'm correct or if I just don't understand how to use the debugger. 

It would be a great help me if someone could try it on their system and see if stepping though the C++ code in both the static and shared libraries works correctly for them. I'm running on Linux if that makes any difference. 

Thanks

Mitch Besser

unread,
Nov 11, 2016, 8:17:25 PM11/11/16
to android-ndk
I found a Windows 7 system to test on, I don't see the problem there. Is this just a Linux problem? 

Can someone please confirm this is a Linux problem or is it something I don't have set up correctly? If you follow the directions and uncomment as directed in the README


build and debug, it is easy to re-create (or confirm it works). 

Thanks.

Joshua Zhu

unread,
Nov 14, 2016, 1:22:19 PM11/14/16
to andro...@googlegroups.com
I have tried to debug the cpp code in a module, my break-point doesn't work, it seems that if you debug cpp code in your `app` module, it works but if you debug in another module it doesn't work.

I am not a native English speaker so can you understand my words?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/ef5df1c1-19c7-4524-be4c-a304ffa22e89%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mitch Besser

unread,
Nov 17, 2016, 12:43:21 PM11/17/16
to android-ndk
I appears to work if I use Windows to run an emulator. It doesn't work on Linux with an physical phone. I'm confident this is a bug, but I don't know how to report it. 

Dan Albert

unread,
Nov 17, 2016, 12:46:30 PM11/17/16
to android-ndk

On Thu, Nov 17, 2016 at 7:20 AM, Mitch Besser <bess...@gmail.com> wrote:
I appears to work if I use Windows to run an emulator. It doesn't work on Linux with an physical phone. I'm confident this is a bug, but I don't know how to report it. 

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
Reply all
Reply to author
Forward
0 new messages