From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25432 invoked by alias); 19 Nov 2002 19:26:06 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 25417 invoked by uid 71); 19 Nov 2002 19:26:05 -0000 Date: Tue, 26 Nov 2002 12:16:00 -0000 Message-ID: <20021119192605.25416.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Ron Eastman Subject: Re: c++/8542: GBD broken under gcc 3.2 - can't print any local variables or class members Reply-To: Ron Eastman X-SW-Source: 2002-11/txt/msg01005.txt.bz2 List-Id: The following reply was made to PR c++/8542; it has been noted by GNATS. From: Ron Eastman To: karinc@adsmr.co.za, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, drow@mvista.com, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Cc: Subject: Re: c++/8542: GBD broken under gcc 3.2 - can't print any local variables or class members Date: Tue, 19 Nov 2002 11:17:33 -0800 Salutations, I've been having the same problem with gcc 3.2 and gdb... I don't know whether this will be of much use to anyone, but after some amount of experimentation it seems to me that the problem is related in somehow to objects which have destructors (or constructors?). Unfortunately the code I am working on is large and proprietary, so I can't provide you with an example as I would like. What I found --by removing all the code from main() and then adding it back bit by bit--is that a certain point was reached where, if I added just one additional declaration (e.g. "string datapath;") then when compiled and fired up in gdb, the local variables are not visible. Remove that one declaration, and they are. I don't think there was anything wrong with that particular declaration--other string variables were declared further up in main. Furthermore, if instead of "string datapath" I put in "double foo;", then local variables ARE visible. "double" has no destructor. Make it "vector foo;" and the problem returns. I tried several different objects with constructors/destructors and reliably reproduced the problem. Note also that: if I put braces around the declaration ("{string foo;}") then the problem disappeared. I hope this helps. Ron Eastman http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=8542 Ronald G. Eastman Schonfeld Securities LLC 2185 North California Boulevard Suite 320, Walnut Creek, CA 94596 (925) 256-2464 (925) 256-4548 (fax) ron_eastman@schonfeld.com