From: Cleber Rosa <crosa@redhat.com>
To: gdb-patches@sourceware.org
Cc: crosa@redhat.com, areis@redhat.com
Subject: [PATCH 0/4] GDBServer: introduce a dedicated stderr stream
Date: Sat, 21 Mar 2015 02:35:00 -0000 [thread overview]
Message-ID: <1426905265-8495-1-git-send-email-crosa@redhat.com> (raw)
This patch series add command line options and monitor commands that
will redirect all of the gdbserver's own output (always sent to stderr)
to a separate file. This feature makes it possible to distinguish between
the inferior process stderr and gdbserver's own stderr.
This happens to be needed for the Avocado[1] project GDB support[2][3].
One of Avocado's GDB features is that it lets users "transparently"
run binaries instrumented by GDB. A test that executes binaries
can give the user the opportunity to interact with the process running
within gdb(server). This uses a combination of gdb (with MI) and gdbserver.
So far so good.
But, since Avocado is a test framework, it lets tests PASS or FAIL
depending on executed commands' STDERR and STDOUT matching what the
test writer expects. Matching against STDOUT is already doable as
gdbserver doesn't write to stdout, but it does write to stderr, the
same stderr that the inferior process writes to.
I appreciate any comments/questions/reviews.
Thanks,
Cleber Rosa.
[1] - http://github.com/avocado-framework
[2] - http://avocado-framework.readthedocs.org/en/latest/DebuggingWithGDB.html
[3] - https://github.com/avocado-framework/avocado/blob/master/avocado/gdb.py
---
gdb/doc/gdb.texinfo | 13 +++++
gdb/gdbserver/ax.c | 3 +-
gdb/gdbserver/debug.c | 6 +--
gdb/gdbserver/event-loop.c | 2 +-
gdb/gdbserver/linux-aarch64-low.c | 28 +++++------
gdb/gdbserver/linux-low.c | 10 ++--
gdb/gdbserver/lynx-low.c | 8 +--
gdb/gdbserver/mem-break.c | 4 +-
gdb/gdbserver/notif.c | 4 +-
gdb/gdbserver/remote-utils.c | 54 ++++++++++-----------
gdb/gdbserver/server.c | 145 +++++++++++++++++++++++++++++++++++++------------------
gdb/gdbserver/server.h | 4 ++
gdb/gdbserver/spu-low.c | 14 +++---
gdb/gdbserver/target.c | 4 +-
gdb/gdbserver/thread-db.c | 4 +-
gdb/gdbserver/utils.c | 25 +++++-----
gdb/testsuite/gdb.server/server-mon.exp | 8 +++
next reply other threads:[~2015-03-21 2:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-21 2:35 Cleber Rosa [this message]
2015-03-21 2:35 ` [PATCH 4/4] GDBServer: add 'monitor set server-stderr' command Cleber Rosa
2015-03-21 8:29 ` Eli Zaretskii
2015-03-23 20:09 ` Cleber Rosa
2015-03-21 2:35 ` [PATCH 1/4] GDBServer: introduce a stderr stream dedicated to the server Cleber Rosa
2015-03-21 2:35 ` [PATCH 3/4] GDBServer: introduce --server-stderr command line option Cleber Rosa
2015-03-21 8:26 ` Eli Zaretskii
2015-03-23 18:51 ` Cleber Rosa
2015-03-23 19:12 ` Eli Zaretskii
2015-03-23 20:35 ` Cleber Rosa
2015-03-23 20:43 ` Eli Zaretskii
2015-03-21 2:35 ` [PATCH 2/4] GDBServer: give more complete usage information Cleber Rosa
2015-03-21 17:05 ` Pedro Alves
2015-03-24 14:15 ` Cleber Rosa
2015-03-31 14:44 ` Cleber Rosa
2015-04-01 10:10 ` Pedro Alves
2015-03-21 15:05 ` [PATCH 0/4] GDBServer: introduce a dedicated stderr stream Pedro Alves
2015-03-24 17:07 ` Cleber Rosa
2015-04-01 11:17 ` Pedro Alves
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=1426905265-8495-1-git-send-email-crosa@redhat.com \
--to=crosa@redhat.com \
--cc=areis@redhat.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