From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18358 invoked by alias); 8 Apr 2002 18:32:21 -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 18315 invoked from network); 8 Apr 2002 18:32:17 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 8 Apr 2002 18:32:17 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id g38IWFf11265; Mon, 8 Apr 2002 13:32:15 -0500 Date: Mon, 08 Apr 2002 11:32:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200204081832.g38IWFf11265@duracef.shout.net> To: drow@mvista.com Subject: [PATCH] gdb.c++/method.exp: xfail for missing const Cc: gdb-patches@sources.redhat.com X-SW-Source: 2002-04/txt/msg00311.txt.bz2 How about this for printing "this" in a const method? It reports PASS if the required "const" is present. It reports (XFAIL|FAIL) with "missing const" if required "const" is missing. XFAIL if stabs debugging format FAIL if any other debugging format It reports FAIL for any other output. Michael C === # Check access to this pointer # # gcc versions up to 3.0.4 with -gstabs+ do not emit "const" indicators, # so the output is "A *". It should be "const A *" or "const A * const". get_debug_format send_gdb "print this\n" gdb_expect { -re "\\$\[0-9\]* = \\(const (class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { pass "print this in A::bar" } -re "\\$\[0-9\]* = \\((class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { setup_xfail_format "stabs" fail "print this in A::bar (missing const)" } -re ".*$gdb_prompt $" { fail "print this in A::bar" } timeout { fail "(timeout) print this in A::bar" } }