public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFAv2 0/6] Implement | (pipe) command.
@ 2019-04-26 20:11 Philippe Waroquiers
  2019-04-26 20:11 ` [RFAv2 4/6] " Philippe Waroquiers
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Philippe Waroquiers @ 2019-04-26 20:11 UTC (permalink / raw)
  To: gdb-patches

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.


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

end of thread, other threads:[~2019-05-27 13:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-26 20:11 [RFAv2 0/6] Implement | (pipe) command Philippe Waroquiers
2019-04-26 20:11 ` [RFAv2 4/6] " 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
2019-04-26 20:11 ` [RFAv2 5/6] Test the | (pipe) command Philippe Waroquiers
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 2/6] Improve process exit status macros on MinGW Philippe Waroquiers
2019-04-26 20:11 ` [RFAv2 6/6] NEWS and documentation for | (pipe) command Philippe Waroquiers
2019-04-27  7:08   ` Eli Zaretskii

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).