This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and gdbserver failed to break inside threads


I can't figure out what is wrong and need some help.

I have a Linux-x86 target running Android 4.2.2.
One of the native core display driver failed to load - Segment fault.

1. On target:
 gdbserver localhost:10000 surfaceflinger
Process /system/bin/surfaceflinger created: pid = 1669
Listening on port: 10000

2. On host starting gdb inside eclipse:
GDB command file:
set solib-absolute-prefix .../out/target/product/x86/symbols
set solib-search-path .../out/target/product/x86/symbols/system/lib:/mnt/ssd/src/android-x86/out/target/product/x8........
file .../out/target/product/x86/system/bin/surfaceflinger
start debug session inside eclipse
ide stops at main

3. On target
Remote debugging from <host-ip>
gdb: Unable to get location for thread creation breakpoint: requested event is not supported gdb: Unable to get location for thread creation breakpoint: requested event is not supported gdb: Unable to get location for thread creation breakpoint: requested event is not supported

4. On Host
Run to to fist breakpoint.
Set breakpoint at thread main
Continue
No stop at thread breakpoint.

5. On target
thread getmsg err: no event message for getmsg
Cannot attach to process -326959103: No such process (3)
db: Could not attach to thread -326959103 (LWP -326959103)

Child termianted with signal = 5
Child terminated with signal = 0x5 (SIGTRAP)
GDBserver exiting


surfaceflinger make use of a shared libsurfaceflinger.so
info share
From        To          Syms Read   Shared Object Library
0xb7764750 0xb778c121 Yes .../out/target/product/x86/symbols/system/lib/libsurfaceflinger.so

Why can't I get breakpoints inside a thread and why can't I trap the segment fault.

Something gets wrong when gdbserver tries to get some thread breakpoints....
https://android.googlesource.com/toolchain/gdb/+/3dfac73ab64f7118595c59394c24d0bd3516d335%5E2/gdb-7.3.x/gdb/gdbserver/thread-db.c
Line 212 and 260

gdbserver --version -> 6.6
i686-linux-android-gdb --version -> 7.3.1-gg2
prebuild by Android

/Thanks



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]