Can. Run gdb like this:
gdb program-image-with-debug-symbols
and to run command line gdb
attach pid
where pid is the number for the process you want to connect to.
Well, of course, for this to work correctly, program-image-with-debug-symbols should be different from the running program only by the presence of debug information.
gdb /tmp/telemetry
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http: gnu.org licenses gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-buildroot-linux-gnueabi".
For bug reporting instructions, please see:
<http: www.gnu.org software gdb bugs>...
Reading symbols from /tmp/telemetry...done.
(gdb) attach 6986
Attaching to program: /tmp/telemetry, process 6986
Reading symbols from /lib/ld-linux-armhf.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux-armhf.so.3
0x403eb276 in ?? ()
(gdb) bt
#0 0x403eb276 in ?? ()
#1 0x4045a488 in ?? ()
#2 0x4045a488 in ?? ()
gdb /tmp/telemetry
b InfoListener::saveValue
Breakpoint 1 at 0x241e8: file InfoListener.cpp line 949.
(gdb) c
Continuing.</http:></http:>
After starting sootvetstvuyushie see the log from the function, but the program does not stop at the prescribed breakpoint.
If directly under gdb to run a binary with debugging symbols and to put the same stopping point, then everything works correctly. If you connect to the process running a binary with debug symbols too, everything works correctly.