Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <Michael.Snyder@palmsource.com>
To: gdb@sourceware.org
Subject: gdbserver hangs on open port
Date: Fri, 02 Mar 2007 20:23:00 -0000	[thread overview]
Message-ID: <1172866492.9783.23.camel@localhost.localdomain> (raw)

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
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "--host=i386-pc-linux-gnu
--target=i386-linux".
(gdb) tar rem :2345
Remote debugging using :2345
Remote communication error: Connection reset by peer.
(gdb)

[original shell]
Remote debugging from host 127.0.0.1

Child exited with status 127
GDBserver exiting


                 reply	other threads:[~2007-03-02 20:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172866492.9783.23.camel@localhost.localdomain \
    --to=michael.snyder@palmsource.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox