Skip to content
  • Tom de Vries's avatar
    [gdb/testsuite] Fix control-flow in gdb.reverse/insn-reverse.exp · a8d13675
    Tom de Vries authored
    In gdb.reverse/insn-reverse.exp, we have loop containing a call to
    gdb_test_multiple, which itself contains a break:
    ...
      for {} {$count < 500} {incr count} {
        ...
        gdb_test_multiple "x/i \$pc" "" {
          ...
          break
        }
    ...
    
    On SLE-11 with:
    ...
    $ runtest --version
    Expect version is       5.44.1.11
    Tcl version is          8.5
    Framework version is    1.4.4
    ...
    the break doesn't seem to have the effect of breaking out of the loop.
    
    The break does have the effect of terminating evaluation of the expect clause,
    which means we don't set insn_array, after which we run into:
    ...
    ERROR: tcl error sourcing src/gdb/testsuite/gdb.reverse/insn-reverse.exp.
    ERROR: can't read "insn_array(5)": no such element in array
    ...
    
    gdb/testsuite/ChangeLog:
    
    2020-12-04  Tom de Vries  <tdevries@suse.de>
    
    	* gdb.reverse/insn-reverse.exp: Don't break inside gdb_test_multiple
    	clause.
    a8d13675
To find the state of this project's repository at the time of any of these versions, check out the tags.