diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/gdb1355.cc | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/gdb1355.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/hang1.C | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/hang2.C | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/hang3.C | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/inherit.exp | 15 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/m-data.cc | 2 |
7 files changed, 36 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.cp/gdb1355.cc b/gdb/testsuite/gdb.cp/gdb1355.cc index a53ca20e4d5..51e625f1449 100644 --- a/gdb/testsuite/gdb.cp/gdb1355.cc +++ b/gdb/testsuite/gdb.cp/gdb1355.cc @@ -31,5 +31,6 @@ struct mystruct s1 = int main () { - return 0; + /* Reference s1 so that it is included. */ + return s1.m_int - 117; } diff --git a/gdb/testsuite/gdb.cp/gdb1355.exp b/gdb/testsuite/gdb.cp/gdb1355.exp index 11f16d5b639..4c56bb0ba20 100644 --- a/gdb/testsuite/gdb.cp/gdb1355.exp +++ b/gdb/testsuite/gdb.cp/gdb1355.exp @@ -68,11 +68,11 @@ set s_tail ".*" set f_i "${ws}int m_int;" set f_c "${ws}char m_char;" -set f_li "${ws}long int m_long_int;" +set f_li "${ws}long( int)? m_long_int;" set f_ui "${ws}unsigned int m_unsigned_int;" -set f_lui "${ws}long unsigned int m_long_unsigned_int;" -set f_si "${ws}short int m_short_int;" -set f_sui "${ws}short unsigned int m_short_unsigned_int;" +set f_lui "${ws}(long unsigned|unsigned long)( int)? m_long_unsigned_int;" +set f_si "${ws}short( int)? m_short_int;" +set f_sui "${ws}(short unsigned|unsigned short)( int)? m_short_unsigned_int;" set f_uc "${ws}unsigned char m_unsigned_char;" set f_f "${ws}float m_float;" set f_d "${ws}double m_double;" diff --git a/gdb/testsuite/gdb.cp/hang1.C b/gdb/testsuite/gdb.cp/hang1.C index 4b04d77e68c..d9b0672f07c 100644 --- a/gdb/testsuite/gdb.cp/hang1.C +++ b/gdb/testsuite/gdb.cp/hang1.C @@ -1,3 +1,6 @@ #include "hang.H" -int main (int argc, char **argv) { return 0; } +extern int dummy2 (void); +extern int dummy3 (void); + +int main (int argc, char **argv) { return dummy2() + dummy3(); } diff --git a/gdb/testsuite/gdb.cp/hang2.C b/gdb/testsuite/gdb.cp/hang2.C index 59732f87d63..15dcb148ac1 100644 --- a/gdb/testsuite/gdb.cp/hang2.C +++ b/gdb/testsuite/gdb.cp/hang2.C @@ -6,3 +6,8 @@ struct B }; int var_in_b = 1729; + +int dummy2 (void) +{ + return var_in_b; +} diff --git a/gdb/testsuite/gdb.cp/hang3.C b/gdb/testsuite/gdb.cp/hang3.C index 92c82fa2441..b08decc5430 100644 --- a/gdb/testsuite/gdb.cp/hang3.C +++ b/gdb/testsuite/gdb.cp/hang3.C @@ -2,3 +2,8 @@ const struct B *const_B_ptr; int var_in_hang3 = 42; + +int dummy3 (void) +{ + return var_in_hang3; +} diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp index 9ae1c1e2f3a..599aa73381b 100644 --- a/gdb/testsuite/gdb.cp/inherit.exp +++ b/gdb/testsuite/gdb.cp/inherit.exp @@ -477,6 +477,7 @@ proc test_print_svi_classes { } { # Print all members of g_vB. set re_vbptr_2 "(_vb.2vA|_vb.vA)" set re_vbptr_3 "_vptr.vB" + set re_vbptr_ARM "__vptr" set name "print g_vB" gdb_test_multiple "print g_vB" $name { @@ -492,6 +493,9 @@ proc test_print_svi_classes { } { # gcc HEAD 2004-07-31 -gdwarf-2 pass "$name (FIXME v3 vtbl ptr)" } + -re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_ARM = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" { + pass "$name (FIXME ARM vtbl ptr)" + } -re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = $hex <VTT for vB>, vb = 5, vx = 6\}$nl$gdb_prompt $" { # gcc 3.3.4 -gstabs+ pass $name @@ -505,6 +509,7 @@ proc test_print_svi_classes { } { # Print all members of g_vC. set re_vbptr_2 "(_vb.2vA|_vb.vA)" set re_vbptr_3 "_vptr.vC" + set re_vbptr_ARM "__vptr" set name "print g_vC" gdb_test_multiple "print g_vC" $name { @@ -520,6 +525,9 @@ proc test_print_svi_classes { } { # gcc HEAD 2004-07-31 -gdwarf-2 pass "$name (FIXME v3 vtbl ptr)" } + -re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_ARM = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" { + pass "$name (FIXME ARM vtbl ptr)" + } -re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = $hex <VTT for vC>, vc = 9, vx = 10\}$nl$gdb_prompt $" { # gcc 3.3.4 -gstabs+ pass $name @@ -579,6 +587,7 @@ proc test_print_mvi_classes { } { set re_vbptr_3_vC "_vptr.vC" set re_vbptr_3_vD "_vptr.vD" set re_vbptr_3_vE "_vptr.vE" + set re_vbptr_ARM "__vptr" # Print all members of g_vD. @@ -595,6 +604,9 @@ proc test_print_mvi_classes { } { # gcc HEAD 2004-01-21 -gstabs+ pass "$name (FIXME v3 vtbl ptr)" } + -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_ARM = $hex, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_ARM = $hex, vc = 23, vx = 24\}, $re_vbptr_ARM = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" { + pass "$name (FIXME ARM vtbl ptr)" + } -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_3_vB = $hex, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_3_vC = $hex <VTT for vD>, vc = 23, vx = 24\}, $re_vbptr_3_vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" { # gcc 3.3.2 -gstabs+ pass "$name" @@ -618,6 +630,9 @@ proc test_print_mvi_classes { } { # gcc HEAD 2004-07-31 -gdwarf-2 pass "$name (FIXME v3 vtbl ptr)" } + -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_ARM = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_ARM = $hex, vc = 0, vx = 0\}, $re_vbptr_ARM = $hex, vd = 0, vx = 0\}, $re_vbptr_ARM = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" { + pass "$name (FIXME ARM vtbl ptr)" + } -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = $hex <VTT for vD>, vc = 0, vx = 0\}, $re_vbptr_3_vD = $hex, vd = 0, vx = 0\}, $re_vbptr_3_vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" { # gcc 3.2.7-rh -gstabs+ pass $name diff --git a/gdb/testsuite/gdb.cp/m-data.cc b/gdb/testsuite/gdb.cp/m-data.cc index c97e7195f77..65e70fabfc0 100644 --- a/gdb/testsuite/gdb.cp/m-data.cc +++ b/gdb/testsuite/gdb.cp/m-data.cc @@ -60,5 +60,5 @@ int main() C theC (1); // breakpoint: first-constructs-done theC.marker (); - return 0; + return shadow; } |