I tried to configure the gdbserver by following the below steps :
Let me elaborate on my setup. I have the device connected onto my
windows machine and a remote linux server for building the code. I
started the gdb server as follows in the adb prompt :
adb> gdbserver localhost:1234 --attach <PID>
Then I did a port forward as follows :
d:\> adb forward tcp:1234 tcp:1234
Running netstat in my windows machine showed the following ::
TCP 127.0.0.1:1234 0.0.0.0:0 LISTENING
1840
Then in Putty, I setting the tunneling as follows :
R1234 -> <IP address of Windows PC>:1234
Putty connects to a Linux build server.
Netstat in Putty shows the following ::
Proto Recv-Q Send-Q Local Address Foreign Address
State Timer
tcp 0 0 127.0.0.1:1234 0.0.0.0:*
LISTEN off (0.00/0/0)
When I open Putty with this tunneling setting and run "arm-eabi-gdb"
and GDB opens properly with (gdb) prompt:
Here , I run the following command:
target remote :1234
and get the following output :
Remote debugging using :1234
putpkt: write failed: Broken pipe.
Please correct me if I am doing any mistake.
Regards,
Syed
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
The error does not come now. But, now, while executing the target
command,
it fails to load the symbol libraries. It displays the below :
(gdb) target remote :1234
Remote debugging using :1234
Error while mapping shared library sections:
libc.so: No such file or directory.
Error while mapping shared library sections:
libstdc++.so: No such file or directory.
Error while mapping shared library sections:
libm.so: No such file or directory.
Error while mapping shared library sections:
liblog.so: No such file or directory.
Error while mapping shared library sections:
libcutils.so: No such file or directory.
Error while mapping shared library sections:
libz.so: No such file or directory.
Error while mapping shared library sections:
libutils.so: No such file or directory.
...
Error while mapping shared library sections:
libopencore_player.so: No such file or directory.
Error while mapping shared library sections:
libopencore_author.so: No such file or directory.
Error while mapping shared library sections:
libmediaplayerservice.so: No such file or directory.
Reading symbols from /android/out/target/product/generic/symbols/
system/bin/linker...done.
Loaded symbols for /android/out/target/product/generic/symbols/system/
bin/linker
Symbol file not found for libc.so
Symbol file not found for libstdc++.so
Symbol file not found for libm.so
Symbol file not found for liblog.so
Symbol file not found for libcutils.so
Symbol file not found for libz.so
Symbol file not found for libutils.so
...
Symbol file not found for libopencore_player.so
Symbol file not found for libopencore_author.so
Symbol file not found for libmediaplayerservice.so
0x6fe0c53c in ?? ()
In the ADB shell where the GDB server is running, i see the
following ::
gdb: Unable to get location for thread creation breakpoint: requested
event is not supported
I am configuring the mediaserver process for debugging. Even though
the respective so files are present in symbols/system/lib folder, GDB
is not able to link.
Regards.
Syed
> > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
I resolved this issue too.. Instead of running the arm-eabi-gdb
directly, I ran the gdbclient command (defined in build\envsetup.sh)
as follows :
gdbclient mediaserver :1234 mediaserver
After that, the symbols were able to load properly! I just need to
start putting breakpoints and start debugging.
Thanks for your support! Have a great day..
Regards,
Syed
Thanks,
Chris
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
On Jan 14, 7:10 am, Umang Saini <poloo...@gmail.com> wrote:
> Hi Chris,
>
> build\evsetup.sh is part of the Android's full source tree. You'll may get
> it fromhttp://source.android.com/download
>
> --
> Umang
> > > > > > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
> > <android-ndk%2Bunsubscribe@googlegr oups.com>
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-ndk?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to andro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
Debugging using GDB uses the symbol information the the shared
library.
If you want to debug only your native code, you need not compile the
entire android source code.
There are so many tutorials in net describing how to debug native
android apps. You can follow the same.
Regards,
Syed Ibrahim
> > > > > > > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > > <android-ndk%2Bunsubscribe@googlegr oups.com>
> > > > > > > .
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/android-ndk?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "android-ndk" group.
> > > To post to this group, send email to andro...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>