From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: gdb-patches@sourceware.org
Subject: [RFAv2 0/6] Implement | (pipe) command.
Date: Fri, 26 Apr 2019 20:11:00 -0000 [thread overview]
Message-ID: <20190426201108.7489-1-philippe.waroquiers@skynet.be> (raw)
Implement | (pipe) command.
This patch series adds the pipe command, that allows to send the output
of a GDB command to a shell command.
This version handles the comments received.
As there is a new option -dX to the pipe_command, the doc and help
was changed to describe it.
* Comments from Eli :
- better definition of WIF* macros for MinGW.
- replace @ref by @xref in the doc.
* Comment from Abhijit Halder/Tom:
it not that unlikely to have | in a GDB command
=> an optional -dX option allows to specify an
alternate character to use X to replace the | as separator
between the GDB COMMAND and the SHELL_COMMAND.
* Comments from Tom:
* make previous_saved_command_line static. For this, saved_command_line
is now also static, and all repeat related functions/vars are now
in top.c
* various small changes (use std::swap, strchr, .empty (), ...).
* removed the scoped_restore_current_thread restore
* popen has been kept as libiberty pexecute still implies to use
the WIF* macros.
* Instead of using execute_command_to_string, use GDB redirection
mechanism. I did several trials for this, and at the end,
the only one working properly was very close to the code
of execute_command_to_string.
=> we now have a function execute_command_to_ui_file that is used
to implement the pipe command, and also used by
execute_command_to_string.
next reply other threads:[~2019-04-26 20:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 20:11 Philippe Waroquiers [this message]
2019-04-26 20:11 ` [RFAv2 1/6] Add previous_saved_command_line to allow a command to repeat a previous command Philippe Waroquiers
2019-04-26 20:11 ` [RFAv2 5/6] Test the | (pipe) command Philippe Waroquiers
2019-04-26 20:11 ` [RFAv2 6/6] NEWS and documentation for " Philippe Waroquiers
2019-04-27 7:08 ` Eli Zaretskii
2019-04-26 20:11 ` [RFAv2 2/6] Improve process exit status macros on MinGW Philippe Waroquiers
2019-04-26 20:11 ` [RFAv2 4/6] Implement | (pipe) command Philippe Waroquiers
2019-05-03 18:59 ` Pedro Alves
2019-05-04 6:24 ` Philippe Waroquiers
2019-05-27 13:12 ` Pedro Alves
2019-04-26 20:11 ` [RFAv2 3/6] Add function execute_command_to_ui_file Philippe Waroquiers
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=20190426201108.7489-1-philippe.waroquiers@skynet.be \
--to=philippe.waroquiers@skynet.be \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).