From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9482 invoked by alias); 2 Feb 2007 19:14:08 -0000 Received: (qmail 9472 invoked by uid 22791); 2 Feb 2007 19:14:07 -0000 X-Spam-Check-By: sourceware.org Received: from cse-mail.unl.edu (HELO cse-mail.unl.edu) (129.93.165.11) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 02 Feb 2007 19:13:57 +0000 Received: from [129.93.164.247] (cse-witty-01.unl.edu [129.93.164.247]) (authenticated bits=0) by cse-mail.unl.edu (8.13.6/8.13.5) with ESMTP id l12JDpJ3002521 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 2 Feb 2007 13:13:56 -0600 (CST) Message-ID: <45C38D6A.40204@cse.unl.edu> Date: Fri, 02 Feb 2007 19:14:00 -0000 From: Neo User-Agent: Thunderbird 2.0a1 (X11/20060724) MIME-Version: 1.0 To: gdb Subject: GDB crashes when call member function having same name as a local pointer variable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (cse-mail.unl.edu [129.93.165.11]); Fri, 02 Feb 2007 13:13:56 -0600 (CST) X-Virus-Status: Clean X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00019.txt.bz2 hi, I am wondering if it would be a bug. The following is the tiny program I am using to test. This test failed on both gdb 6.5 and 6.6 ========================= #include class foo { private: int _data; public: int data() { return _data; } void bar(); }; void foo::bar() { char * data = NULL; printf("Can you do p data()?\n"); // When let gdb breaks on this statement, "p data()" will cause segmentation fault. } int main(int argc, char ** argv) { foo obj; obj.bar(); return 0; } =================== Do we need to provide some hints to the user such as popping up "this->data()" ? Thanks, Neo -- I would remember that if researchers were not ambitious probably today we haven't the technology we are using!