I ran gdbserver, app stops. Then i ran debug in C::B and app continues. You can see it in last line of log. By the way, my source code is above project's dir, in ../../src relative to C::B project. And i still don't know what to do with "Program's arguments".
Building to ensure sources are up-to-date
Selecting target:
Android Debug
Adding source dir: /home/steelrat/projects/gipe/build/cbp/
Adding source dir: /home/steelrat/projects/gipe/
Adding source dir: /home/steelrat/projects/kangoo/build/cbp/
Adding source dir: /home/steelrat/projects/kangoo/
Adding file: libcroger_d.so
Changing directory to: /home/steelrat/projects/kangoo/bin
Set variable: LD_LIBRARY_PATH=.:/home/steelrat/projects/gipe/lib:/home/steelrat/projects/gipe/deps/minizip:/home/steelrat/development/android/ndk/sources/sfml/lib/armeabi:/home/steelrat/projects/gipe/lib/android/armeabi:/home/steelrat/development/android/ndk/sources/lua/lib/armeabi:/home/steelrat/development/android/ndk/sources/oolua/lib/armeabi:/home/steelrat/development/android/ndk/sources/box2d/lib/armeabi:/home/steelrat/development/android/ndk/sources/minizip/lib/armeabi:
[debug]Command-line: /home/steelrat/development/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb -nx -fullname -quiet -args libcroger_d.so
[debug]Working dir : /home/steelrat/projects/kangoo/bin
Starting debugger: /home/steelrat/development/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb -nx -fullname -quiet -args libcroger_d.so
done
[debug]libcroger_d.so: No such file or directory.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Connecting to remote target
Setting breakpoints
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.6
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
[debug]For bug reporting instructions, please see:
[debug]<http://source.android.com/source/report-bugs.html>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.6
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]No symbol table is loaded. Use the "file" command.
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]No symbol table is loaded. Use the "file" command.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/steelrat/projects/gipe/build/cbp/
[debug]Source directories searched: /home/steelrat/projects/gipe/build/cbp:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory /home/steelrat/projects/gipe/
[debug]Source directories searched: /home/steelrat/projects/gipe:/home/steelrat/projects/gipe/build/cbp:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory /home/steelrat/projects/kangoo/build/cbp/
[debug]Source directories searched: /home/steelrat/projects/kangoo/build/cbp:/home/steelrat/projects/gipe:/home/steelrat/projects/gipe/build/cbp:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory /home/steelrat/projects/kangoo/
[debug]Source directories searched: /home/steelrat/projects/kangoo:/home/steelrat/projects/kangoo/build/cbp:/home/steelrat/projects/gipe:/home/steelrat/projects/gipe/build/cbp:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> target extended-remote tcp:localhost:5039
[debug]Remote debugging using tcp:localhost:5039
[debug]0x400caa90 in ?? ()
[debug]>>>>>>cb_gdb:
Connected
[debug]> continue
In ?? () ()
[debug]> continue
[debug]Continuing.
My actions:
1. I'm starting shell script that kills app on Android and starts it.
a. Receiving PID of app's process.
b. Starting gdbserver on android, attaching it to received PID.
2. Starting remote debugging in C::B. To this moment app's is already in paused state. When i did first times - there was no pause. It appears when i tried to set breakpoints in C::B and then i remoed all breakpoints. :-\
As you see it take pretty much of time, when breakpoint in "main" is missed already.
I'm planning to set eternal loop in the very begining. Something like this:
int i = 0;
while (i == 0)
{
};
Then i'll write in "Additional GDB commands->After connection" set var i = 1.
set sysroot $(NDK)/platforms/$(#NDK.target)/arch-arm
or any other command.
Where $(NDK) - system's variable and $(#NDK.xxx) - C::B's global variable. It is perfectly works everywhere in project's properties except "Additional GDB commands".
Then, from GDB console, i'm calling "show sysroot" and it prints "$(NDK)/platforms/$(#NDK.target)/arch-arm" without any changes.