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]

Re: [RFA/c++testsuite] New test for constructor breakpoints


This patch is returned for rework.  I like the patch, but there is
a cascade problem:

  "set_bp_overloaded foo::foo" tests FAIL
  the breakpoints are not present
  continue_to_bp_constructor issues "continue" unconditionally
  the script loses synchronization with the program-under-test at this point
  all the tests after that FAIL

This happens on target=native host=i686-pc-linux-gnu with all the gcc v3
configurations:

  gcc 3.0.3, -gdwarf-2
  gcc 3.0.3, -gstabs+
  gcc 3.0.4-20020215, -gdwarf-2
  gcc 3.0.4-20020215, -gstabs+
  gcc gcc-3_0-branch, -gdwarf-2
  gcc gcc-3_0-branch, -gstabs+
  gcc HEAD, -gdwarf-2
  gcc HEAD, -gstabs+

Can you do something in continue_to_bp_constructor to keep synchronization?
Maybe:

  send_gdb "info b ${bpnumber}\n"
  gdb_expect {
    -re "Num.*\r\n${bpnumber}.*\r\n.*$gdb_prompt $" {
      send_gdb "continue\n"
      gdb_expect {
	...
      }
    }
    -re "No breakpoint or watchpoint number ${bpnumber}.*gdb_prompt $" {
      fail "continue to bp overloaded constructor : ${argtypes}"
    }
    -re ".*$gdb_prompt $" {
      fail "continue to bp overloaded constructor : ${argtypes}"
    }
    timeout {
      fail "continue to bp overloaded constructor : ${argtypes} (timeout)"
    }
  }

Or if you have a better idea, go for it.  I just want to fix the problem
where all the currently-working tests FAIL if the new tests FAIL.

Michael C

===

2002-02-14  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.c++/ovldbreak.exp: Test breakpoints on the constructors.


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