* elfread.c (elf_symtab_read): Update.
[binutils-gdb.git] / gdb / testsuite / gdb.base / maint.exp
index 843391a2a5e972fef017bc1890f68e9c299ef2ce..2dc25f44b98888c7605ab1dedadb0cdb4480fd15 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008, 2009, 2010, 2011
-# Free Software Foundation, Inc.
+# Copyright 1998-2003, 2007-2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 
 
-if $tracelevel then {
-        strace $tracelevel
-        }
-
-global usestubs
-
-#
-# test running programs
-#
-
 set testfile "break"
 set srcfile ${testfile}.c
 set srcfile1 ${testfile}1.c
@@ -82,6 +71,21 @@ if  { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
+
+# The commands we test here produce many lines of output; disable "press
+# <return> to continue" prompts.
+gdb_test_no_output "set height 0"
+
+# Tests that require that no program is running
+
+gdb_file_cmd ${binfile}
+
+# Test for a regression where this command would internal-error if the
+# program wasn't running.
+gdb_test "maint print registers" "Name.*Nr.*Rel.*Offset.*Size.*Type.*"
+
+# Tests that can or should be done with a running program
+
 gdb_load ${binfile}
 
 if ![runto_main] then {
@@ -89,11 +93,6 @@ if ![runto_main] then {
 }
 
 
-# The commands we test here produce many lines of output; disable "press 
-# <return> to continue" prompts.
-gdb_test_no_output "set height 0"
-
-
 #
 # this command does not produce any output
 # unless there is some problem with the symtabs and psymtabs
@@ -151,7 +150,7 @@ if [istarget "*-*-cygwin*"] {
 
 send_gdb "maint print statistics\n"
 gdb_expect  {
-    -re "Statistics for\[^\n\r\]*break\[^\n\r\]*:\r\n  Number of \"minimal\" symbols read: $decimal\r\n  Number of \"partial\" symbols read: $decimal\r\n  Number of \"full\" symbols read: $decimal\r\n  Number of \"types\" defined: $decimal\r\n  Number of psym tables \\(not yet expanded\\): $decimal\r\n  Number of symbol tables: $decimal\r\n  Number of symbol tables with line tables: $decimal\r\n  Number of symbol tables with blockvectors: $decimal\r\n  Total memory used for objfile obstack: $decimal\r\n  Total memory used for psymbol cache: $decimal\r\n  Total memory used for macro cache: $decimal\r\n  Total memory used for file name cache: $decimal\r\n" {
+    -re "Statistics for\[^\n\r\]*break\[^\n\r\]*:\r\n  Number of \"minimal\" symbols read: $decimal\r\n  Number of \"partial\" symbols read: $decimal\r\n  Number of \"full\" symbols read: $decimal\r\n  Number of \"types\" defined: $decimal\r\n  Number of psym tables \\(not yet expanded\\): $decimal\r\n  Number of symbol tables: $decimal\r\n  Number of symbol tables with line tables: $decimal\r\n  Number of symbol tables with blockvectors: $decimal\r\n  Total memory used for objfile obstack: $decimal\r\n  Total memory used for BFD obstack: $decimal\r\n  Total memory used for psymbol cache: $decimal\r\n  Total memory used for macro cache: $decimal\r\n  Total memory used for file name cache: $decimal\r\n" {
        gdb_expect {
            -re "$gdb_prompt $" {
                pass "maint print statistics"
@@ -388,6 +387,11 @@ gdb_test_multiple "maint info sections" "maint info sections" {
        set data_section ER_RW
        pass "maint info sections"
     }
+    -re "Exec file:\r\n.*break($EXEEXT)?., file type.*neardata.*$gdb_prompt $" {
+       # c6x doesn't have .data section.  It has .neardata and .fardata section.
+       set data_section ".neardata"
+       pass "maint info sections"
+    }
     -re "Exec file:\r\n.*break($EXEEXT)?., file type.*$gdb_prompt $" {
        pass "maint info sections"
     }
@@ -420,9 +424,10 @@ gdb_test_multiple "maint info sections CODE" "maint info sections CODE" {
 # Test for new option: DATA section flag
 # If your text section is tagged DATA, xfail this test.
 #
-# The "maint info sections DATA" test is marked for XFAIL on Cygwin,
+# The "maint info sections DATA" test is marked for XFAIL on Windows,
 # because Windows has text sections marked DATA.
 setup_xfail "*-*-*cygwin*"
+setup_xfail "*-*-*mingw*"
 
 gdb_test_multiple "maint info sections DATA" "maint info sections DATA" {
     -re ".* $text_section .*$gdb_prompt $" { fail "maint info sections DATA" }