This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] add tests for new options, maint info sections



New tests for the new options for the "maint info sections" command.

2002-01-04  Michael Snyder  <msnyder@redhat.com>

	* gdb.base/maint.exp: Add tests for maint info sections options.

Index: maint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/maint.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 maint.exp
*** maint.exp	2001/12/12 02:07:12	1.8
--- maint.exp	2002/01/05 02:39:15
*************** gdb_expect  {
*** 385,390 ****
--- 385,418 ----
          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 $"\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]