[PATCH]: add gdb@sourceware.org to --help.

Simon Marchi simark@simark.ca
Wed Jun 10 23:28:45 GMT 2020


On 2020-06-09 8:51 a.m., Jonny Grant wrote:
> 
> 2020-06-09  Jonny Grant  <jg@jguk.org>
> 
> 	* main.c (print_gdb_help): add gdb@sourceware.org to --help.
> 
> 
> From 490e578cb9f285769256da3c6aab7ad9719b64f9 Mon Sep 17 00:00:00 2001
> From: Jonathan Grant <jg@jguk.org>
> Date: Tue, 9 Jun 2020 13:09:59 +0100
> Subject: [PATCH] add GDB mailing list to help
> 
> Signed-off-by: Jonathan Grant <jg@jguk.org>
> ---
>  gdb/main.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/main.c b/gdb/main.c
> index 59cb14161b..c38307b62c 100644
> --- a/gdb/main.c
> +++ b/gdb/main.c
> @@ -1393,6 +1393,10 @@ GDB manual (available as on-line info or a printed manual).\n\
>  "), stream);
>    if (REPORT_BUGS_TO[0] && stream == gdb_stdout)
>      fprintf_unfiltered (stream, _("\
> -Report bugs to \"%s\".\n\
> +Report bugs to %s.\n\
>  "), REPORT_BUGS_TO);
> +  if (stream == gdb_stdout)
> +    fprintf_unfiltered (stream, _("\
> +GDB mailing list <gdb@sourceware.org>.\n\
> + "));
>  }
> -- 
> 2.17.1
> 

Hi Jonny,

See the proposed patch below, let me know what you think.  It builds on top of yours
to also mention the IRC channel, while at it, and modify the formatting to make it
a bit more readable, IMO.


>From ea847e9eb8c8461fb9426660c12aa826f465c4cd Mon Sep 17 00:00:00 2001
From: Jonny Grant <jg@jguk.org>
Date: Tue, 9 Jun 2020 13:51:16 +0100
Subject: [PATCH] gdb: add mailing list and IRC information to --help

A few user-vibisble changes to the --help output:

 * Remove unnecessary quotes around bug url.
 * Mention the mailing list and IRC channel as places where users can
   ask GDB-related questions.
 * Add empty lines between items in the footer, to improve readability.
 * Remove unnecessary new line at the end of output.

2020-06-09  Jonny Grant  <jg@jguk.org>
2020-06-09  Simon Marchi  <simon.marchi@polymtl.ca>

	* main.c (captured_main_1): Don't print new line after help.
	(print_gdb_help): add mailing list and IRC channel information
	to --help.  Add new lines between items in the footer.  Remove
	quotes around bug url.

Signed-off-by: Jonathan Grant <jg@jguk.org>
Change-Id: Ibd0746a348d558fb35b5cd7e366f107742806565
---
 gdb/main.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gdb/main.c b/gdb/main.c
index 59cb14161be3..3649e4a22018 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -1006,7 +1006,6 @@ captured_main_1 (struct captured_main_args *context)
   if (print_help)
     {
       print_gdb_help (gdb_stdout);
-      fputs_unfiltered ("\n", gdb_stdout);
       exit (0);
     }

@@ -1392,7 +1391,11 @@ For more information, type \"help\" from within GDB, or consult the\n\
 GDB manual (available as on-line info or a printed manual).\n\
 "), stream);
   if (REPORT_BUGS_TO[0] && stream == gdb_stdout)
-    fprintf_unfiltered (stream, _("\
-Report bugs to \"%s\".\n\
+    fprintf_unfiltered (stream, _("\n\
+Report bugs to %s.\n\
 "), REPORT_BUGS_TO);
+  if (stream == gdb_stdout)
+    fprintf_unfiltered (stream, _("\n\
+You can ask GDB-related questions on the GDB users mailing list\n\
+(gdb@sourceware.org) or on GDB's IRC channel (#gdb on Freenode).\n"));
 }
-- 
2.27.0



More information about the Gdb-patches mailing list