Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9094953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:28:36+00:00 2026-06-16T23:28:36+00:00

As a followup to this (I got gdbserver starting properly): Android NDK debugging: armeabi-v7a

  • 0

As a followup to this (I got gdbserver starting properly): Android NDK debugging: armeabi-v7a not working

NDK 8c, Eclipse & Cygwin, NativeActivity.

I set a breakpoint in the while loop here:

void android_main( android_app* state )
{
    int stop = 0;
    int x = 5;
    while( stop == 0 )
    {
        x++;
    }

… but gdb crashes when connecting! It does “stuff” for about 10 seconds, then crashes. There is some output.

Here’s the gdbserver output:

Android NDK installation path: /cygdrive/e/uppercut/sdks/android-ndk
Using default adb command: /cygdrive/e/uppercut/sdks/android-sdk/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.31
Using ADB flags:
Using auto-detected project path: .
Found package name: com.example.radgame
ABIs targetted by application: armeabi-v7a
Device API Level: 15
Device CPU ABIs: armeabi-v7a armeabi
Compatible device ABI: armeabi-v7a
Using gdb setup init: ./libs/armeabi-v7a/gdb.setup
Using toolchain prefix: /cygdrive/e/uppercut/sdks/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-
Using app out directory: ./obj/local/armeabi-v7a
Found debuggable flag: true
Found device gdbserver: /data/data/com.example.radgame/lib/gdbserver
Found data directory: '/data/data/com.example.radgame'
Found running PID: 3218
Launched gdbserver succesfully.
Setup network redirection
## COMMAND: adb_cmd shell run-as com.example.radgame lib/gdbserver +debug-socket --attach 3218
## COMMAND: adb_cmd forward tcp:5039 localfilesystem:/data/data/com.example.radgame/debug-socket
Attached; pid = 3218
Listening on Unix socket debug-socket
## COMMAND: adb_cmd pull /system/bin/app_process obj/local/armeabi-v7a/app_process
3204 KB/s (9848 bytes in 0.003s)
Pulled app_process from device/emulator.
## COMMAND: adb_cmd pull /system/bin/linker obj/local/armeabi-v7a/linker
7732 KB/s (39592 bytes in 0.005s)
Pulled linker from device/emulator.
## COMMAND: adb_cmd pull /system/lib/libc.so obj/local/armeabi-v7a/libc.so
6994 KB/s (286536 bytes in 0.040s)
Pulled libc.so from device/emulator.
<waits while gdb connects...>
Remote debugging from host 0.0.0.0
libthread_db:td_ta_new: Probing system for platform bug.
<lots of repetitive lines...>
libthread_db:td_ta_new: Victory: We can debug theads!
readchar: Got EOF
Remote side has terminated connection.  GDBserver will reopen the connection.
Listening on Unix socket debug-socket

The last several lines are its response to gdb connecting and crashing.

Here’s the gdb output:

Reading symbols from E:\uppercut\prototype\build\code\androidp4\radgame\obj\local\armeabi-v7a\app_process...done.

WARNING: no debugging symbols found in E:\uppercut\prototype\build\code\androidp4\radgame\obj\local\armeabi-v7a\app_process.
Either the binary was compiled without debugging information
or the debugging information was removed (e.g., with strip or strip -g).
Debugger capabilities will be very limited.
For further information: http://wiki/Main/GdbFaq#No_debugging_symbols_found

89-gdb-set confirm off
(gdb)
89^done
(gdb)
90-gdb-set width 0
90^done
(gdb)
91-gdb-set height 0
91^done
(gdb)
92-interpreter-exec console echo
92^done
(gdb)
93-gdb-show prompt
93^done,value="(gdb) "
(gdb)
94-gdb-set target-async 0
94^done
(gdb)
95-gdb-set auto-solib-add on
95^done
(gdb)
96-gdb-set stop-on-solib-events 0
96^done
(gdb)
97-gdb-set stop-on-solib-events 1
97^done
(gdb)
98-target-select remote localhost:5039
=thread-group-started,id="i1",pid="42000"
=thread-created,id="1",group-id="i1"
&"warning: while parsing target library list (at line 2): No segment defined for com.example.radgame\n"
warning: while parsing target library list (at line 2): No segment defined for com.example.radgame
=library-loaded,id="/system/bin/linker",target-name="/system/bin/linker",host-name="E:\\uppercut\\prototype\\build\\code\\androidp4\\radgame/./obj/local/armeabi-v7a/linker",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libc.so",target-name="libc.so",host-name="E:\\uppercut\\prototype\\build\\code\\androidp4\\radgame/./obj/local/armeabi-v7a/libc.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstdc++.so",target-name="libstdc++.so",host-name="libstdc++.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libm.so",target-name="libm.so",host-name="libm.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="liblog.so",target-name="liblog.so",host-name="liblog.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libcutils.so",target-name="libcutils.so",host-name="libcutils.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libz.so",target-name="libz.so",host-name="libz.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libtime_genoff.so",target-name="libtime_genoff.so",host-name="libtime_genoff.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libutils.so",target-name="libutils.so",host-name="libutils.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libbinder.so",target-name="libbinder.so",host-name="libbinder.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libexpat.so",target-name="libexpat.so",host-name="libexpat.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libcrypto.so",target-name="libcrypto.so",host-name="libcrypto.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libgabi++.so",target-name="libgabi++.so",host-name="libgabi++.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libicuuc.so",target-name="libicuuc.so",host-name="libicuuc.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libicui18n.so",target-name="libicui18n.so",host-name="libicui18n.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libssl.so",target-name="libssl.so",host-name="libssl.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstlport.so",target-name="libstlport.so",host-name="libstlport.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libnativehelper.so",target-name="libnativehelper.so",host-name="libnativehelper.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libnetutils.so",target-name="libnetutils.so",host-name="libnetutils.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libGLESv2_dbg.so",target-name="libGLESv2_dbg.so",host-name="libGLESv2_dbg.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libEGL.so",target-name="libEGL.so",host-name="libEGL.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libwpa_client.so",target-name="libwpa_client.so",host-name="libwpa_client.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libhardware_legacy.so",target-name="libhardware_legacy.so",host-name="libhardware_legacy.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libpixelflinger.so",target-name="libpixelflinger.so",host-name="libpixelflinger.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libhardware.so",target-name="libhardware.so",host-name="libhardware.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libemoji.so",target-name="libemoji.so",host-name="libemoji.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libjpeg.so",target-name="libjpeg.so",host-name="libjpeg.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libsecnativefeature.so",target-name="libsecnativefeature.so",host-name="libsecnativefeature.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libharfbuzz.so",target-name="libharfbuzz.so",host-name="libharfbuzz.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libquramimagecodec.so",target-name="libquramimagecodec.so",host-name="libquramimagecodec.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libskia.so",target-name="libskia.so",host-name="libskia.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libui.so",target-name="libui.so",host-name="libui.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libGLESv2.so",target-name="libGLESv2.so",host-name="libGLESv2.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libmemalloc.so",target-name="libmemalloc.so",host-name="libmemalloc.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libQcomUI.so",target-name="libQcomUI.so",host-name="libQcomUI.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libremotedesktop_client.so",target-name="libremotedesktop_client.so",host-name="libremotedesktop_client.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libgui.so",target-name="libgui.so",host-name="libgui.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libcamera_client.so",target-name="libcamera_client.so",host-name="libcamera_client.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libsqlite.so",target-name="libsqlite.so",host-name="libsqlite.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libqc-opt.so",target-name="libqc-opt.so",host-name="libqc-opt.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libdvm.so",target-name="libdvm.so",host-name="libdvm.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libGLESv1_CM.so",target-name="libGLESv1_CM.so",host-name="libGLESv1_CM.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libETC1.so",target-name="libETC1.so",host-name="libETC1.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libsisodrm.so",target-name="libsisodrm.so",host-name="libsisodrm.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libsonivox.so",target-name="libsonivox.so",host-name="libsonivox.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstagefright_foundation.so",target-name="libstagefright_foundation.so",host-name="libstagefright_foundation.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libmedia.so",target-name="libmedia.so",host-name="libmedia.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libQmageDecoder.so",target-name="libQmageDecoder.so",host-name="libQmageDecoder.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libnfc_ndef.so",target-name="libnfc_ndef.so",host-name="libnfc_ndef.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libusbhost.so",target-name="libusbhost.so",host-name="libusbhost.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libhwui.so",target-name="libhwui.so",host-name="libhwui.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libtilerenderer.so",target-name="libtilerenderer.so",host-name="libtilerenderer.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libbluedroid.so",target-name="libbluedroid.so",host-name="libbluedroid.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libdbus.so",target-name="libdbus.so",host-name="libdbus.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libandroid_runtime.so",target-name="libandroid_runtime.so",host-name="libandroid_runtime.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libvorbisidec.so",target-name="libvorbisidec.so",host-name="libvorbisidec.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstagefright_yuv.so",target-name="libstagefright_yuv.so",host-name="libstagefright_yuv.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libdrmframework.so",target-name="libdrmframework.so",host-name="libdrmframework.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libpowermanager.so",target-name="libpowermanager.so",host-name="libpowermanager.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libdiag.so",target-name="libdiag.so",host-name="libdiag.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libaudcal.so",target-name="libaudcal.so",host-name="libaudcal.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libacdbloader.so",target-name="libacdbloader.so",host-name="libacdbloader.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libalsa-intf.so",target-name="libalsa-intf.so",host-name="libalsa-intf.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libchromium_net.so",target-name="libchromium_net.so",host-name="libchromium_net.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstagefright_amrnb_common.so",target-name="libstagefright_amrnb_common.so",host-name="libstagefright_amrnb_common.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstagefright_enc_common.so",target-name="libstagefright_enc_common.so",host-name="libstagefright_enc_common.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstagefright_avc_common.so",target-name="libstagefright_avc_common.so",host-name="libstagefright_avc_common.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libsavscmn.so",target-name="libsavscmn.so",host-name="libsavscmn.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libsavsff.so",target-name="libsavsff.so",host-name="libsavsff.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libsurfaceflinger_client.so",target-name="libsurfaceflinger_client.so",host-name="libsurfaceflinger_client.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libtvoutinterface.so",target-name="libtvoutinterface.so",host-name="libtvoutinterface.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libtvoutservice.so",target-name="libtvoutservice.so",host-name="libtvoutservice.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libmm-abl-oem.so",target-name="libmm-abl-oem.so",host-name="libmm-abl-oem.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libmm-abl.so",target-name="libmm-abl.so",host-name="libmm-abl.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libstagefright.so",target-name="libstagefright.so",host-name="libstagefright.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libmtp.so",target-name="libmtp.so",host-name="libmtp.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libexif.so",target-name="libexif.so",host-name="libexif.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libmedia_jni.so",target-name="libmedia_jni.so",host-name="libmedia_jni.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libbcc.so",target-name="libbcc.so",host-name="libbcc.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libbcinfo.so",target-name="libbcinfo.so",host-name="libbcinfo.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libRS.so",target-name="libRS.so",host-name="libRS.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="librs_jni.so",target-name="librs_jni.so",host-name="librs_jni.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libandroid.so",target-name="libandroid.so",host-name="libandroid.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libv8.so",target-name="libv8.so",host-name="libv8.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libwebcore.so",target-name="libwebcore.so",host-name="libwebcore.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="libradgame.so",target-name="libradgame.so",host-name="E:\\uppercut\\prototype\\build\\code\\androidp4\\radgame/./obj/local/armeabi-v7a/libradgame.so",symbols-loaded="0",thread-group="i1"
&"warning: Could not load shared library symbols for 83 libraries, e.g. libstdc++.so.\nUse the \"info sharedlibrary\" command to see the complete listing.\nDo you need \"set solib-search-path\" or \"set sysroot\"?"
&"\n"
warning: Could not load shared library symbols for 83 libraries, e.g. libstdc++.so.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
&"warning: Breakpoint address adjusted from 0xb00056f5 to 0xb00056f4.\n"
warning: Breakpoint address adjusted from 0xb00056f5 to 0xb00056f4.
*stopped,frame={addr="0x4004d738",func="__futex_syscall3",args=[],from="E:\\uppercut\\prototype\\build\\code\\androidp4\\radgame/./obj/local/armeabi-v7a/libc.so"},thread-id="1",stopped-threads="all",core="0"
98^connected
(gdb)
99 info proc
&"info proc\n"
&"Undefined info command: \"proc\".  Try \"help info\".\n"
99^error,msg="Undefined info command: \"proc\".  Try \"help info\"."
(gdb)
100-environment-cd E:\\uppercut\\prototype\\build\\code\\androidp4\\radgame
100^done
(gdb)
101 info program
&"info program\n"
~"Debugging a target over a serial line.\n"
~"Program stopped at 0x4004d738.\n"
~"It stopped with signal SIGTRAP, Trace/breakpoint trap.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
101^done
(gdb)
102 info threads
&"info threads\n"
=thread-created,id="2",group-id="i1"
~"[New Thread 3219]\n"
=thread-created,id="3",group-id="i1"
~"[New Thread 3223]\n"
=thread-created,id="4",group-id="i1"
~"[New Thread 3224]\n"
=thread-created,id="5",group-id="i1"
~"[New Thread 3225]\n"
=thread-created,id="6",group-id="i1"
~"[New Thread 3226]\n"
=thread-created,id="7",group-id="i1"
~"[New Thread 3229]\n"
=thread-created,id="8",group-id="i1"
~"[New Thread 3230]\n"
=thread-created,id="9",group-id="i1"
~"[New Thread 3231]\n"
=thread-created,id="10",group-id="i1"
~"[New Thread 3233]\n"
=thread-created,id="11",group-id="i1"
~"[New Thread 3317]\n"
=thread-created,id="12",group-id="i1"
~"[New Thread 3320]\n"
~"  Id   Target Id         Frame \n"
~"  12   Thread 3320       0x4004c7fc in __ioctl () from E:\\uppercut\\prototype\\build\\code\\androidp4\\radgame/./obj/local/armeabi-v7a/libc.so\n"

I have had debugging working before with gdb, with a Java entry point and ‘armeabi’. After switching to C++ entry point (android_main) and ‘armeabi-v7a’, gdb crashes. I don’t know if either is related…

For what it’s worth, gdb also crashes any other time I connect (I remove the infinite while loop on startup). For example I’m having thread issues, so my app hangs for no apparent reason. If I connect when it’s hung, then gdb crashes in the same way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:28:37+00:00Added an answer on June 16, 2026 at 11:28 pm

    This was due to one or both of these GCC compiler flags, which I had added while switching to armeabi-v7a, and then forgot about.

    -gstabs+ -g

    The version of gdb that comes with the NDK must not like those flags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a followup of a previous question I had. I got the very
TLDR: Started with this question simplified it after got some of it working and
This is in part a followup to this question . I'm not sure the
[ Note: This is a followup to the question about running an Android service
This is a followup to my previous question , which got solved (thank you
Follow-up to this one . I got the reading/decoding working 1> {ok, F} =
Follow up to this question about GNU make : I've got a directory, flac
As a followup to this two questions and its answers Question 1 and Question
As a followup to this question , is it possible to write a single
NOTE: This is a followup to my question here. I have a program that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.