]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite/
authorNathan Sidwell <nathan@codesourcery.com>
Fri, 9 Jun 2006 20:43:17 +0000 (20:43 +0000)
committerNathan Sidwell <nathan@codesourcery.com>
Fri, 9 Jun 2006 20:43:17 +0000 (20:43 +0000)
* gdb.base/cursal.exp: Run to main before setting listing
size.
* gdb.base/dbx.exp: Run to main before testing.
* gdb.base/ending-run.exp: Add additional expected string.
* gdb.base/huge.c: Allow CRASH_GDB to be set from command
line.
* gdb.base/huge.exp: Loop over compilation to find a size that
is acceptable.
* gdb.base/remote.exp: Correct expected strings.
* gdb.dwarf2/mac-fileno.S: Avoid # comments.

ChangeLog.csl
gdb/testsuite/gdb.base/cursal.exp
gdb/testsuite/gdb.base/dbx.exp
gdb/testsuite/gdb.base/ending-run.exp
gdb/testsuite/gdb.base/huge.c
gdb/testsuite/gdb.base/huge.exp
gdb/testsuite/gdb.base/remote.exp
gdb/testsuite/gdb.dwarf2/mac-fileno.S

index bc867d44a904aa830a7e6966dcedf1a397dbfcfa..dfc9048f318e0a8324b63f6d3ebe134d2d09a556 100644 (file)
@@ -1,5 +1,17 @@
 2006-06-09  Nathan Sidwell  <nathan@codesourcery.com>
 
+       gdb/testsuite/
+       * gdb.base/cursal.exp: Run to main before setting listing
+       size.
+       * gdb.base/dbx.exp: Run to main before testing.
+       * gdb.base/ending-run.exp: Add additional expected string.
+       * gdb.base/huge.c: Allow CRASH_GDB to be set from command
+       line.
+       * gdb.base/huge.exp: Loop over compilation to find a size that
+       is acceptable.
+       * gdb.base/remote.exp: Correct expected strings.
+       * gdb.dwarf2/mac-fileno.S: Avoid # comments.
+
        gdb/
        * remote-file.io.c (remote_fileio_func_system): Treat zero length
        string as NULL.  Adjust for NULL pointer argument.
index c3ddc554349fb9d46320a90b228fde4aa1129ec1..d35c3ac79d73a2d70adef8f9cbec3b5c78462774 100644 (file)
@@ -35,9 +35,10 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
-
 gdb_test "set listsize 1" \
     ".*"
+gdb_test "break main" ".*Breakpoint.* at .*" "set breakpoint at main"
+gdb_run_cmd
 
 # initial sal should be first statement in main
 gdb_test "list" \
