* gdb.cp/ovldbreak.cc: Add missing bodies for methods foo::foofunc.
* gdb.cp/ovldbreak.exp: Set multiple-symbols to "ask". Add a couple of tests that verify the behavior when the new setting is set to "cancel" and "all". * gdb.cp/method2.exp, gdb.cp/templates.exp: Set multiple-symbols to "ask" before we start the testing.
This commit is contained in:
parent
717d2f5a05
commit
eae06beb6d
|
@ -1,3 +1,12 @@
|
|||
2008-04-03 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* gdb.cp/ovldbreak.cc: Add missing bodies for methods foo::foofunc.
|
||||
* gdb.cp/ovldbreak.exp: Set multiple-symbols to "ask".
|
||||
Add a couple of tests that verify the behavior when the new setting
|
||||
is set to "cancel" and "all".
|
||||
* gdb.cp/method2.exp, gdb.cp/templates.exp: Set multiple-symbols to
|
||||
"ask" before we start the testing.
|
||||
|
||||
2008-04-01 Aleksandar Ristovski <aristovski@qnx.com>
|
||||
|
||||
* gdb.cp/casts.cc: Add class reference variables.
|
||||
|
|
|
@ -62,6 +62,11 @@ proc test_break { lang } {
|
|||
}
|
||||
}
|
||||
|
||||
# We want in this test to double-check the contents of the multiple-choice
|
||||
# menu that's printed when a breakpoint location is ambiguous. So we need
|
||||
# to set multiple-symbols to "ask" first.
|
||||
gdb_test "set multiple-symbols ask" ""
|
||||
|
||||
test_break "c"
|
||||
test_break "c++"
|
||||
|
||||
|
|
|
@ -174,4 +174,11 @@ int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
|
|||
a10 = a11 = 0; return 11;}
|
||||
|
||||
|
||||
void foo::foofunc (int a)
|
||||
{
|
||||
}
|
||||
|
||||
void foo::foofunc (int b, signed char *c)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,9 @@ proc set_bp_overloaded {name expectedmenu mychoice bpnumber linenumber} {
|
|||
|
||||
set menu_overload1arg "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\((unsigned int|unsigned)\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\((void|)\\) at.*$srcfile:110\r\n> $"
|
||||
|
||||
|
||||
# Set multiple-symbols to "ask", to allow us to test the use
|
||||
# of the multiple-choice menu when breaking on an overloaded method.
|
||||
gdb_test "set multiple-symbols ask" ""
|
||||
|
||||
# Set breakpoints on foo::overload1arg, one by one.
|
||||
|
||||
|
@ -351,7 +353,17 @@ continue_to_bp_overloaded 0 16 "unsigned long" "arg=10"
|
|||
continue_to_bp_overloaded 0 15 "float" "arg=100"
|
||||
continue_to_bp_overloaded 1 14 "double" "arg=200"
|
||||
|
||||
# Test breaking on an overloaded function when multiple-symbols
|
||||
# is set to "cancel"
|
||||
gdb_test "set multiple-symbols cancel" ""
|
||||
gdb_test "break foo::foofunc" \
|
||||
"canceled.*"
|
||||
|
||||
# Test breaking on an overloaded function when multiple-symbols
|
||||
# is set to "all"
|
||||
gdb_test "set multiple-symbols all" ""
|
||||
gdb_test "break foo::foofunc" \
|
||||
"Breakpoint \[0-9\]+ at ${hex}: file .*ovldbreak\\.cc, line \[0-9\]+\\.\r\nBreakpoint \[0-9\]+ at ${hex}: file .*ovldbreak\\.cc, line \[0-9\]+\\.\r\nwarning: Multiple breakpoints were set\\.\r\nUse the \"delete\" command to delete unwanted breakpoints\\."
|
||||
|
||||
# That's all, folks.
|
||||
|
||||
|
|
|
@ -210,6 +210,10 @@ proc do_tests {} {
|
|||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load $binfile
|
||||
|
||||
# Change multiple-symbols to "ask" in order to get the multiple-choice
|
||||
# menu when breaking on overloaded methods.
|
||||
gdb_test "set multiple-symbols ask" ""
|
||||
|
||||
runto_main
|
||||
|
||||
test_ptype_of_templates
|
||||
|
|
Loading…
Reference in New Issue