From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2082 invoked by alias); 5 Aug 2010 22:57:47 -0000 Received: (qmail 2069 invoked by uid 22791); 5 Aug 2010 22:57:46 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.17.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 22:57:40 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.1/8.13.1) with ESMTP id o75Mvcse023758 for ; Thu, 5 Aug 2010 22:57:38 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o75MvbF31798280 for ; Fri, 6 Aug 2010 00:57:37 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o75MvbvP031717 for ; Fri, 6 Aug 2010 00:57:37 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o75MvaE9031710; Fri, 6 Aug 2010 00:57:36 +0200 Message-Id: <201008052257.o75MvaE9031710@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 06 Aug 2010 00:57:36 +0200 Subject: Re: [patch] smart pointer support To: swagiaal@redhat.com (sami wagiaalla) Date: Thu, 05 Aug 2010 22:57:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, tromey@redhat.com In-Reply-To: <4C5B06E5.7090609@redhat.com> from "sami wagiaalla" at Aug 05, 2010 02:45:57 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2010-08/txt/msg00053.txt.bz2 sami wagiaalla wrote: > * infcall.c (call_function_by_hand): Set VALUE_LVAL of the > returned value to lval_memory. > @@ -1026,6 +1026,7 @@ When the function is done executing, GDB will silently stop."), > retval = allocate_value (values_type); > gdbarch_return_value (gdbarch, value_type (function), values_type, > retbuf, value_contents_raw (retval), NULL); > + VALUE_LVAL (retval) = lval_memory; > break; This part looks broken. Setting VALUE_LVAL to lval_memory implies the value actually *has* location information pointing to memory, that is in particular, a memory address. Since this value doesn't have that information, and in general it may not even exist (function return values may be passed in registers), I don't see how this can be valid here. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com