index 161333c8ea3c0999e4ee40f93d55b2924076d144..b77e58f18ad0b705fe3c18d40cf564d4194ea542 100644 (file)
@@ -262,6 +262,7 @@ proc gdb_file_cmd {arg} {
 #
 proc test_breakpoints { } {
     gdb_test "stop in main" "Breakpoint.*at.*: file.*average\.c, line 38\."
+    gdb_run_cmd
     gdb_test "status" "Num.*Type.*Disp.*Enb.*Address.*What\r\n1\[ \r\]+breakpoint\[ \r\]+keep y.*in main at.*average\.c:38.*"
     gdb_test "stop at 43" "Breakpoint.*at.*: file.*average\.c, line 43.*"
     gdb_test "stop in 43" "Usage: stop in <function . address>"
index 06b8cfa94793cce5d8fe7b2137502f07e874f712..9631a78690b84d1c69b55dff22a301d23434b77b 100644 (file)
@@ -235,6 +235,9 @@ gdb_expect {
     -re ".*in.*currently asm.*$gdb_prompt $" { 
         pass "step out of main (into assembler)"
     }
+    -re "start \\(\\).*$gdb_prompt $" {
+        pass "step out of main"
+    }
     -re ".*Program received signal SIGTRAP.*$gdb_prompt $" {
         pass "Cygmon stopped in ending trap."
     }
index 446bb1803712f71c44401eac3ce24dd30be12523..27ba04eb2cae0317011f5f91b1856d84fd672eef 100644 (file)
@@ -7,9 +7,9 @@
 /* A value that will produce a target data object large enough to
    crash GDB.  0x200000 is big enough on GNU/Linux, other systems may
    need a larger number.  */
-
+#ifndef CRASH_GDB
 #define CRASH_GDB 0x200000
-
+#endif
 static int a[CRASH_GDB], b[CRASH_GDB];
 
 main()
index 733ddeee7a34f73a02b6c2d74c41831c5a3a04ef..68354ec5dabddf2944db1b2bf1982bf0e817e30f 100644 (file)
@@ -36,7 +36,13 @@ if [target_info exists gdb,skip_huge_test] {
 set testfile "huge"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+
+for { set size [expr 2 * 1024 * 1024] } { $size > 10 } { set size [expr $size / 2] } {
+  if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+           executable [list debug "additional_flags=-DCRASH_GDB=$size"]] \
+      == "" } break
+}
+if { $size < 10 } {
      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
index b286e3a6539e5cfe508c7c6ac7e827f8b7f18510..05f7356b21d75dec8a215cd866c6231229f3beee 100644 (file)
@@ -47,7 +47,7 @@ if {$result != "" } then {
 #
 
 gdb_test "show download-write-size" \
-       "The write size used when downloading a program is 512." \
+       "The write size used when downloading a program is 16384." \
        "download limit default"
 
 gdb_test "set download-write-size" "Argument required.*"
@@ -65,14 +65,14 @@ gdb_test "set remote memory-write-packet-size" \
        "Argument required .integer, `fixed' or `limited'.\." \
        "set write-packet - NULL"
 
-gdb_test "set remote memory-write-packet-size 16" ""
+gdb_test "set remote memory-write-packet-size 20" ""
 gdb_test "show remote memory-write-packet-size" \
-       "The memory-write-packet-size is 16. Packets are limited to 16 bytes." \
+       "The memory-write-packet-size is 20. Packets are limited to 20 bytes." \
        "set write-packet - small"
 
 gdb_test "set remote memory-write-packet-size 1" ""
 gdb_test "show remote memory-write-packet-size" \
-       "The memory-write-packet-size is 1. Packets are limited to 16 bytes." \
+       "The memory-write-packet-size is 1. Packets are limited to 20 bytes." \
        "set write-packet - very-small"
 
 #
@@ -191,7 +191,7 @@ if {$sizeof_random_data > 16380 } then {
 gdb_test "set remote memory-read-packet-size 16" \
        ""
 gdb_test "show remote memory-read-packet-size" \
-       "The memory-read-packet-size is 16. Packets are limited to 16 bytes."
+       "The memory-read-packet-size is 16. Packets are limited to 20 bytes."
 gdb_test "x/17ub random_data" \
        "<random_data>:\[ \t\]+60\[ \t\]+74\[ \t\]+216\[ \t\]+38\[ \t\]+149\[ \t\]+49\[ \t\]+207\[ \t\]+44.*<random_data\\+8>:\[ \t\]+124\[ \t\]+38\[ \t\]+93\[ \t\]+125\[ \t\]+232\[ \t\]+67\[ \t\]+228\[ \t\]+56.*<random_data\\+16>:\[ \t\]+161"
 
index 1bbb582042cdaaefab71d027042e2c8533154d82..9be9de65818aa6e6f79c117524c1fc99a95d57ac 100644 (file)
@@ -206,10 +206,10 @@ func_cu1:
 
        .section        .debug_macinfo,"",@progbits
 .Ldebug_macinfo0:
-       .byte   0x3     # Start new file
-       .uleb128 0x0    # Included from line number 0
-       .uleb128 0x2    # Filename we just started (bug: number too large)
-       .byte   0x3     # Start new file
-       .uleb128 0x0    # Included from line number 0
-       .uleb128 0x0    # Filename we just started (bug: number too small)
-        .byte   0x0     # end of CU's macro information
+       .byte   0x3     /* Start new file */
+       .uleb128 0x0    /* Included from line number 0 */
+       .uleb128 0x2    /* Filename we just started (bug: number too large) */
+       .byte   0x3     /* Start new file */
+       .uleb128 0x0    /* Included from line number 0 */
+       .uleb128 0x0    /* Filename we just started (bug: number too small) */
+        .byte   0x0     /* end of CU's macro information */