diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-06-01 18:18:35 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-06-01 18:18:35 +0000 |
commit | f8d3bf8f5206c7084bd9e639394c15716562a041 (patch) | |
tree | 95030c802594ef1f585e9022211e9e2350571902 /gdb/testsuite/gdb.cp/local.exp | |
parent | 285d560d3afdd33d59c7f9ee0abe6e854df299e4 (diff) | |
download | gdb-f8d3bf8f5206c7084bd9e639394c15716562a041.zip gdb-f8d3bf8f5206c7084bd9e639394c15716562a041.tar.gz gdb-f8d3bf8f5206c7084bd9e639394c15716562a041.tar.bz2 |
2010-05-25 Michael Snyder <msnyder@vmware.com>
* gdb.cp/annota2.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/annota3.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/anon-union.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/cplusfuncs.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/demangle.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/formatted-ref.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/local.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/method.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/misc.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/namespace.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/ovldbreak.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/pr-1023.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/ref-types.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/templates.exp: Replace uses of send_gdb / gdb_expect.
* gdb.cp/userdef.exp: Replace uses of send_gdb / gdb_expect.
Diffstat (limited to 'gdb/testsuite/gdb.cp/local.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/local.exp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp index fa7e3e8..7f1633c4 100644 --- a/gdb/testsuite/gdb.cp/local.exp +++ b/gdb/testsuite/gdb.cp/local.exp @@ -176,9 +176,9 @@ gdb_test "up" ".*main.*" "up from marker2" # Make sure that `Local' isn't in scope here; it's local to foobar. # setup_kfail "gdb/825" -send_gdb "ptype Local\n" + set eol "\[\t \]*\[\r\n\]+\[\t \]*" -gdb_expect { +gdb_test_multiple "ptype Local" "Local out of scope" { -re "No symbol \"Local\" in current context.*${gdb_prompt} $" { pass "Local out of scope" } @@ -193,12 +193,6 @@ gdb_expect { # gcc 3.X abi-2 -gstabs+ kfail gdb/825 "Local out of scope" } - -re ".*${gdb_prompt} $" { - fail "Local out of scope" - } - timeout { - fail "Local out of scope (timeout)" - } } @@ -237,15 +231,22 @@ gdb_expect { # # chastain 2004-01-02 -send_gdb "ptype InnerLocal\n" -gdb_expect { - -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 1)" } - -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 2)" } - -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" } - -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" } - -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]* int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 5)" } - -re ".*$gdb_prompt $" { fail "ptype InnerLocal" } - timeout { fail "(timeout) ptype InnerLocal" } +gdb_test_multiple "ptype InnerLocal" "ptype InnerLocal" { + -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { + pass "ptype InnerLocal (pattern 1)" + } + -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { + pass "ptype InnerLocal (pattern 2)" + } + -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { + pass "ptype InnerLocal (old HP aCC)" + } + -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { + pass "ptype InnerLocal (old HP aCC)" + } + -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]* int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*\}.*$gdb_prompt $" { + pass "ptype InnerLocal (pattern 5)" + } } #--- @@ -268,15 +269,16 @@ gdb_expect { # class support, but once we fix PR gdb/482, we should delete this # test. -send_gdb "ptype NestedInnerLocal\n" -gdb_expect { - -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" } - -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" } - -re "No symbol \"NestedInnerLocal\" in current context\.\r\n$gdb_prompt $" { - pass "ptype NestedInnerLocal" - } - -re ".*$gdb_prompt $" { fail "ptype NestedInnerLocal" } - timeout { fail "(timeout) ptype NestedInnerLocal" } +gdb_test_multiple "ptype NestedInnerLocal" "ptype NestedInnerLocal" { + -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { + pass "ptype NestedInnerLocal" + } + -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { + pass "ptype NestedInnerLocal" + } + -re "No symbol \"NestedInnerLocal\" in current context\.\r\n$gdb_prompt $" { + pass "ptype NestedInnerLocal" + } } set re_class "((struct|class) InnerLocal::NestedInnerLocal \{${ws}public:|struct InnerLocal::NestedInnerLocal \{)" |