aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2009-11-12 19:37:40 +0000
committerDaniel Jacobowitz <drow@false.org>2009-11-12 19:37:40 +0000
commitb67c692ff9a371eb1efe014cbadf5cd5a17acbfe (patch)
treed72b9ad89c9b45f602cabcefec47286c22bd1087
parentf0df251a26c53481e32d390da65acbdea79f3a82 (diff)
downloadgdb-b67c692ff9a371eb1efe014cbadf5cd5a17acbfe.zip
gdb-b67c692ff9a371eb1efe014cbadf5cd5a17acbfe.tar.gz
gdb-b67c692ff9a371eb1efe014cbadf5cd5a17acbfe.tar.bz2
testsuite/
* gdb.base/macscp.exp: Avoid the first FAIL if macro information is missing.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/macscp.exp37
2 files changed, 22 insertions, 20 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index fad62b5..5385b03 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
+ * gdb.base/macscp.exp: Avoid the first FAIL if macro information
+ is missing.
+
+2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
+
* gdb.base/break.c (need_malloc): New.
* gdb.base/constvars.c (main): Reference crass and crisp.
* gdb.base/gdb1821.c (main): Reference bar.
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
index 55c4d31..c63dde2 100644
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -204,30 +204,27 @@ proc list_and_check_macro {func macro expected} {
return [check_macro $macro $expected "after `list $func'"]
}
-
-if {[list_and_check_macro main WHERE {macscp1.c {before macscp1_3}}]} {
- global verbose
- set macro_support "unknown"
- send_gdb "info source\n"
- gdb_test_multiple "info source" "Test macro information" {
- -re "Includes preprocessor macro info\..*$gdb_prompt $" {
- set macro_support 1
- verbose "Source has macro information"
- }
- -re "Does not include preprocessor macro info\..*$gdb_prompt $" {
- set macro_support 0
- verbose "Source has no macro information"
- }
- default {
- warning "couldn't check macro support (no valid response)."
- }
+gdb_test "list main" ".*main.*" "list main for support check"
+set macro_support "unknown"
+gdb_test_multiple "info source" "Test macro information" {
+ -re "Includes preprocessor macro info\..*$gdb_prompt $" {
+ set macro_support 1
+ verbose "Source has macro information"
+ }
+ -re "Does not include preprocessor macro info\..*$gdb_prompt $" {
+ set macro_support 0
+ verbose "Source has no macro information"
}
- if {$macro_support == 0} {
- unsupported "Skipping test because debug information does not include macro information."
- return 0
+ default {
+ warning "couldn't check macro support (no valid response)."
}
}
+if {$macro_support == 0} {
+ unsupported "Skipping test because debug information does not include macro information."
+ return 0
+}
+list_and_check_macro main WHERE {macscp1.c {before macscp1_3}}
list_and_check_macro macscp2_2 WHERE {macscp2.h macscp1.c {before macscp2_2}}
list_and_check_macro macscp3_2 WHERE {macscp3.h macscp1.c {before macscp3_2}}