More specifically how can I debug the file android_view_Display.cpp ?
I have made some progress but still cannot get this to work.
This is what I have done so far:
1) run './emulator -shell'
2) start up Notepad application
3) do 'ps' in emulator shell to get PID of com.example.android.notepad
who's PID is 295
4) run './gdbserver 10.0.2.15:1234 --attach 295' in emulator shell
5) using host shell 'telnet localhost 1234' then type 'redir add tcp:
1234:1234' to redirect port
1234 from emulator to host.
At this point gdbserver is setup successfully and listening for
connection.
6) create an eclipse C project and import the source code from
filesystem frameworks/base/core/jni
7) Create new debug configuration for C/C++ local application with
these settings
* c/c++ application points to mydroid/out/target/product/
generic/symbols/system/lib/libandroid_runtime.so
* debugger is gdbserver with connection set to localhost and
port 1234
8) When I click on the debug icon in eclipse, it successfully switches
to debug perspective and I can see in the emulator shell gdbserver
reports 'remote debugging from host 10.0.2.2'
9) I can put breakpoints in android_view_display.cpp and then in the
emulator I go back to the main menu and click on notepad and I am
expecting it to break at android_view_Display_getHeight() but it does
break at all.
What am I doing wrong in this process and is there an easier way to
debug native C code?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---