This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: C++ namespace test patch


Daniel Berlin wrote:
> 
> This fixes the ordering to be in line with the new result.
> I'm no dejagnu expert, i'd like to actually change it to not depend on
> the ordering at all.
> Is there any way to do this?
> >From what i understand, it only keeps what didn't match after the
> match, so i can't do:
> 
> -re ".*AAA::xyzq"
> {
>         -re ".*BBB::xyz"
>          {
>             etc
> 
> }
> 
> because if BBB::xyz appears before AAA::xyzq, it'll fail.
> Is my understanding incorrect?
> 

You can have the two patterns at the same level.  If it does not match the
first the second is tried and so on.

I believe you have only two cases: ordered and unordered, right?

So just keep the old one and add the new (preferably before the old).

F.






> Index: gdb.c++/namespace.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/namespace.exp,v
> retrieving revision 1.1
> diff -c -3 -p -r1.1 namespace.exp
> *** namespace.exp       2000/06/05 20:47:28     1.1
> --- namespace.exp       2000/11/03 03:04:14
> *************** gdb_expect {
> *** 116,122 ****
>   setup_xfail hppa*-*-*11* CLLbs14869
>   send_gdb "info func xyzq\n"
>   gdb_expect {
> !    -re "All functions.*File.*namespace.cc:\r\nint AAA::A_xyzq\\(int\\);\r\nint BBB::B_xyzq\\(int\\);\r\nchar AAA::xyzq\\(char\\);\r\nchar BBB::xyzq\\(char\\);\r\nchar BBB::CCC::xyzq\\(char\\);\r\nchar BBB::Class::xyzq\\(char\\);\r\n$gdb_prompt $" {
>          pass "info func xyzq"
>      }
>      -re ".*$gdb_prompt $" { fail "info func xyzq" }
> --- 116,122 ----
>   setup_xfail hppa*-*-*11* CLLbs14869
>   send_gdb "info func xyzq\n"
>   gdb_expect {
> !    -re "All functions.*File.*namespace.cc:\r\nint AAA::A_xyzq\\(int\\);\r\nchar AAA::xyzq\\(char\\);\r\nint BBB::B_xyzq\\(int\\);\r\nchar BBB::CCC::xyzq\\(char\\);\r\nchar BBB::Class::xyzq\\(char\\);\r\nchar BBB::xyzq\\(char\\);\r\n$gdb_prompt $" {
>          pass "info func xyzq"
>      }
>      -re ".*$gdb_prompt $" { fail "info func xyzq" }

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]