This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Test command 'maint dump-me' on win32 host.
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 19 Jun 2013 13:25:56 +0800
- Subject: [PATCH] Test command 'maint dump-me' on win32 host.
Hi,
I noticed a fail when testing native mingw32 gdb,
(gdb) maint dump-me
Undefined maintenance command: "dump-me". Try "help maintenance".
(gdb) FAIL: gdb.base/maint.exp: maint dump-me
in maint.c:_initialize_maint_cmds, we can see that command 'maint
dump-me' is only registered on non-win32 host,
#ifndef _WIN32
add_cmd ("dump-me", class_maintenance, maintenance_dump_me, _("\
Get fatal error; make debugger dump its core.\n\
GDB sets its handling of SIGQUIT back to SIG_DFL and then sends\n\
itself a SIGQUIT signal."),
&maintenancelist);
#endif
so it makes no sense to test it on mingw host. This patch adds a new
pattern to match this case. With this patch applied, the test log
becomes:
maint dump-me
Undefined maintenance command: "dump-me". Try "help maintenance".
(gdb) UNSUPPORTED: gdb.base/maint.exp: maint dump-me
Is it OK?
gdb/testsuite:
2013-06-19 Yao Qi <yao@codesourcery.com>
* gdb.base/maint.exp: Make the test to command 'maint dump-me'
unsupported if it is not registered.
---
gdb/testsuite/gdb.base/maint.exp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 260818e..afc321f 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -506,6 +506,10 @@ gdb_test_multiple "maint dump-me" "maint dump-me" {
-re "Should GDB dump core.*\\(y or n\\) $" {
gdb_test "n" ".*" "maint dump-me"
}
+ -re "Undefined maintenance command: .*$gdb_prompt $" {
+ # Command 'maint dump-me' is registered on non-win32 host.
+ unsupported "maint dump-me"
+ }
}
send_gdb "maint internal-error\n"
--
1.7.7.6