This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdbserver hangs on open port

A user pointed out this behavior to me, which certainly seems wrong.
If you tell gdbserver to open an executable which doesn't exist,
it goes ahead and opens a port anyway, waits for gdb to connect, and
only then terminates (without sending any useful info to gdb).

gdbserver$ ./gdbserver :2345 foo
Cannot exec foo: No such file or directory.
Process foo created; pid = 2186

Child exited with retcode = 7f
Listening on port 2345

[different shell]

./gdb -nx
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
This GDB was configured as "--host=i386-pc-linux-gnu
(gdb) tar rem :2345
Remote debugging using :2345
Remote communication error: Connection reset by peer.

[original shell]
Remote debugging from host

Child exited with status 127
GDBserver exiting

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]