public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] GDBServer: introduce a dedicated stderr stream
@ 2015-03-21  2:35 Cleber Rosa
  2015-03-21  2:35 ` [PATCH 4/4] GDBServer: add 'monitor set server-stderr' command Cleber Rosa
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Cleber Rosa @ 2015-03-21  2:35 UTC (permalink / raw)
  To: gdb-patches; +Cc: crosa, areis

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 +++

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-04-01 11:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21  2:35 [PATCH 0/4] GDBServer: introduce a dedicated stderr stream Cleber Rosa
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 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  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 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

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 read-only IMAP folder(s) and NNTP newsgroup(s).