Re: [PATCH v2] Make only user-specified executable and symbol filenames sticky

Philippe Waroquiers
2015-06-07T12:13:21Z

On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
> Built and regtested on RHEL6.6 x86_64.
Finally, here are some tests with GDB gdbserver.
There is also something strange.

I launch 2 gdbserver:
gdbserver :1234 /bin/sleep 10000
and
gdbserver :1235 ./gdbserver_tests/sleepers 1000000 1000000 1000000 BSBSBSBS

Then :
(gdb) tar rem :1234
Remote debugging using :1234
Reading symbols from target:/bin/sleep...(no debugging symbols found)...done.
Reading symbols from target:/lib/ld-linux.so.2...(no debugging symbols found)...done.
0x001f2850 in _start () from target:/lib/ld-linux.so.2
(gdb) detach
Detaching from program: target:/bin/sleep, process 27572
Ending remote debugging.
(gdb) tar rem :1235
`target:/bin/sleep' has disappeared; keeping its symbols.
Remote debugging using :1235
Reading symbols from target:/home/philippe/valgrind/trunk_untouched/gdbserver_tests/sleepers...Can't read symbols from target:/home/philippe/valgrind/trunk_untouched/gdbserver_tests/sleepers: Invalid argument
(gdb)

So, as you can see, GDB cannot read the symbols for the second attach
(while it has properly discovered the exec-file).

Philippe