From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 936 invoked by alias); 5 Jan 2003 16:33:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 929 invoked from network); 5 Jan 2003 16:33:16 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by 209.249.29.67 with SMTP; 5 Jan 2003 16:33:16 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id h05GX2C18873; Sun, 5 Jan 2003 10:33:02 -0600 Date: Sun, 05 Jan 2003 16:33:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200301051633.h05GX2C18873@duracef.shout.net> To: ac131313@redhat.com, drow@mvista.com Subject: Re: RFC: gdb_test_multiple Cc: gdb-patches@sources.redhat.com X-SW-Source: 2003-01/txt/msg00180.txt.bz2 Daniel Jacobowitz writes: set msg "breakpoint on Foo::Bar" gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" { ... fail "$msg ... } This can be improved to: set msg "breakpoint on Foo::Bar" gdb_test_multiple "break Foo::Bar" $msg { ... fail $msg ... } The grammar would still allow different messages for the explicit messages given by the caller versus the internal messages generated by gdb_test_multiple. But the normal idiom would have one $msg. gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" \ "Breakpoint at .*\[\r\n\]$gdb_prompt $" { pass $msg } \ "Bang." { kfail "gdb/90211" $msg } Err, I like my treatment of $msg better, I dislike subroutines that create variables like this for little inferior blocks of code. But maybe I have poor taste in TCL style. Michael C