From cf0a608f24f6553cb90999ebc503ac08bf614d57 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Wed, 3 May 2006 17:54:32 +0000 Subject: 2006-05-03 Paul Brook Daniel Jacobowitz * gdb/testsuite/gdb.cp/gdb1355.exp: Accept different spellings of integer types. * gdb/testsuite/gdb.cp/gdb1355.cc: Ensure all types are referenced. * gdb/testsuite/gdb.cp/hang2.C: Ditto. * gdb/testsuite/gdb.cp/m-data.cc: Ditto. * gdb/testsuite/gdb.cp/hang3.C: Ditto. * gdb/testsuite/gdb.cp/hang1.C: Ditto. * gdb/gdbtypes.c (rank_one_type): Check for plain char -> signed/ unsigned char. * gdb/testsuite/gdb.base/completion.exp: Accept "long" as a type. * gdb/testsuite/gdb.base/volatile.exp: Accept different spellings of integer types. * gdb/testsuite/gdb.base/constvars.c: Ensure all types are referenced. * gdb/testsuite/gdb.stabs/weird.exp: Return -1 instead of issuing error. * gdb/testsuite/gdb.base/advance.c: Add proper function prototype. * gdb/testsuite/gdb.base/ending-run.exp: Add case for ARM runtime. * gdb/testsuite/gdb.base/gdb1821.c: Ensure all types are referenced. * gdb/testsuite/gdb.base/ptype.exp: Accept different spellings of integer types. * gdb/testsuite/gdb.cp/inherit.exp: Cope with armcc vtable pointers. * gdb/testsuite/gdb.mi/mi2-var-child.exp: Accept different spellings of integer types. * gdb/testsuite/gdb.mi/mi-var-display.exp: Ditto. * gdb/testsuite/gdb.mi/mi2-var-display.exp: Ditto. * gdb/testsuite/gdb.mi/mi2-var-cmd.exp: Ditto. --- ChangeLog.csl | 40 ++++++++++++++++++++++++++++++++ gdb/gdbtypes.c | 2 ++ gdb/testsuite/gdb.base/advance.c | 2 +- gdb/testsuite/gdb.base/completion.exp | 2 +- gdb/testsuite/gdb.base/constvars.c | 4 ++++ gdb/testsuite/gdb.base/ending-run.exp | 4 ++++ gdb/testsuite/gdb.base/gdb1821.c | 2 +- gdb/testsuite/gdb.base/ptype.exp | 5 ++++ gdb/testsuite/gdb.base/volatile.exp | 2 +- gdb/testsuite/gdb.cp/gdb1355.cc | 3 ++- gdb/testsuite/gdb.cp/gdb1355.exp | 8 +++---- gdb/testsuite/gdb.cp/hang1.C | 5 +++- gdb/testsuite/gdb.cp/hang2.C | 5 ++++ gdb/testsuite/gdb.cp/hang3.C | 5 ++++ gdb/testsuite/gdb.cp/inherit.exp | 15 ++++++++++++ gdb/testsuite/gdb.cp/m-data.cc | 2 +- gdb/testsuite/gdb.mi/mi-var-display.exp | 6 ++--- gdb/testsuite/gdb.mi/mi2-var-child.exp | 32 ++++++++++++------------- gdb/testsuite/gdb.mi/mi2-var-cmd.exp | 6 ++--- gdb/testsuite/gdb.mi/mi2-var-display.exp | 6 ++--- gdb/testsuite/gdb.stabs/weird.exp | 2 +- 21 files changed, 121 insertions(+), 37 deletions(-) diff --git a/ChangeLog.csl b/ChangeLog.csl index 5f1daae0e0e..b0760b8d8e3 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,43 @@ +2006-05-03 Paul Brook + Daniel Jacobowitz + + * gdb/testsuite/gdb.cp/gdb1355.exp: Accept different spellings of + integer types. + * gdb/testsuite/gdb.cp/gdb1355.cc: Ensure all types are referenced. + * gdb/testsuite/gdb.cp/hang2.C: Ditto. + * gdb/testsuite/gdb.cp/m-data.cc: Ditto. + * gdb/testsuite/gdb.cp/hang3.C: Ditto. + * gdb/testsuite/gdb.cp/hang1.C: Ditto. + + * gdb/gdbtypes.c (rank_one_type): Check for plain char -> signed/ + unsigned char. + + * gdb/testsuite/gdb.base/completion.exp: Accept "long" as a type. + + * gdb/testsuite/gdb.base/volatile.exp: Accept different spellings of + integer types. + * gdb/testsuite/gdb.base/constvars.c: Ensure all types are referenced. + + * gdb/testsuite/gdb.stabs/weird.exp: Return -1 instead of issuing + error. + + * gdb/testsuite/gdb.base/advance.c: Add proper function prototype. + + * gdb/testsuite/gdb.base/ending-run.exp: Add case for ARM runtime. + + * gdb/testsuite/gdb.base/gdb1821.c: Ensure all types are referenced. + + * gdb/testsuite/gdb.base/ptype.exp: Accept different spellings of + integer types. + + * gdb/testsuite/gdb.cp/inherit.exp: Cope with armcc vtable pointers. + + * gdb/testsuite/gdb.mi/mi2-var-child.exp: Accept different spellings + of integer types. + * gdb/testsuite/gdb.mi/mi-var-display.exp: Ditto. + * gdb/testsuite/gdb.mi/mi2-var-display.exp: Ditto. + * gdb/testsuite/gdb.mi/mi2-var-cmd.exp: Ditto. + 2006-05-03 Paul Brook * arm-linux-tdep.c (arm_linux_extract_return_value): Use gdb_byte. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index dde327b5ab4..40d45fa7ec4 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -2452,6 +2452,8 @@ rank_one_type (struct type *parm, struct type *arg) else return INTEGER_CONVERSION_BADNESS; /* signed/unsigned char -> plain char */ } + else if (TYPE_NOSIGN (arg)) + return INTEGER_CONVERSION_BADNESS; /* plain char -> signed/unsigned char */ else if (TYPE_UNSIGNED (parm)) { if (TYPE_UNSIGNED (arg)) diff --git a/gdb/testsuite/gdb.base/advance.c b/gdb/testsuite/gdb.base/advance.c index 8066deec421..faa435f10e3 100644 --- a/gdb/testsuite/gdb.base/advance.c +++ b/gdb/testsuite/gdb.base/advance.c @@ -13,7 +13,7 @@ int bar (int y) return z; } -void func() +void func(int c) { x = x + 5; func2 (); diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 2961cb5ac1a..f6db0a87fdf 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -700,7 +700,7 @@ gdb_expect { -re "marker1.*$gdb_prompt info func marker$"\ { send_gdb "\n" gdb_expect { - -re "All functions matching regular expression \"marker\":.*File.*break1.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\ + -re "All functions matching regular expression \"marker\":.*File.*break1.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long( int)?\\);.*$gdb_prompt $"\ { pass "complete 'info func marke'"} -re ".*$gdb_prompt $" { fail "complete 'info func marke'"} timeout {fail "(timeout) complete 'info func marke'"} diff --git a/gdb/testsuite/gdb.base/constvars.c b/gdb/testsuite/gdb.base/constvars.c index 16025770e35..cac9a018193 100644 --- a/gdb/testsuite/gdb.base/constvars.c +++ b/gdb/testsuite/gdb.base/constvars.c @@ -172,6 +172,10 @@ main (void) struct crass { char * const ptr; } crass; struct crisp { char * const *ptr; } crisp; + /* Reference the structs so that they are not discarded. */ + struct crass *creed = &crass; + struct crisp *crow = &crisp; + /* misc. references */ /* const char & radiation = laconic; diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index 1363a000ca4..06b8cfa9479 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -196,6 +196,10 @@ gdb_expect { # This is what happens on ARM in thumb mode -fn 2000-02-01 pass "step out of main (on ARM thumb)" } + -re ".*__rt_entry ().*$gdb_prompt $" { + # This is what happens on the ARM RVDS runtime + pass "step out of main (on ARM runtime)" + } -re ".*in.*\\\$START\\\$.*from.*dld.sl.*$gdb_prompt $" { pass "step out of main" } diff --git a/gdb/testsuite/gdb.base/gdb1821.c b/gdb/testsuite/gdb.base/gdb1821.c index a4def6ecb0a..5ee3c8cf1fd 100644 --- a/gdb/testsuite/gdb.base/gdb1821.c +++ b/gdb/testsuite/gdb.base/gdb1821.c @@ -22,4 +22,4 @@ struct foo { double x__0, y__0, z__1; } bar; -int main(void) { return 0; } +int main(void) { return (int) bar.x__0; } diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp index 851d6b7b776..ee397d59a0b 100644 --- a/gdb/testsuite/gdb.base/ptype.exp +++ b/gdb/testsuite/gdb.base/ptype.exp @@ -550,6 +550,11 @@ proc ptype_maybe_prototyped { id prototyped plain } { regsub -all "\[\]\[*()\]" $prototyped "\\\\&" prototyped regsub -all "\[\]\[*()\]" $plain "\\\\&" plain + # Adjust all "short int" and "long int" patterns to accept + # "short" and "long". + regsub -all "(short|long) int" $prototyped "\\1( int)?" prototyped + regsub -all "(short|long) int" $plain "\\1( int)?" plain + send_gdb "ptype $id\n" gdb_expect { -re "type = $prototyped\[\r\n\]+$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp index b6623f8ce9a..cd00567e668 100644 --- a/gdb/testsuite/gdb.base/volatile.exp +++ b/gdb/testsuite/gdb.base/volatile.exp @@ -182,7 +182,7 @@ local_compiler_xfail_check gdb_test "ptype veneer" "type = volatile short( int)? \\* volatile.*" local_compiler_xfail_check -gdb_test "ptype video" "type = volatile (unsigned short|short unsigned)( int) \\* volatile.*" +gdb_test "ptype video" "type = volatile (unsigned short|short unsigned)( int)? \\* volatile.*" local_compiler_xfail_check gdb_test "ptype vacuum" "type = volatile long( int)? \\* volatile.*" 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 = 3, vx = 4\}, $re_vbptr_ARM = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" { + pass "$name (FIXME ARM vtbl ptr)" + } -re "$vhn = \{ = \{va = 3, vx = 4\}, $re_vbptr_3 = $hex , 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 = 7, vx = 8\}, $re_vbptr_ARM = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" { + pass "$name (FIXME ARM vtbl ptr)" + } -re "$vhn = \{ = \{va = 7, vx = 8\}, $re_vbptr_3 = $hex , 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 = \{ = \{ = \{va = 19, vx = 20\}, $re_vbptr_ARM = $hex, vb = 21, vx = 22\}, = \{$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 = \{ = \{ = \{va = 19, vx = 20\}, $re_vbptr_3_vB = $hex, vb = 21, vx = 22\}, = \{$re_vbptr_3_vC = $hex , 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 = \{ = \{ = \{ = \{va = 0, vx = 0\}, $re_vbptr_ARM = $hex, vb = 0, vx = 0\}, = \{$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 = \{ = \{ = \{ = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, = \{$re_vbptr_3_vC = $hex , 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; } diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp index 5658b298f06..45471f7dcb0 100644 --- a/gdb/testsuite/gdb.mi/mi-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi-var-display.exp @@ -183,7 +183,7 @@ mi_gdb_test "-var-create weird * weird" \ "create local variable weird" mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ + "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long( int)? \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long( int)?|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long( int)?|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ "get children local variable weird" @@ -410,7 +410,7 @@ mi_gdb_test "-var-info-num-children anonu" \ # Test: c_variable-7.25 # Desc: children of anonu mi_gdb_test "-var-list-children anonu" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long( int)?\"\}\\\]" \ "get children of anonu" # Test: c_variable-7.30 @@ -484,7 +484,7 @@ mi_gdb_test "-var-info-num-children anons" \ # Test: c_variable-7.45 # Desc: children of anons mi_gdb_test "-var-list-children anons" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long( int)?\"\}\\\]" \ "get children of anons" diff --git a/gdb/testsuite/gdb.mi/mi2-var-child.exp b/gdb/testsuite/gdb.mi/mi2-var-child.exp index be2dc849214..6d7b88e4230 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-child.exp @@ -59,7 +59,7 @@ mi_gdb_test "-var-create struct_declarations * struct_declarations" \ # STABS doesn't give us argument types for the func ptr structs, but # Dwarf 2 does. mi_gdb_test "-var-list-children struct_declarations" \ - "\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ + "\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long( int)? \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long( int)?)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long( int)?)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ "get children of struct_declarations" #gdbtk_test c_variable-4.3 {children of struct_declarations} { @@ -140,7 +140,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \ # Test: c_variable-4.15 # Desc: children of struct_declarations.long_array mi_gdb_test "-var-list-children struct_declarations.long_array" \ - "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long( int)?\"\}\\\]" \ "get children of struct_declarations.long_array" # Test: c_variable-4.16 @@ -192,7 +192,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \ # Test: c_variable-4.23 # Desc: children of struct_declarations.u1 mi_gdb_test "-var-list-children struct_declarations.u1" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\\\]" \ + "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\\\]" \ "get children of struct_declarations.u1" # Test: c_variable-4.24 @@ -204,7 +204,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1" \ # Test: c_variable-4.25 # Desc: children of struct_declarations.s2 mi_gdb_test "-var-list-children struct_declarations.s2" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\\\]" \ + "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long( int)? \\\[10\\\]\"\}\\\]" \ "get children of struct_declarations.s2" #gdbtk_test c_variable-4.25 {children of struct_declarations.s2} { # get_children struct_declarations.s2 @@ -379,7 +379,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \ # Test: c_variable-4.53 # Desc: children of struct_declarations.s2.u2 mi_gdb_test "-var-list-children struct_declarations.s2.u2" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ + "\\^done,numchild=\"3\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ "get children of struct_declarations.s2.u2" # Test: c_variable-4.54 @@ -417,7 +417,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \ # Test: c_variable-4.59 # Desc: children of struct_declarations.s2.i mi_gdb_test "-var-list-children struct_declarations.s2.i" \ - "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long( int)?\"\}\\\]" \ "get children of struct_declarations.s2.i" # Test: c_variable-4.60 @@ -565,7 +565,7 @@ mi_gdb_test "-var-create weird * weird" \ # Test: c_variable-4.82 # Desc: children of weird mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ + "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long( int)? \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long( int)?)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long( int)?)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ "get children of weird" # Test: c_variable-4.83 @@ -578,7 +578,7 @@ mi_gdb_test "-var-info-num-children weird" \ # Test: c_variable-4.84 # Desc: children of weird->long_array mi_gdb_test "-var-list-children weird.long_array" \ - "\\^done,numchild=\"10\",children=\\\[child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"10\",children=\\\[child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long( int)?\"\}\\\]" \ "get children of weird.long_array" #gdbtk_test c_variable-4.84 {children of weird->long_array} { # get_children weird.long_array @@ -938,13 +938,13 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ # Test: c_variable-5.19 # Desc: create psnp->long_ptr mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \ - "\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"" \ + "\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long( int)? \\*\\*\\*\\*\"" \ "create local variable psnp->long_ptr" # Test: c_variable-5.20 # Desc: children of psnp->long_ptr mi_gdb_test "-var-list-children psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\\\]" \ + "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long( int)? \\*\\*\\*\"\}\\\]" \ "get children of psnp->long_ptr" # Test: c_variable-5.21 @@ -956,7 +956,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr" \ # Test: c_variable-5.22 # Desc: children of *(psnp->long_ptr) mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\\\]" \ + "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long( int)? \\*\\*\"\}\\\]" \ "get children of psnp->long_ptr.*psnp->long_ptr" @@ -969,7 +969,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \ # Test: c_variable-5.24 # Desc: children of *(*(psnp->long_ptr)) mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\\\]" \ + "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long( int)? \\*\"\}\\\]" \ "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" # Test: c_variable-5.25 @@ -981,7 +981,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ # Test: c_variable-5.26 # Desc: children of *(*(*(psnp->long_ptr))) mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long( int)?\"\}\\\]" \ "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" # Test: c_variable-5.27 @@ -1023,7 +1023,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs" \ # Test: c_variable-5.33 # Desc: children of psnp->ptrs[0] mi_gdb_test "-var-list-children psnp->ptrs.0" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ + "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long( int)? \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ "get children of psnp->ptrs.0" # Test: c_variable-5.34 @@ -1035,7 +1035,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0" \ # Test: c_variable-5.35 # Desc: children of psnp->ptrs[0]->next mi_gdb_test "-var-list-children psnp->ptrs.0.next" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ + "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long( int)? \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ "get children of psnp->ptrs.0.next" #} {char_ptr long_ptr ptrs next} @@ -1120,7 +1120,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ # Test: c_variable-5.45 # Desc: children of psnp->ptrs[0]->next->next mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ + "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long( int)? \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ "get children of psnp->ptrs.0.next.next" # Test: c_variable-5.46 diff --git a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp b/gdb/testsuite/gdb.mi/mi2-var-cmd.exp index 5a8f50b014d..e505f3906ef 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-cmd.exp @@ -90,11 +90,11 @@ mi_gdb_test "-var-create lpcharacter * lpcharacter" \ "create local variable lpcharacter" mi_gdb_test "-var-create llong * llong" \ - "\\^done,name=\"llong\",numchild=\"0\",type=\"long int\"" \ + "\\^done,name=\"llong\",numchild=\"0\",type=\"long( int)?\"" \ "create local variable llong" mi_gdb_test "-var-create lplong * lplong" \ - "\\^done,name=\"lplong\",numchild=\"1\",type=\"long int \\*\"" \ + "\\^done,name=\"lplong\",numchild=\"1\",type=\"long( int)? \\*\"" \ "create local variable lplong" mi_gdb_test "-var-create lfloat * lfloat" \ @@ -401,7 +401,7 @@ mi_gdb_test "-var-create i * i" \ "create i" mi_gdb_test "-var-create l * l" \ - "\\^done,name=\"l\",numchild=\"1\",type=\"long int \\*\"" \ + "\\^done,name=\"l\",numchild=\"1\",type=\"long( int)? \\*\"" \ "create l" # Test: c_variable-2.11 diff --git a/gdb/testsuite/gdb.mi/mi2-var-display.exp b/gdb/testsuite/gdb.mi/mi2-var-display.exp index a19644044a8..5ad4731edae 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-display.exp @@ -183,7 +183,7 @@ mi_gdb_test "-var-create weird * weird" \ "create local variable weird" mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ + "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long( int)?\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long( int)? \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long( int)?|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long( int)?|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ "get children local variable weird" @@ -410,7 +410,7 @@ mi_gdb_test "-var-info-num-children anonu" \ # Test: c_variable-7.25 # Desc: children of anonu mi_gdb_test "-var-list-children anonu" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long( int)?\"\}\\\]" \ "get children of anonu" # Test: c_variable-7.30 @@ -484,7 +484,7 @@ mi_gdb_test "-var-info-num-children anons" \ # Test: c_variable-7.45 # Desc: children of anons mi_gdb_test "-var-list-children anons" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\\\]" \ + "\\^done,numchild=\"3\",children=\\\[child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long( int)?y\"\}\\\]" \ "get children of anons" diff --git a/gdb/testsuite/gdb.stabs/weird.exp b/gdb/testsuite/gdb.stabs/weird.exp index 7f67ccb132b..76dfcd67407 100644 --- a/gdb/testsuite/gdb.stabs/weird.exp +++ b/gdb/testsuite/gdb.stabs/weird.exp @@ -290,7 +290,7 @@ if { [lindex $exec_output 0] != 0 } { } if { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." + return -1 } remote_file build delete ${srcfile} -- cgit v1.2.1