Karim Yaghmour
2014-01-31 00:57:26 UTC
I'm running into these weird problems trying to debug .so files with
some AOSPs and I'm wondering if this is just pilot error. Let me explain.
Basically I'm trying to set a breakpoint into some of the system
services' JNI using gdb and step from there. This works just fine in
AOSP 4.4 but not 4.3, 4.2 or 4.1.
Putting 4.3 aside for a moment, it seems the toolchains used to build
4.2. and 4.1 will create .so ELF files that don't have a ".interp"
section pointing to "/system/bin/linker"; though that section is there
for ELF binaries. The .so ELF files in 4.4 and 4.3 do have those
sections. Still, I wasn't able to get it to work in 4.3 because I'd get
a SIGTRAP, but that's another story (apparently has something to do with
gdb thread support being broken.)
Is anybody else seeing similar issues? Am I barking up the wrong tree?
P.S.: If you don't know what this problem is about, just try attaching
to the system_server's PID using "gdb --attach localhost:2345 PID" and
then use the AOSP cross-debugger in prebuilts/.... to set a breakpoint
at some valid line number in say com_android_server_LightsService.cpp
and tell gdb to continue. If you can go through this without gdb
complaining about unresolvable addresses or stopping because of a
SIGTRAP, you're probably ok.
--
Karim Yaghmour
CEO - Opersys inc. / www.opersys.com
http://twitter.com/karimyaghmour
some AOSPs and I'm wondering if this is just pilot error. Let me explain.
Basically I'm trying to set a breakpoint into some of the system
services' JNI using gdb and step from there. This works just fine in
AOSP 4.4 but not 4.3, 4.2 or 4.1.
Putting 4.3 aside for a moment, it seems the toolchains used to build
4.2. and 4.1 will create .so ELF files that don't have a ".interp"
section pointing to "/system/bin/linker"; though that section is there
for ELF binaries. The .so ELF files in 4.4 and 4.3 do have those
sections. Still, I wasn't able to get it to work in 4.3 because I'd get
a SIGTRAP, but that's another story (apparently has something to do with
gdb thread support being broken.)
Is anybody else seeing similar issues? Am I barking up the wrong tree?
P.S.: If you don't know what this problem is about, just try attaching
to the system_server's PID using "gdb --attach localhost:2345 PID" and
then use the AOSP cross-debugger in prebuilts/.... to set a breakpoint
at some valid line number in say com_android_server_LightsService.cpp
and tell gdb to continue. If you can go through this without gdb
complaining about unresolvable addresses or stopping because of a
SIGTRAP, you're probably ok.
--
Karim Yaghmour
CEO - Opersys inc. / www.opersys.com
http://twitter.com/karimyaghmour
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platform+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to android-platform-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platform+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to android-platform-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/groups/opt_out.