From: "Alex Bennée" <alex.bennee@linaro.org>
To: lukas.durfina@gmail.com
Cc: philmd@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] gdbstub: print message on startup as gdbserver
Date: Wed, 19 Jun 2019 18:01:53 +0100 [thread overview]
Message-ID: <87y31x8q66.fsf@zen.linaroharston> (raw)
In-Reply-To: <20190619145654.118068-1-ldurfina@tachyum.com>
lukas.durfina@gmail.com writes:
> From: Lukas Durfina <ldurfina@tachyum.com>
>
> It helps to test gdb running qemu instead of a gdbserver.
> It prints the same message as the gdbserver on startup.
>
> Signed-off-by: Lukas Durfina <ldurfina@tachyum.com>
> ---
> gdbstub.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index 8618e34311..9ad9929968 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -3109,6 +3109,7 @@ int gdbserver_start(int port)
> gdbserver_fd = gdbserver_open(port);
> if (gdbserver_fd < 0)
> return -1;
> + printf("Listening on port %d\n", port);
Not really - we don't arbitrarily output stuff on stdout. In fact the
best way to track what gdbserver is doing is to use the built-in trace
points:
$QEMU -d trace:gdb\* $QEMU_ARGS
For system emulation from the console you can run:
(qemu) info chardev
which will report the state of the gdb connection:
gdb: filename=disconnected:tcp:0.0.0.0:1234,server
> /* accept connections */
> if (!gdb_accept()) {
> close(gdbserver_fd);
--
Alex Bennée
prev parent reply other threads:[~2019-06-19 17:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 14:56 [Qemu-devel] [PATCH] gdbstub: print message on startup as gdbserver lukas.durfina
2019-06-19 17:01 ` Alex Bennée [this message]
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=87y31x8q66.fsf@zen.linaroharston \
--to=alex.bennee@linaro.org \
--cc=lukas.durfina@gmail.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).