From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26262 invoked by alias); 20 Dec 2002 18:55:37 -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 26239 invoked from network); 20 Dec 2002 18:55:33 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by 209.249.29.67 with SMTP; 20 Dec 2002 18:55:33 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id gBKIaf5h026334; Fri, 20 Dec 2002 13:36:41 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id gBKIaewX026330; Fri, 20 Dec 2002 13:36:40 -0500 To: Fernando Nasser CC: gdb-patches@sources.redhat.com Subject: [Jim Blandy ] RFA: Check that `Local' is not in scope when it shouldn't be From: Jim Blandy Date: Fri, 20 Dec 2002 10:56:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.92 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-12/txt/msg00591.txt.bz2 --=-=-= Content-length: 33 Ping on this test suite patch. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Content-length: 4802 X-From-Line: imap Thu Nov 14 23:41:47 2002 Return-Path: X-Sieve: cmu-sieve 2.0 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gAEKRJq03101 for ; Thu, 14 Nov 2002 15:27:19 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id gAEKRID13551 for ; Thu, 14 Nov 2002 15:27:18 -0500 Received: from sources.redhat.com (sources.redhat.com [209.249.29.67]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id gAEK3xw09635 for ; Thu, 14 Nov 2002 15:03:59 -0500 Received: (qmail 24304 invoked by alias); 14 Nov 2002 20:27:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Delivered-To: mailing list gdb-patches@sources.redhat.com Received: (qmail 24265 invoked from network); 14 Nov 2002 20:27:09 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by sources.redhat.com with SMTP; 14 Nov 2002 20:27:09 -0000 Received: (from jimb@localhost) by zenia.red-bean.com (8.11.6/8.11.6) id gAEKBG721472; Thu, 14 Nov 2002 15:11:16 -0500 To: gdb-patches@sources.redhat.com Subject: RFA: Check that `Local' is not in scope when it shouldn't be From: Jim Blandy Date: 14 Nov 2002 15:11:15 -0500 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.92 Lines: 109 Xref: zenia.red-bean.com mail.gdb.patches:20670 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-length: 2739 See http://sources.redhat.com/ml/gdb/2002-11/msg00153.html for the problem being addressed. I've filed a new PR for the problem this patch uncovers, and used its number in the kfail for the new test here. gdb/testsuite/ChangeLog: 2002-11-14 Jim Blandy * local.exp: Don't expect Local to be in scope in main; it's local to foobar. Check for it there, and check that it's not present in main. * local.cc (marker2): New function. (foobar): Call marker1. (main): Call marker2 instead of marker1. Index: gdb/testsuite/gdb.c++/local.cc =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/local.cc,v retrieving revision 1.2 diff -c -r1.2 local.cc *** gdb/testsuite/gdb.c++/local.cc 10 Apr 2002 03:52:21 -0000 1.2 --- gdb/testsuite/gdb.c++/local.cc 14 Nov 2002 20:20:27 -0000 *************** *** 4,9 **** --- 4,12 ---- { } + void marker2 (void) + { + } int foobar (int x) { *************** *** 20,25 **** --- 23,30 ---- static Local l1; char c; + marker1 (); + l.loc1 = 23; c = l.loc_foo('x'); *************** *** 56,61 **** il.ilc = 'b'; il.ip = &c; ! marker1(); } } --- 61,66 ---- il.ilc = 'b'; il.ip = &c; ! marker2(); } } Index: gdb/testsuite/gdb.c++/local.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/local.exp,v retrieving revision 1.9 diff -c -r1.9 local.exp *** gdb/testsuite/gdb.c++/local.exp 27 May 2002 18:00:14 -0000 1.9 --- gdb/testsuite/gdb.c++/local.exp 14 Nov 2002 20:20:28 -0000 *************** *** 67,73 **** continue } ! gdb_test "up" ".*main.*" "up from marker1" # Local classes in g++ get names like "main.1::InnerLocal", just like local # static variables. Some targets use "___" instead of ".". --- 67,73 ---- continue } ! gdb_test "up" ".*foobar.*" "up from marker1" # Local classes in g++ get names like "main.1::InnerLocal", just like local # static variables. Some targets use "___" instead of ".". *************** *** 110,115 **** --- 110,128 ---- -re ".*$gdb_prompt $" { fail "ptype Local" } timeout { fail "(timeout) ptype Local" } } + + if ![runto 'marker2'] then { + perror "couldn't run to marker2" + continue + } + + 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" + gdb_test "ptype Local" "No symbol \"Local\" in current context.*" \ + "Local out of scope (gdb/825)" + # DTS CLLbs14316 and CLLbs17058 # coulter - I added a clause for HP's aCC compiler. We print out the type --=-=-=--