From: Ulrich Weigand Date: Thu, 2 Aug 2012 15:59:59 +0000 (+0000) Subject: * gdb.base/annota1.exp: Accept no frames-invalid notification X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11315ae03c2dce34c8c3b840eaa1109b0011c99f;p=binutils-gdb.git * gdb.base/annota1.exp: Accept no frames-invalid notification when starting up the program. * gdb.python/py-value.exp (test_value_numeric_ops): Pointers may show a symbolic value as well. * gdb.server/server-exec-info.exp: Skip test when skipping gdbserver test and/or when skipping shared library tests. * gdb.threads/linux-dp.exp: Unset "seen" when done with it to avoid name conflicts with other tests. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0d86bb1ec12..e587e28931a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2012-08-02 Ulrich Weigand + + * gdb.base/annota1.exp: Accept no frames-invalid notification + when starting up the program. + * gdb.python/py-value.exp (test_value_numeric_ops): Pointers may + show a symbolic value as well. + * gdb.server/server-exec-info.exp: Skip test when skipping + gdbserver test and/or when skipping shared library tests. + * gdb.threads/linux-dp.exp: Unset "seen" when done with it to + avoid name conflicts with other tests. + 2012-08-02 Ulrich Weigand * gdb.dwarf2/dw2-icc-opaque.S: Remove .align directives. diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 1cbc933f561..98b4650a1af 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -133,7 +133,7 @@ gdb_test_multiple "info break" "breakpoint info" { #exp_internal 1 set binexp [string_to_regexp $binfile] gdb_test_multiple "run" "run until main breakpoint" { - -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\nwarning: Skipping \[^\r\n\]+ .gdb_index section in \[^\r\n\]+\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\.\)?\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)+\r\n\r\n\032\032starting\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" { + -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\nwarning: Skipping \[^\r\n\]+ .gdb_index section in \[^\r\n\]+\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\.\)?\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" { pass "run until main breakpoint" } } diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index acfd89b7472..87b0734a27e 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -100,8 +100,8 @@ proc test_value_numeric_ops {} { gdb_test "print (void *) 5" ".*" "" gdb_test_no_output "python b = gdb.history (0)" "" - gdb_test "python print 'result = ' + str(a+5)" " = 0x7" "add pointer value with python integer" - gdb_test "python print 'result = ' + str(b-2)" " = 0x3" "subtract python integer from pointer value" + gdb_test "python print 'result = ' + str(a+5)" " = 0x7( <.*>)?" "add pointer value with python integer" + gdb_test "python print 'result = ' + str(b-2)" " = 0x3( <.*>)?" "subtract python integer from pointer value" gdb_test "python print 'result = ' + str(b-a)" " = 3" "subtract two pointer values" # Test some invalid operations. diff --git a/gdb/testsuite/gdb.server/server-exec-info.exp b/gdb/testsuite/gdb.server/server-exec-info.exp index 00775f1f8bf..6635805c991 100644 --- a/gdb/testsuite/gdb.server/server-exec-info.exp +++ b/gdb/testsuite/gdb.server/server-exec-info.exp @@ -15,6 +15,13 @@ load_lib gdbserver-support.exp +# We test for skip_shlib_tests in this test because without a main +# exec file we only have the exec target loaded if shared libraries +# are present. +if {[skip_gdbserver_tests] || [skip_shlib_tests]} { + return +} + standard_testfile server.c if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] { return -1 diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp index 38f78efb6da..ca65d10e67b 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -342,6 +342,7 @@ for {set i 1} {$i <= $nthreads} {incr i} { set any_interesting 1 } } +unset seen if {$any_interesting} { pass "found an interesting thread"