History log of /ndk/sources/android/libthread_db/gdb-6.6/libthread_db.c
Revision Date Author Comments
a4313913b8c8bbac0446dd5ea268825409002f78 16-Jan-2014 Andrew Hsieh <andrewhsieh@google.com> Fix X86/MIPS gdbserver's event_getmsg_helper

Cherry-pick from bionic
8e551a6319e45dd5c8d03864f3330b45cf8551b7
726800e8f42f25a1bf7a36b1603ded29266e8ac6

Change-Id: Iaaffa81d9177ed0735153fc34b6e98e9f257822e
130dccff35e45547b0e8656ca21f61161c82bb07 14-Jun-2013 Ben Cheng <bccheng@google.com> Minor cleanup for libthread_db messages.

Change-Id: If8d004a90da8beb329f8b80c3b782b54be36d05a
e1ffa3fd89266e13c887a8d25f6f7eb4abfa0ec2 25-Nov-2010 David 'Digit' Turner <digit@google.com> Proper thread support for gdbserver.

WARNING: DEEP MAGIC AHEAD!

This patch allows the gdbserver binary that we build for the
NDK to properly support threads on Android 2.3 and higher.

For previous platforms, the binary will still be limited to
to only set breakpoints on the main thread (just like with
previous NDK releases).

The root cause of the problem is a platform bug that was only
fixed in Android 2.3, so there is little we can do in the NDK
to fix it (apart from hoping the fix is back-ported properly).

Now the hairy details:

- The patch provides sources for libthread_db.a which will
get recompiled explicitely by build-gdbserver.sh.

Note that libthread_db has no real stable ABI/API so we
provide GDB version-specific implementations here
(see sources/android/libthread_db/gdb-<version>)

- Both libthread_db.c versions have been modified to probe
the system at runtime and detect if the platform bug is in
effect.

If it is, the library acts as if there are no threads in the
process. The reason for this behaviour (i.e. instead of
patching the gdbserver sources) is explained in comments
inside libthread_db.c.

+ Local patches to make signal handling and libthread_db support work
properly with gdbserver 6.6.

Change-Id: Idf3d71422d337f4384f51ca45cafe7f71fd8559d