PR breakpoint/12803
* gdb.cp/cmpd-minsyms.cc (a): New method. (b): New method. (c): New method. * gdb.cp/cmpd-minsyms.exp: Add tests for new methods.
This commit is contained in:
parent
f17170e5e2
commit
2e21250dbc
@ -1,3 +1,11 @@
|
|||||||
|
2011-05-24 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
|
PR breakpoint/12803
|
||||||
|
* gdb.cp/cmpd-minsyms.cc (a): New method.
|
||||||
|
(b): New method.
|
||||||
|
(c): New method.
|
||||||
|
* gdb.cp/cmpd-minsyms.exp: Add tests for new methods.
|
||||||
|
|
||||||
2011-05-24 Pedro Alves <pedro@codesourcery.com>
|
2011-05-24 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* gdb.base/commands.exp (watchpoint_command_test): Check that the
|
* gdb.base/commands.exp (watchpoint_command_test): Check that the
|
||||||
|
@ -25,11 +25,17 @@ class GDB
|
|||||||
static X even_harder (T a) { return static_cast<X> (a); }
|
static X even_harder (T a) { return static_cast<X> (a); }
|
||||||
int operator == (GDB const& other)
|
int operator == (GDB const& other)
|
||||||
{ return 1; }
|
{ return 1; }
|
||||||
|
void a (void) const { }
|
||||||
|
void b (void) volatile { }
|
||||||
|
void c (void) const volatile { }
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
GDB<int> a, b;
|
GDB<int> a, b;
|
||||||
|
a.a ();
|
||||||
|
a.b ();
|
||||||
|
a.c ();
|
||||||
if (a == b)
|
if (a == b)
|
||||||
return GDB<char>::harder('a') + GDB<int>::harder(3)
|
return GDB<char>::harder('a') + GDB<int>::harder(3)
|
||||||
+ GDB<char>::even_harder<int> ('a');
|
+ GDB<char>::even_harder<int> ('a');
|
||||||
|
@ -19,13 +19,26 @@
|
|||||||
|
|
||||||
if {[skip_cplus_tests]} { continue }
|
if {[skip_cplus_tests]} { continue }
|
||||||
|
|
||||||
# Test for c++/12273
|
# Tests for c++/12273, breakpoint/12803
|
||||||
set testfile "cmpd-minsyms"
|
set testfile "cmpd-minsyms"
|
||||||
# Do NOT compile with debug flag.
|
# Do NOT compile with debug flag.
|
||||||
if {[prepare_for_testing $testfile $testfile $testfile.cc {c++}]} {
|
if {[prepare_for_testing $testfile $testfile $testfile.cc {c++}]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Before setting the language, try to set a few simple breakpoints
|
||||||
|
set min_syms [list \
|
||||||
|
"GDB<int>::a() const" \
|
||||||
|
"GDB<int>::b() volatile" \
|
||||||
|
"GDB<int>::c() const volatile"]
|
||||||
|
foreach sym $min_syms {
|
||||||
|
set tst "setting breakpoint at '$sym'"
|
||||||
|
if {[gdb_breakpoint "'$sym'"]} {
|
||||||
|
pass $tst
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
gdb_test_no_output "set language c++"
|
gdb_test_no_output "set language c++"
|
||||||
|
|
||||||
# A list of minimal symbol names to check.
|
# A list of minimal symbol names to check.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user