Rename two maint commands

Message ID 20250105222811.4108573-1-tom@tromey.com
State New
Headers
Series Rename two maint commands |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed

Commit Message

Tom Tromey Jan. 5, 2025, 10:28 p.m. UTC
  This renames two maint commands, removing a hyphen from
"check-symtabs" and "check-psymtabs"; that is, moving them under the
existing "maint check" prefix.

Regression tested on x86-64 Fedora 40.
---
 gdb/NEWS                                 |  8 ++++++++
 gdb/doc/gdb.texinfo                      |  8 ++++----
 gdb/psymtab.c                            |  4 ++--
 gdb/symmisc.c                            |  6 +++---
 gdb/testsuite/gdb.ada/maint_with_ada.exp |  6 +++---
 gdb/testsuite/gdb.base/check-psymtab.exp |  2 +-
 gdb/testsuite/gdb.base/maint.exp         | 10 +++++-----
 7 files changed, 26 insertions(+), 18 deletions(-)
  

Comments

Tom de Vries Jan. 6, 2025, 8:07 a.m. UTC | #1
On 1/5/25 23:28, Tom Tromey wrote:
> This renames two maint commands, removing a hyphen from
> "check-symtabs" and "check-psymtabs"; that is, moving them under the
> existing "maint check" prefix.
> 

Hi Tom,

I think usually we'd go for add alias and deprecate instead of rename, 
but I suppose these commands are so rarely used that there's no need for 
that.

LGTM.

Reviewed-By: Tom de Vries <tdevries@suse.de>

Thanks,
- Tom

