2002-01-04 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Sat, 5 Jan 2002 02:40:47 +0000 (02:40 +0000)
committerMichael Snyder <msnyder@vmware.com>
Sat, 5 Jan 2002 02:40:47 +0000 (02:40 +0000)
* gdb.base/maint.exp: Add tests for maint info sections options.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/maint.exp

index 70c655e786100caa95336bdbaea8780853e9e8e6..27c8a05435e225668ac6824e05c87bd3d8f3b127 100644 (file)
@@ -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.
index 145f71d3278e61754c7f0e239dbe9348f2e81a83..f4d25772fa43df1b1f4da8eb5176eff3c0059cf7 100644 (file)
@@ -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 $"\
This page took 0.02925 seconds and 4 git commands to generate.