You can try:
# setprop debug.db.uid 32767
That will cause the crash catcher (debuggerd) to freeze the process,
allowing you to use gdb/gdbserver to debug it.
In the source tree, after you "source build/envsetup.sh" and use
"lunch" or "choosecombo", you will have a shell command called
"gdbclient". By default, it expects to debug "app_process" on port
5039 using the symbol-endowed shared libraries found in the "out"
directory (you may need "adb forward tcp:5039 tcp:5039" to set up the
TCP bridge). If you want to debug something else, you can issue the
gdb/gdbserver commands manually.
A prebuilt ARM "gdbserver" is included in the cupcake source tree.