aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-01-05 02:40:47 +0000
committerMichael Snyder <msnyder@vmware.com>2002-01-05 02:40:47 +0000
commit8ddad156deb051cc5d76354ac78ae10e2663819b (patch)
tree9164be34fa7f314b46c1b67c64486790e8c0e33b
parent356374e8218b459940741c482cde960b33ac1343 (diff)
downloadgdb-8ddad156deb051cc5d76354ac78ae10e2663819b.zip
gdb-8ddad156deb051cc5d76354ac78ae10e2663819b.tar.gz
gdb-8ddad156deb051cc5d76354ac78ae10e2663819b.tar.bz2
2002-01-04 Michael Snyder <msnyder@redhat.com>
* gdb.base/maint.exp: Add tests for maint info sections options.
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/maint.exp28
2 files changed, 32 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 70c655e..27c8a05 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-01-04 Michael Snyder <msnyder@redhat.com>
+
+ * gdb.base/maint.exp: Add tests for maint info sections options.
+
Fri Dec 21 09:42:11 2001 Jeffrey A Law (law@redhat.com)
* gdb.base/default.exp: Remove bogus hppa*-hp-hpux* xfails.
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 145f71d..f4d2577 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -385,6 +385,34 @@ gdb_expect {
timeout { fail "(timeout) maint info sections" }
}
+# Test for new option: maint info sections <section name>
+# If you don't have a .text section, this will require tweaking.
+send_gdb "maint info sections .text\n"
+gdb_expect {
+ -re ".*bss.*$gdb_prompt $" { fail "maint info sections .text" }
+ -re ".*data.*$gdb_prompt $" { fail "maint info sections .text" }
+ -re ".* .text .*$gdb_prompt $" { pass "maint info sections .text" }
+ timeout { fail "(timeout) maint info sections .text" }
+}
+
+# Test for new option: CODE section flag
+# If your data section is tagged CODE, xfail this test.
+send_gdb "maint info sections CODE\n"
+gdb_expect {
+ -re ".* .data .*$gdb_prompt $" { fail "maint info sections CODE" }
+ -re ".* .text .*$gdb_prompt $" { pass "maint info sections CODE" }
+ timeout { fail "(timeout) maint info sections CODE" }
+}
+
+# Test for new option: DATA section flag
+# If your text section is tagged DATA, xfail this test.
+send_gdb "maint info sections DATA\n"
+gdb_expect {
+ -re ".* .text .*$gdb_prompt $" { fail "maint info sections DATA" }
+ -re ".* .data .*$gdb_prompt $" { pass "maint info sections DATA" }
+ timeout { fail "(timeout) maint info sections DATA" }
+}
+
send_gdb "maint info breakpoints\n"
gdb_expect {
-re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex in main at.*break.c:75\r\n\[ \t\]+breakpoint already hit 1 time\r\n.*$gdb_prompt $"\