From e1ad829b914f25de6860403c07a0a5dcee8470e1 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 5 Feb 2002 23:58:45 +0000 Subject: [PATCH] * mi-regs.exp: Various cleanups for SPARC-only tests. (test_breakpoints_creation_and_listing): Format of breakpoint table has changed. (sparc_register_tests): Expand floating-point number regexp to recognize NaN values, too. Replace ineffectual single backslash before a hyphen with a double backslash. Don't check the exact numbers of the registers which have changed, since there's no way to know which registers changed, exactly; just check that the result is well-formed. * mi0-regs.exp: (sparc_register_tests): Same as for sparc_register_tests in mi-regs.exp. --- gdb/testsuite/gdb.mi/ChangeLog | 12 ++++++++++++ gdb/testsuite/gdb.mi/mi-regs.exp | 10 ++++------ gdb/testsuite/gdb.mi/mi0-regs.exp | 6 +++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog index fd4bc65a021..c5f9c6e1491 100644 --- a/gdb/testsuite/gdb.mi/ChangeLog +++ b/gdb/testsuite/gdb.mi/ChangeLog @@ -1,5 +1,17 @@ 2002-02-05 Jim Blandy + * mi-regs.exp: Various cleanups for SPARC-only tests. + (test_breakpoints_creation_and_listing): Format of breakpoint + table has changed. + (sparc_register_tests): Expand floating-point number regexp to + recognize NaN values, too. Replace ineffectual single backslash + before a hyphen with a double backslash. Don't check the exact + numbers of the registers which have changed, since there's no way + to know which registers changed, exactly; just check that the + result is well-formed. + * mi0-regs.exp: (sparc_register_tests): Same as for + sparc_register_tests in mi-regs.exp. + * mi-var-child.exp ("get children of struct_declarations", "get children of struct_declarations.s2.u2.u1s2", "get children of weird"): Tolerate argument types when they appear in function diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp index cffb7cffec1..c427677a41b 100644 --- a/gdb/testsuite/gdb.mi/mi-regs.exp +++ b/gdb/testsuite/gdb.mi/mi-regs.exp @@ -63,7 +63,7 @@ proc test_breakpoints_creation_and_listing {} { "break-insert operation" mi_gdb_test "204-break-list" \ - "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\}" \ + "204\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \ "list of breakpoints" } @@ -112,8 +112,8 @@ proc sparc_register_tests { } { global decimal set octal "\[0-7\]+" set binary "\[0-1\]+" - set float "-?\[0-9\]+(\.\[0-9\]+)?(e\[+\-\]\[0-9\]+)?" - set float2 "\-?\[0-9\]+" + set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))" + set float2 "\\-?\[0-9\]+" mi_gdb_test "111-data-list-register-names" \ "111\\^done,register-names=\\\[\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \ @@ -157,10 +157,8 @@ proc sparc_register_tests { } { "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \ "list values of some regs" - # Don't know how useful this test is - mi_gdb_test "002-data-list-changed-registers" \ - "002\\^done,changed-registers=\\\[\"1\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"30\",\"31\",\"65\",\"68\",\"69\"\\\]" \ + "002\\^done,changed-registers=\\\[(\"${decimal}\"(,\"${decimal}\")*)?\\\]" \ "list changed registers" } diff --git a/gdb/testsuite/gdb.mi/mi0-regs.exp b/gdb/testsuite/gdb.mi/mi0-regs.exp index 82e6d3afc46..b6db903593d 100644 --- a/gdb/testsuite/gdb.mi/mi0-regs.exp +++ b/gdb/testsuite/gdb.mi/mi0-regs.exp @@ -112,8 +112,8 @@ proc sparc_register_tests { } { global decimal set octal "\[0-7\]+" set binary "\[0-1\]+" - set float "-?\[0-9\]+(\.\[0-9\]+)?(e\[+\-\]\[0-9\]+)?" - set float2 "\-?\[0-9\]+" + set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))" + set float2 "\\-?\[0-9\]+" mi_gdb_test "111-data-list-register-names" \ "111\\^done,register-names=\{\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\}" \ @@ -160,7 +160,7 @@ proc sparc_register_tests { } { # Don't know how useful this test is mi_gdb_test "002-data-list-changed-registers" \ - "002\\^done,changed-registers=\{\"1\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"30\",\"31\",\"65\",\"68\",\"69\"\}" \ + "002\\^done,changed-registers=\{(\"${decimal}\"(,\"${decimal}\")*)?\}" \ "list changed registers" } -- 2.30.2