From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11157 invoked by alias); 21 Jun 2004 15:05:05 -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 11141 invoked from network); 21 Jun 2004 15:05:04 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.189) by sourceware.org with SMTP; 21 Jun 2004 15:05:04 -0000 Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BcQM3-0003Uy-00; Mon, 21 Jun 2004 17:05:03 +0200 Received: from [217.235.218.249] (helo=[217.235.218.249]) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1BcQM3-0001nU-00; Mon, 21 Jun 2004 17:05:03 +0200 Message-ID: <40D6F901.3010008@kay-mueller.de> Date: Mon, 21 Jun 2004 15:05:00 -0000 From: Michael Mueller User-Agent: Mozilla/5.0 MIME-Version: 1.0 To: Mark Kettenis CC: gdb-patches@sources.redhat.com, binutils@sources.redhat.com Subject: Re: [RFC]: patch #2 for Sun C compiled target programs References: <40D32489.9070503@kay-mueller.de> <200406182159.i5ILxF9G001540@elgar.kettenis.dyndns.org> In-Reply-To: <200406182159.i5ILxF9G001540@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:acfe4e233830c7fd36d26ada4c2bf87e X-SW-Source: 2004-06/txt/msg00479.txt.bz2 Mark Kettenis wrote: > Date: Fri, 18 Jun 2004 19:21:13 +0200 > From: Michael Mueller > > For Sun C compiled 64 bit target programs "print localvar" does not work > (PR gdb/1669). > > I verified this against these compiler versions: > > Sun C 5.5 2003/03/12 > Forte Developer 7 C 5.4 2002/03/09 > Sun WorkShop 6 update 2 C 5.3 2001/05/15 > Sun WorkShop 6 2000/04/07 C 5.1 > > Would it be difficult for you to test with GCC too? I tested with gcc 3.4 and found no problem. > Sorry but that change is unacceptable. It's an obvious hack and might > break other targets. It's not at all clear what values are supposed > to be sign-extended and what values are not, as mentioned in the > thread cited by you. I did not expect this. Of curse it's just a hack. Sorry for the misunderstanding. > > The real problem is that dbxread.c was initially written as 32-bit > only code. The sign-extension problem you're seeing here can also be > interpreted as a 64-bit-dirty issue. So how can it be fixed? > > *** Problem 2 ************************************************* > > Function sparc64_frame_base_address in sparc64-tdep.c needs to be fixed: > > /* ??? Should we take BIAS into account here? */ > return cache->base; > > > The answer to the question in comment is yes, see the appended patch. > > That sounds reasonable. I'll commit that bit if it works with > GCC/DWARF too. I debugged gcc3.4/dwarf. It does not call sparc64_frame_base_address. (I assume dwarf uses a location expression of it's own to describe a fp based address + BIAS as the location of a stack variable.) > > Mark >