> Regression tested on x86-64 Fedora 40.
> ---
>   gdb/NEWS                                 |  8 ++++++++
>   gdb/doc/gdb.texinfo                      |  8 ++++----
>   gdb/psymtab.c                            |  4 ++--
>   gdb/symmisc.c                            |  6 +++---
>   gdb/testsuite/gdb.ada/maint_with_ada.exp |  6 +++---
>   gdb/testsuite/gdb.base/check-psymtab.exp |  2 +-
>   gdb/testsuite/gdb.base/maint.exp         | 10 +++++-----
>   7 files changed, 26 insertions(+), 18 deletions(-)
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index 941b29e072d..1b218c40a23 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,6 +3,14 @@
>   
>   *** Changes since GDB 16
>   
> +* New commands
> +
> +maintenance check psymtabs
> +  Renamed from maintenance check-psymtabs
> +
> +maintenance check symtabs
> +  Renamed from maintenance check-symtabs
> +
>   *** Changes in GDB 16
>   
>   * Support for Nios II targets has been removed as this architecture
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index c77ac7f30c2..3dff886bcf3 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -41574,13 +41574,13 @@ only if non-stop mode is active (@pxref{Non-Stop Mode}) and the target
>   architecture supports displaced stepping.
>   @end table
>   
> -@kindex maint check-psymtabs
> -@item maint check-psymtabs
> +@kindex maint check psymtabs
> +@item maint check psymtabs
>   Check the consistency of currently expanded psymtabs versus symtabs.
>   Use this to check, for example, whether a symbol is in one but not the other.
>   
> -@kindex maint check-symtabs
> -@item maint check-symtabs
> +@kindex maint check symtabs
> +@item maint check symtabs
>   Check the consistency of currently expanded symtabs.
>   
>   @kindex maint expand-symtabs
> diff --git a/gdb/psymtab.c b/gdb/psymtab.c
> index 309590d5d26..e92125dae67 100644
> --- a/gdb/psymtab.c
> +++ b/gdb/psymtab.c
> @@ -1572,8 +1572,8 @@ This does not include information about individual partial symbols,\n\
>   just the symbol table structures themselves."),
>   	   &maintenanceinfolist);
>   
> -  add_cmd ("check-psymtabs", class_maintenance, maintenance_check_psymtabs,
> +  add_cmd ("psymtabs", class_maintenance, maintenance_check_psymtabs,
>   	   _("\
>   Check consistency of currently expanded psymtabs versus symtabs."),
> -	   &maintenancelist);
> +	   &maintenancechecklist);
>   }
> diff --git a/gdb/symmisc.c b/gdb/symmisc.c
> index 616b1ce82d7..3f06cb11a34 100644
> --- a/gdb/symmisc.c
> +++ b/gdb/symmisc.c
> @@ -838,7 +838,7 @@ maintenance_info_symtabs (const char *regexp, int from_tty)
>      GDB assumes they are always non-NULL.
>   
>      Note: This does not check for psymtab vs symtab consistency.
> -   Use "maint check-psymtabs" for that.  */
> +   Use "maint check psymtabs" for that.  */
>   
>   static void
>   maintenance_check_symtabs (const char *ignore, int from_tty)
> @@ -1093,10 +1093,10 @@ With an argument REGEXP, list just the line tables for the symbol\n\
>   tables with matching names."),
>   	   &maintenanceinfolist);
>   
> -  add_cmd ("check-symtabs", class_maintenance, maintenance_check_symtabs,
> +  add_cmd ("symtabs", class_maintenance, maintenance_check_symtabs,
>   	   _("\
>   Check consistency of currently expanded symtabs."),
> -	   &maintenancelist);
> +	   &maintenancechecklist);
>   
>     add_cmd ("expand-symtabs", class_maintenance, maintenance_expand_symtabs,
>   	   _("Expand symbol tables.\n\
> diff --git a/gdb/testsuite/gdb.ada/maint_with_ada.exp b/gdb/testsuite/gdb.ada/maint_with_ada.exp
> index 89c8c01c94a..063213d3337 100644
> --- a/gdb/testsuite/gdb.ada/maint_with_ada.exp
> +++ b/gdb/testsuite/gdb.ada/maint_with_ada.exp
> @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" }
>   clean_restart ${testfile}
>   
>   # Insert a breakpoint in each compilation unit, to force their psymtab's
> -# expansion to a full symtab.  This will allow the check-psymtabs command
> +# expansion to a full symtab.  This will allow the check psymtabs command
>   # to perform a more extensive check regarding those units which are in
>   # Ada.
>   
> @@ -34,6 +34,6 @@ gdb_breakpoint "adainit"
>   gdb_breakpoint "Var_Arr_Typedef"
>   gdb_breakpoint "Do_Nothing"
>   
> -gdb_test_no_output "maintenance check-psymtabs"
> +gdb_test_no_output "maintenance check psymtabs"
>   
> -gdb_test_no_output "maintenance check-symtabs"
> +gdb_test_no_output "maintenance check symtabs"
> diff --git a/gdb/testsuite/gdb.base/check-psymtab.exp b/gdb/testsuite/gdb.base/check-psymtab.exp
> index 6ae211cdfe3..43e232c3746 100644
> --- a/gdb/testsuite/gdb.base/check-psymtab.exp
> +++ b/gdb/testsuite/gdb.base/check-psymtab.exp
> @@ -23,4 +23,4 @@ gdb_test_no_output "maint expand-symtabs"
>   
>   # Check that we don't get:
>   #   Static symbol `foo' only found in check-psymtab.c psymtab
> -gdb_test_no_output "maint check-psymtab"
> +gdb_test_no_output "maint check psymtab"
> diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
> index 2c58ffa36c5..9745076a714 100644
> --- a/gdb/testsuite/gdb.base/maint.exp
> +++ b/gdb/testsuite/gdb.base/maint.exp
> @@ -20,8 +20,8 @@
>   # source file used is break.c
>   
>   
> -#maintenance check-psymtabs -- Check consistency of psymtabs vs symtabs
> -#maintenance check-symtabs -- Check consistency of symtabs
> +#maintenance check psymtabs -- Check consistency of psymtabs vs symtabs
> +#maintenance check symtabs -- Check consistency of symtabs
>   #maintenance expand-symtabs -- Expand symtabs matching a file regexp
>   #maintenance set -- Set GDB internal variables used by the GDB maintainer
>   #maintenance show -- Show GDB internal variables used by the GDB maintainer
> @@ -156,8 +156,8 @@ set have_psyms [expr ! ( $have_gdb_index || $readnow_p )]
>   # issues.
>   
>   set seen_command false
> -gdb_test_multiple "maint check-psymtabs" "" {
> -    -re "^maint check-psymtabs\r\n" {
> +gdb_test_multiple "maint check psymtabs" "" {
> +    -re "^maint check psymtabs\r\n" {
>   	set seen_command true
>   	exp_continue
>       }
> @@ -174,7 +174,7 @@ gdb_test_multiple "maint check-psymtabs" "" {
>   # This command does not produce any output unless there is some problem
>   # with the symtabs, so that branch will really never be covered in the
>   # tests here!!
> -gdb_test_no_output "maint check-symtabs"
> +gdb_test_no_output "maint check symtabs"
>   
>   # Test per-command stats.
>   gdb_test_no_output "maint set per-command on"
  
Andrew Burgess Jan. 6, 2025, 10:34 a.m. UTC | #2
Tom de Vries <tdevries@suse.de> writes:

> On 1/5/25 23:28, Tom Tromey wrote:
>> This renames two maint commands, removing a hyphen from
>> "check-symtabs" and "check-psymtabs"; that is, moving them under the
>> existing "maint check" prefix.
>> 
>
> Hi Tom,
>
> I think usually we'd go for add alias and deprecate instead of rename, 
> but I suppose these commands are so rarely used that there's no need for 
> that.

I thought anything under 'maint' was not considered a user command, and
so was OK to change.

I'm in favour of this command reorganisation.

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew



>
> LGTM.
>
> Reviewed-By: Tom de Vries <tdevries@suse.de>
>
> Thanks,
> - Tom
>
>> Regression tested on x86-64 Fedora 40.
>> ---
>>   gdb/NEWS                                 |  8 ++++++++
>>   gdb/doc/gdb.texinfo                      |  8 ++++----
>>   gdb/psymtab.c                            |  4 ++--
>>   gdb/symmisc.c                            |  6 +++---
>>   gdb/testsuite/gdb.ada/maint_with_ada.exp |  6 +++---
>>   gdb/testsuite/gdb.base/check-psymtab.exp |  2 +-
>>   gdb/testsuite/gdb.base/maint.exp         | 10 +++++-----
>>   7 files changed, 26 insertions(+), 18 deletions(-)
>> 
>> diff --git a/gdb/NEWS b/gdb/NEWS
>> index 941b29e072d..1b218c40a23 100644
>> --- a/gdb/NEWS
>> +++ b/gdb/NEWS
>> @@ -3,6 +3,14 @@
>>   
>>   *** Changes since GDB 16
>>   
>> +* New commands
>> +
>> +maintenance check psymtabs
>> +  Renamed from maintenance check-psymtabs
>> +
>> +maintenance check symtabs
>> +  Renamed from maintenance check-symtabs
>> +
>>   *** Changes in GDB 16
>>   
>>   * Support for Nios II targets has been removed as this architecture
>> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
>> index c77ac7f30c2..3dff886bcf3 100644
>> --- a/gdb/doc/gdb.texinfo
>> +++ b/gdb/doc/gdb.texinfo
>> @@ -41574,13 +41574,13 @@ only if non-stop mode is active (@pxref{Non-Stop Mode}) and the target
>>   architecture supports displaced stepping.
>>   @end table
>>   
>> -@kindex maint check-psymtabs
>> -@item maint check-psymtabs
>> +@kindex maint check psymtabs
>> +@item maint check psymtabs
>>   Check the consistency of currently expanded psymtabs versus symtabs.
>>   Use this to check, for example, whether a symbol is in one but not the other.
>>   
>> -@kindex maint check-symtabs
>> -@item maint check-symtabs
>> +@kindex maint check symtabs
>> +@item maint check symtabs
>>   Check the consistency of currently expanded symtabs.
>>   
>>   @kindex maint expand-symtabs
>> diff --git a/gdb/psymtab.c b/gdb/psymtab.c
>> index 309590d5d26..e92125dae67 100644
>> --- a/gdb/psymtab.c
>> +++ b/gdb/psymtab.c
>> @@ -1572,8 +1572,8 @@ This does not include information about individual partial symbols,\n\
>>   just the symbol table structures themselves."),
>>   	   &maintenanceinfolist);
>>   
>> -  add_cmd ("check-psymtabs", class_maintenance, maintenance_check_psymtabs,
>> +  add_cmd ("psymtabs", class_maintenance, maintenance_check_psymtabs,
>>   	   _("\
>>   Check consistency of currently expanded psymtabs versus symtabs."),
>> -	   &maintenancelist);
>> +	   &maintenancechecklist);
>>   }
>> diff --git a/gdb/symmisc.c b/gdb/symmisc.c
>> index 616b1ce82d7..3f06cb11a34 100644
>> --- a/gdb/symmisc.c
>> +++ b/gdb/symmisc.c
>> @@ -838,7 +838,7 @@ maintenance_info_symtabs (const char *regexp, int from_tty)
>>      GDB assumes they are always non-NULL.
>>   
>>      Note: This does not check for psymtab vs symtab consistency.
>> -   Use "maint check-psymtabs" for that.  */
>> +   Use "maint check psymtabs" for that.  */
>>   
>>   static void
>>   maintenance_check_symtabs (const char *ignore, int from_tty)
>> @@ -1093,10 +1093,10 @@ With an argument REGEXP, list just the line tables for the symbol\n\
>>   tables with matching names."),
>>   	   &maintenanceinfolist);
>>   
>> -  add_cmd ("check-symtabs", class_maintenance, maintenance_check_symtabs,
>> +  add_cmd ("symtabs", class_maintenance, maintenance_check_symtabs,
>>   	   _("\
>>   Check consistency of currently expanded symtabs."),
>> -	   &maintenancelist);
>> +	   &maintenancechecklist);
>>   
>>     add_cmd ("expand-symtabs", class_maintenance, maintenance_expand_symtabs,
>>   	   _("Expand symbol tables.\n\
>> diff --git a/gdb/testsuite/gdb.ada/maint_with_ada.exp b/gdb/testsuite/gdb.ada/maint_with_ada.exp
>> index 89c8c01c94a..063213d3337 100644
>> --- a/gdb/testsuite/gdb.ada/maint_with_ada.exp
>> +++ b/gdb/testsuite/gdb.ada/maint_with_ada.exp
>> @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" }
>>   clean_restart ${testfile}
>>   
>>   # Insert a breakpoint in each compilation unit, to force their psymtab's
>> -# expansion to a full symtab.  This will allow the check-psymtabs command
>> +# expansion to a full symtab.  This will allow the check psymtabs command
>>   # to perform a more extensive check regarding those units which are in
>>   # Ada.
>>   
>> @@ -34,6 +34,6 @@ gdb_breakpoint "adainit"
>>   gdb_breakpoint "Var_Arr_Typedef"
>>   gdb_breakpoint "Do_Nothing"
>>   
>> -gdb_test_no_output "maintenance check-psymtabs"
>> +gdb_test_no_output "maintenance check psymtabs"
>>   
>> -gdb_test_no_output "maintenance check-symtabs"
>> +gdb_test_no_output "maintenance check symtabs"
>> diff --git a/gdb/testsuite/gdb.base/check-psymtab.exp b/gdb/testsuite/gdb.base/check-psymtab.exp
>> index 6ae211cdfe3..43e232c3746 100644
>> --- a/gdb/testsuite/gdb.base/check-psymtab.exp
>> +++ b/gdb/testsuite/gdb.base/check-psymtab.exp
>> @@ -23,4 +23,4 @@ gdb_test_no_output "maint expand-symtabs"
>>   
>>   # Check that we don't get:
>>   #   Static symbol `foo' only found in check-psymtab.c psymtab
>> -gdb_test_no_output "maint check-psymtab"
>> +gdb_test_no_output "maint check psymtab"
>> diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
>> index 2c58ffa36c5..9745076a714 100644
>> --- a/gdb/testsuite/gdb.base/maint.exp
>> +++ b/gdb/testsuite/gdb.base/maint.exp
>> @@ -20,8 +20,8 @@
>>   # source file used is break.c
>>   
>>   
>> -#maintenance check-psymtabs -- Check consistency of psymtabs vs symtabs
>> -#maintenance check-symtabs -- Check consistency of symtabs
>> +#maintenance check psymtabs -- Check consistency of psymtabs vs symtabs
>> +#maintenance check symtabs -- Check consistency of symtabs
>>   #maintenance expand-symtabs -- Expand symtabs matching a file regexp
>>   #maintenance set -- Set GDB internal variables used by the GDB maintainer
>>   #maintenance show -- Show GDB internal variables used by the GDB maintainer
>> @@ -156,8 +156,8 @@ set have_psyms [expr ! ( $have_gdb_index || $readnow_p )]
>>   # issues.
>>   
>>   set seen_command false
>> -gdb_test_multiple "maint check-psymtabs" "" {
>> -    -re "^maint check-psymtabs\r\n" {
>> +gdb_test_multiple "maint check psymtabs" "" {
>> +    -re "^maint check psymtabs\r\n" {
>>   	set seen_command true
>>   	exp_continue
>>       }
>> @@ -174,7 +174,7 @@ gdb_test_multiple "maint check-psymtabs" "" {
>>   # This command does not produce any output unless there is some problem
>>   # with the symtabs, so that branch will really never be covered in the
>>   # tests here!!
>> -gdb_test_no_output "maint check-symtabs"
>> +gdb_test_no_output "maint check symtabs"
>>   
>>   # Test per-command stats.
>>   gdb_test_no_output "maint set per-command on"
  
Eli Zaretskii Jan. 6, 2025, 1:11 p.m. UTC | #3
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> Date: Sun,  5 Jan 2025 15:28:11 -0700
> 
> This renames two maint commands, removing a hyphen from
> "check-symtabs" and "check-psymtabs"; that is, moving them under the
> existing "maint check" prefix.
> 
> Regression tested on x86-64 Fedora 40.
> ---
>  gdb/NEWS                                 |  8 ++++++++
>  gdb/doc/gdb.texinfo                      |  8 ++++----
>  gdb/psymtab.c                            |  4 ++--
>  gdb/symmisc.c                            |  6 +++---
>  gdb/testsuite/gdb.ada/maint_with_ada.exp |  6 +++---
>  gdb/testsuite/gdb.base/check-psymtab.exp |  2 +-
>  gdb/testsuite/gdb.base/maint.exp         | 10 +++++-----
>  7 files changed, 26 insertions(+), 18 deletions(-)

Thanks, the documentation parts are approved.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
  

Patch

diff --git a/gdb/NEWS b/gdb/NEWS
index 941b29e072d..1b218c40a23 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,14 @@ 
 
 *** Changes since GDB 16
 
+* New commands
+
+maintenance check psymtabs
+  Renamed from maintenance check-psymtabs
+
+maintenance check symtabs
+  Renamed from maintenance check-symtabs
+
 *** Changes in GDB 16
 
 * Support for Nios II targets has been removed as this architecture
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c77ac7f30c2..3dff886bcf3 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -41574,13 +41574,13 @@  only if non-stop mode is active (@pxref{Non-Stop Mode}) and the target
 architecture supports displaced stepping.
 @end table
 
-@kindex maint check-psymtabs
-@item maint check-psymtabs
+@kindex maint check psymtabs
+@item maint check psymtabs
 Check the consistency of currently expanded psymtabs versus symtabs.
 Use this to check, for example, whether a symbol is in one but not the other.
 
-@kindex maint check-symtabs
-@item maint check-symtabs
+@kindex maint check symtabs
+@item maint check symtabs
 Check the consistency of currently expanded symtabs.
 
 @kindex maint expand-symtabs
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 309590d5d26..e92125dae67 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1572,8 +1572,8 @@  This does not include information about individual partial symbols,\n\
 just the symbol table structures themselves."),
 	   &maintenanceinfolist);
 
-  add_cmd ("check-psymtabs", class_maintenance, maintenance_check_psymtabs,
+  add_cmd ("psymtabs", class_maintenance, maintenance_check_psymtabs,
 	   _("\
 Check consistency of currently expanded psymtabs versus symtabs."),
-	   &maintenancelist);
+	   &maintenancechecklist);
 }
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 616b1ce82d7..3f06cb11a34 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -838,7 +838,7 @@  maintenance_info_symtabs (const char *regexp, int from_tty)
    GDB assumes they are always non-NULL.
 
    Note: This does not check for psymtab vs symtab consistency.
-   Use "maint check-psymtabs" for that.  */
+   Use "maint check psymtabs" for that.  */
 
 static void
 maintenance_check_symtabs (const char *ignore, int from_tty)
@@ -1093,10 +1093,10 @@  With an argument REGEXP, list just the line tables for the symbol\n\
 tables with matching names."),
 	   &maintenanceinfolist);
 
-  add_cmd ("check-symtabs", class_maintenance, maintenance_check_symtabs,
+  add_cmd ("symtabs", class_maintenance, maintenance_check_symtabs,
 	   _("\
 Check consistency of currently expanded symtabs."),
-	   &maintenancelist);
+	   &maintenancechecklist);
 
   add_cmd ("expand-symtabs", class_maintenance, maintenance_expand_symtabs,
 	   _("Expand symbol tables.\n\
diff --git a/gdb/testsuite/gdb.ada/maint_with_ada.exp b/gdb/testsuite/gdb.ada/maint_with_ada.exp
index 89c8c01c94a..063213d3337 100644
--- a/gdb/testsuite/gdb.ada/maint_with_ada.exp
+++ b/gdb/testsuite/gdb.ada/maint_with_ada.exp
@@ -26,7 +26,7 @@  if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" }
 clean_restart ${testfile}
 
 # Insert a breakpoint in each compilation unit, to force their psymtab's
-# expansion to a full symtab.  This will allow the check-psymtabs command
+# expansion to a full symtab.  This will allow the check psymtabs command
 # to perform a more extensive check regarding those units which are in
 # Ada.
 
@@ -34,6 +34,6 @@  gdb_breakpoint "adainit"
 gdb_breakpoint "Var_Arr_Typedef"
 gdb_breakpoint "Do_Nothing"
 
-gdb_test_no_output "maintenance check-psymtabs"
+gdb_test_no_output "maintenance check psymtabs"
 
-gdb_test_no_output "maintenance check-symtabs"
+gdb_test_no_output "maintenance check symtabs"
diff --git a/gdb/testsuite/gdb.base/check-psymtab.exp b/gdb/testsuite/gdb.base/check-psymtab.exp
index 6ae211cdfe3..43e232c3746 100644
--- a/gdb/testsuite/gdb.base/check-psymtab.exp
+++ b/gdb/testsuite/gdb.base/check-psymtab.exp
@@ -23,4 +23,4 @@  gdb_test_no_output "maint expand-symtabs"
 
 # Check that we don't get:
 #   Static symbol `foo' only found in check-psymtab.c psymtab
-gdb_test_no_output "maint check-psymtab"
+gdb_test_no_output "maint check psymtab"
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 2c58ffa36c5..9745076a714 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -20,8 +20,8 @@ 
 # source file used is break.c
 
 
-#maintenance check-psymtabs -- Check consistency of psymtabs vs symtabs
-#maintenance check-symtabs -- Check consistency of symtabs
+#maintenance check psymtabs -- Check consistency of psymtabs vs symtabs
+#maintenance check symtabs -- Check consistency of symtabs
 #maintenance expand-symtabs -- Expand symtabs matching a file regexp
 #maintenance set -- Set GDB internal variables used by the GDB maintainer
 #maintenance show -- Show GDB internal variables used by the GDB maintainer
@@ -156,8 +156,8 @@  set have_psyms [expr ! ( $have_gdb_index || $readnow_p )]
 # issues.
 
 set seen_command false
-gdb_test_multiple "maint check-psymtabs" "" {
-    -re "^maint check-psymtabs\r\n" {
+gdb_test_multiple "maint check psymtabs" "" {
+    -re "^maint check psymtabs\r\n" {
 	set seen_command true
 	exp_continue
     }
@@ -174,7 +174,7 @@  gdb_test_multiple "maint check-psymtabs" "" {
 # This command does not produce any output unless there is some problem
 # with the symtabs, so that branch will really never be covered in the
 # tests here!!
-gdb_test_no_output "maint check-symtabs"
+gdb_test_no_output "maint check symtabs"
 
 # Test per-command stats.
 gdb_test_no_output "maint set per-command on"