From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30687 invoked by alias); 26 Sep 2008 17:32:30 -0000 Received: (qmail 30663 invoked by uid 22791); 26 Sep 2008 17:32:28 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO qnxmail.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Sep 2008 17:31:57 +0000 Received: from Nebula.ott.qnx.com (nebula.ott.qnx.com [10.42.3.30]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id NAA28495 for ; Fri, 26 Sep 2008 13:31:49 -0400 Received: from [10.42.100.129] ([10.42.100.129]) by Nebula.ott.qnx.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 26 Sep 2008 13:42:12 -0400 Message-ID: <48DD1C8A.7030206@qnx.com> Date: Fri, 26 Sep 2008 17:32:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Aleksandar Ristovski CC: gdb-patches@sources.redhat.com Subject: Re: [patch] Fix SIGSEGV in gdb when printing ctor of non-virtual class References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00519.txt.bz2 Ping? Does this patch make any sense? Aleksandar Ristovski wrote: > Hello, > > I run into a SIGSEGV crash in gdb when printing value of a non-virtual > class' constructor (I got this from IDE asking for a wrong value). > > Example: > > (gdb) print n.Name > > where 'n' is an object of non-virtual class 'Name'. > > > The attached tests demonstrate the problem and propose a fix. > > > Thanks, > > Aleksandar Ristovski > QNX Software Systems > > > > ChangeLog: > > * value.c (value_fn_field): Do not dereference if block does not > exist. > > > testsuite ChangeLog: > > * gdb.cp/cppeval.exp: New test. > * gdb.cp/cppeval.cc: New test case to accompany cppeval.exp. >