This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3 0/3] GDBServer: introduce a dedicated output stream

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

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.

>From v2 to v3 there was only one small change:

 [PATCH 2/3] GDBServer: introduce --server-output command line option

	* gdb.texinfo: Use "@file" instead of "@var" when referring to
        an actual file.

>From v1 to v2 we had the following changes:

 [PATCH 1/4] GDBServer: introduce a stderr stream dedicated to the server

	* Renamed server_stderr to server_output.
        * lynx-low.c (lynx_debug): New substitution of stderr with
	* nto-low.c (nto_trace): Likewise.
	* tracepoint.c: Define server_output as an alias of stderr
	when compiling the IPA.
	(trace_vdebug): Replace stderr with server_output.
	* win32-low.c (OUTMSG): Changed definition of macro to also
	use server_output instead of stderr.
	(OUTMSG2): Likewise.
	* wincecompat.c (perror): Likewise.

 [PATCH 2/4] GDBServer: give more complete usage information

 	* Dropped. Pedro sent a new and better version to the
 	list. Obviously this version 2 now is 3 patches long.

 [PATCH 3/4] GDBServer: introduce --server-stderr command line option

 	* Renamed --server-stderr to --server-output.
   	* Better document the new features by making it clear that the
          server output can be redirected to another file. In other
          words, stderr is really an implementation detail.
	* Replaced mentions of PATH for FILE in the documentation and
	  in the command line option usage message.
	* Replace variables named path to out(put)_filename.
	* Renamed redirection utility function from set_server_stderr
	  to set_server_output to keep it in sync with command line

 [PATCH 4/4]: GDBServer: add 'monitor set server-stderr' command

	* Monitor command renamed to "monitor set server-output" from "monitor
	set server-stderr"

So, on v3 we still have:

 [PATCH v3 1/3] GDBServer: add 'monitor set server-output' command
 [PATCH v3 2/3] GDBServer: introduce --server-output command line option
 [PATCH v3 2/3] GDBServer: introduce a stream dedicated to the server

Thanks (yet again),
Cleber Rosa.

[1] -
[2] -
[3] -

 gdb/NEWS                                |   7 ++++
 gdb/doc/gdb.texinfo                     |  20 +++++++++++
 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                |  14 ++++----
 gdb/gdbserver/mem-break.c               |   4 +--
 gdb/gdbserver/notif.c                   |   4 +--
 gdb/gdbserver/nto-low.c                 |   4 +--
 gdb/gdbserver/remote-utils.c            |  54 +++++++++++++++---------------
 gdb/gdbserver/server.c                  | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++------------------------
 gdb/gdbserver/server.h                  |   4 +++
 gdb/gdbserver/spu-low.c                 |  14 ++++----
 gdb/gdbserver/target.c                  |   4 +--
 gdb/gdbserver/thread-db.c               |   4 +--
 gdb/gdbserver/tracepoint.c              |   4 ++-
 gdb/gdbserver/utils.c                   |  25 +++++++-------
 gdb/gdbserver/win32-low.c               |   6 ++--
 gdb/gdbserver/wincecompat.c             |   4 +--
 gdb/testsuite/gdb.server/server-mon.exp |   8 +++++
 22 files changed, 227 insertions(+), 137 deletions(-)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]