From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13165 invoked by alias); 11 Dec 2008 08:57:59 -0000 Received: (qmail 13154 invoked by uid 22791); 11 Dec 2008 08:57:58 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Dec 2008 08:57:14 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id B2EED457D2; Thu, 11 Dec 2008 09:57:11 +0100 (CET) From: Andreas Schwab To: Paul Pluzhnikov Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [patch] Fix a glitch in debugging 32-bit process with 64-bit GDB. References: <20081209013252.9E1C83A6B2E@localhost> <20081209020744.GA11173@caradoc.them.org> <8ac60eac0812081842l6ac5344fw2fd57011d3dfef42@mail.gmail.com> <20081209133408.GA16288@caradoc.them.org> <20081210111322.GC20054@adacore.com> <8ac60eac0812100758i586c66eak533680a6eb07459c@mail.gmail.com> <8ac60eac0812101520x76366795ieea6afb6d48fb129@mail.gmail.com> X-Yow: .. I see TOILET SEATS... Date: Thu, 11 Dec 2008 08:57:00 -0000 In-Reply-To: <8ac60eac0812101520x76366795ieea6afb6d48fb129@mail.gmail.com> (Paul Pluzhnikov's message of "Wed, 10 Dec 2008 15:20:37 -0800") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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-12/txt/msg00198.txt.bz2 Paul Pluzhnikov writes: > 2008-12-10 Paul Pluzhnikov > > * dbxread.c (stabs_seek): Sign-extend 32-bit STABS values for > 64-bit GDB. > Index: dbxread.c > =================================================================== > RCS file: /cvs/src/src/gdb/dbxread.c,v > retrieving revision 1.98 > diff -u -p -u -r1.98 dbxread.c > --- dbxread.c 1 Oct 2008 16:41:27 -0000 1.98 > +++ dbxread.c 10 Dec 2008 22:41:35 -0000 > @@ -855,7 +855,7 @@ stabs_seek (int sym_offset) > (intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type); \ > (intern).n_other = 0; \ > (intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc); \ > - if (bfd_get_sign_extend_vma (abfd)) \ > + if (sizeof (bfd_vma) > 4 || bfd_get_sign_extend_vma (abfd)) \ > (intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value); \ > else \ > (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value); \ I don't think this does the right thing for genuine addresses beyond 0x80000000. You can do that only for values that are truely signed, which stabs has no way to express. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."