From: Daniel Jacobowitz <drow@false.org>
To: Denis PILAT <denis.pilat@st.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: gdbserver with reversed arguments goes into an infinite loop
Date: Wed, 13 Dec 2006 13:37:00 -0000 [thread overview]
Message-ID: <20061213133737.GA2633@nevyn.them.org> (raw)
In-Reply-To: <457FCEB6.4060008@st.com>
On Wed, Dec 13, 2006 at 10:58:14AM +0100, Denis PILAT wrote:
> I've found that if you revert the argument of gdbserver, means writing
> the program's name before the COMM argument, it goes into an infinite
> loop, and as the CTRL+C does not work, you have to kill the process from
> an other shell.
>
> In gdbserver/server.c, the loop in question does the remote_open on the
> wrong passed argument (argv[1]) which unfortunately is the binary file
> you'd expect to open so remote_open does not exit on error.
>
> I think either we could check that we pass correct argument before using
> start_inferior(), this is executing before the loop. The bellow patch is
> in that sense.
>
> Or we find a way to exit the loop by adding a test in it. May be by
> adding something in remote_open to let it fail.
I doubt it's in an infinite loop. It's probably sleeping, "waiting"
for a connection. We ought to allow C-c when no debugger is
connected yet. It'd be nice if remote_open wouldn't open ordinary
files, too.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-12-13 13:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-13 9:58 Denis PILAT
2006-12-13 13:37 ` Daniel Jacobowitz [this message]
2006-12-13 15:46 ` Denis PILAT
2006-12-30 15:45 ` Daniel Jacobowitz
2007-01-03 9:08 ` Denis PILAT
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=20061213133737.GA2633@nevyn.them.org \
--to=drow@false.org \
--cc=denis.pilat@st.com \
--cc=gdb-patches@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