* gdb.cp/cpexprs.exp (test_breakpoint): Continue to test_function
instead of running to main. Do not test the main function. * gdb/testsuite/gdb.cp/cpexprs.cc (main): Rename to test_function. Add new main.
This commit is contained in:
parent
25b41d01ea
commit
640617ad17
|
@ -1,3 +1,10 @@
|
||||||
|
2010-08-30 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.cp/cpexprs.exp (test_breakpoint): Continue to test_function
|
||||||
|
instead of running to main. Do not test the main function.
|
||||||
|
* gdb/testsuite/gdb.cp/cpexprs.cc (main): Rename to test_function.
|
||||||
|
Add new main.
|
||||||
|
|
||||||
2010-08-26 Pedro Alves <pedro@codesourcery.com>
|
2010-08-26 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* gdb.mi/mi-nsmoribund.exp: Revert back to send_gdb/gdb_expect in
|
* gdb.mi/mi-nsmoribund.exp: Revert back to send_gdb/gdb_expect in
|
||||||
|
|
|
@ -309,8 +309,8 @@ class derived : public base1, public base2
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char* argv[]) // main
|
test_function (int argc, char* argv[]) // test_function
|
||||||
{ // main
|
{ // test_function
|
||||||
derived d;
|
derived d;
|
||||||
void (derived::*pfunc) (void) const = &derived::a_function;
|
void (derived::*pfunc) (void) const = &derived::a_function;
|
||||||
(d.*pfunc) ();
|
(d.*pfunc) ();
|
||||||
|
@ -427,5 +427,19 @@ main (int argc, char* argv[]) // main
|
||||||
char* str = a;
|
char* str = a;
|
||||||
fluff* flp = a;
|
fluff* flp = a;
|
||||||
fluff** flpp = a;
|
fluff** flpp = a;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char* argv[])
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* Call the test function repeatedly, enough times for all our tests
|
||||||
|
without running forever if something goes wrong. */
|
||||||
|
for (i = 0; i < 1000; i++)
|
||||||
|
test_function (argc, argv);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -24,9 +24,14 @@
|
||||||
proc test_breakpoint {func} {
|
proc test_breakpoint {func} {
|
||||||
global DEC
|
global DEC
|
||||||
|
|
||||||
# Restart every time
|
# Return to the top of the test function every time.
|
||||||
if {![runto_main]} {
|
delete_breakpoints
|
||||||
perror "could not run to main when attempting to break at $func"
|
if { ! [gdb_breakpoint test_function] } {
|
||||||
|
fail "set test_function breakpoint for $func"
|
||||||
|
} elseif { [gdb_test "continue" \
|
||||||
|
"Continuing.\r\n\r\nBreakpoint $DEC+,.*test_function.*" \
|
||||||
|
""] != 0 } {
|
||||||
|
fail "continue to test_function for $func"
|
||||||
} else {
|
} else {
|
||||||
gdb_breakpoint "$func"
|
gdb_breakpoint "$func"
|
||||||
set i [expr {[string last : $func] + 1}]
|
set i [expr {[string last : $func] + 1}]
|
||||||
|
@ -113,7 +118,7 @@ set ADDR "0x$HEX+"; # address
|
||||||
array set all_functions {}
|
array set all_functions {}
|
||||||
|
|
||||||
# "Normal" functions/methods
|
# "Normal" functions/methods
|
||||||
add {main} \
|
add {test_function} \
|
||||||
{int (int, char **)} \
|
{int (int, char **)} \
|
||||||
- \
|
- \
|
||||||
-
|
-
|
||||||
|
@ -717,8 +722,8 @@ foreach name [get_functions list] {
|
||||||
|
|
||||||
# Running to breakpoint -- use any function we can "list"
|
# Running to breakpoint -- use any function we can "list"
|
||||||
foreach name [get_functions list] {
|
foreach name [get_functions list] {
|
||||||
# Skip "main", since test_breakpoint uses it
|
# Skip "test_function", since test_breakpoint uses it
|
||||||
if {[string compare $name "main"] != 0} {
|
if {[string compare $name "test_function"] != 0} {
|
||||||
test_breakpoint $name
|
test_breakpoint $name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue