This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Use 'test' argument in gdb_core_cmd
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: Doug Evans <dje at google dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 09 Oct 2013 17:19:29 +0200
- Subject: [PATCH] Use 'test' argument in gdb_core_cmd
- Authentication-results: sourceware.org; auth=none
In the current version the gdb_core_cmd receives an argument "$test",
but doesn't use it. Instead, the test is always named "re-load
generated corefile". Since the callers of this procedure already pass
a suitable string, the patch uses this now, such that different
invocations of this procedure can be distinguished in the future.
testsuite/ChangeLog:
2013-10-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
* lib/gdb.exp (gdb_core_cmd): Replace fixed string "re-load
generated corefile" by argument "$test".
Index: gdb/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb.orig/gdb/testsuite/lib/gdb.exp
+++ gdb/gdb/testsuite/lib/gdb.exp
@@ -3201,32 +3201,32 @@ proc gdb_gcore_cmd {core test} {
proc gdb_core_cmd { core test } {
global gdb_prompt
- gdb_test_multiple "core $core" "re-load generated corefile" {
+ gdb_test_multiple "core $core" "$test" {
-re "\\\[Thread debugging using \[^ \r\n\]* enabled\\\]\r\n" {
exp_continue
}
-re " is not a core dump:.*\r\n$gdb_prompt $" {
- fail "re-load generated corefile (bad file format)"
+ fail "$test (bad file format)"
return -1
}
-re ": No such file or directory.*\r\n$gdb_prompt $" {
- fail "re-load generated corefile (file not found)"
+ fail "$test (file not found)"
return -1
}
-re "Couldn't find .* registers in core file.*\r\n$gdb_prompt $" {
- fail "re-load generated corefile (incomplete note section)"
+ fail "$test (incomplete note section)"
return 0
}
-re "Core was generated by .*\r\n$gdb_prompt $" {
- pass "re-load generated corefile"
+ pass "$test"
return 1
}
-re ".*$gdb_prompt $" {
- fail "re-load generated corefile"
+ fail "$test"
return -1
}
timeout {
- fail "re-load generated corefile (timeout)"
+ fail "$test (timeout)"
return -1
}
}