From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9964 invoked by alias); 19 May 2005 03:07:11 -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 9555 invoked from network); 19 May 2005 03:07:08 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 19 May 2005 03:07:08 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DYbNI-0007xz-Go; Wed, 18 May 2005 23:07:04 -0400 Date: Thu, 19 May 2005 03:26:00 -0000 From: Daniel Jacobowitz To: Richard Henderson Cc: Joel Brobecker , gdb-patches@sources.redhat.com Subject: Re: Question: Checking register value in buffer Message-ID: <20050519030704.GA30535@nevyn.them.org> Mail-Followup-To: Richard Henderson , Joel Brobecker , gdb-patches@sources.redhat.com References: <20050519020443.GP1462@adacore.com> <20050519022256.GA8204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050519022256.GA8204@redhat.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00464.txt.bz2 On Wed, May 18, 2005 at 07:22:56PM -0700, Richard Henderson wrote: > On Thu, May 19, 2005 at 12:04:44PM +1000, Joel Brobecker wrote: > > LONGEST rav = extract_signed_integer (buf, 8) > > > > and then do the test using integer arithmetics. But then I'm not guarantied > > that LONGEST is at least 64bit long, am I. > > It had better be, or the rest of alpha_next_pc is broken too. > > Since it isn't, or isn't reported to be, you might as well > assume it is large enough. > > > How are these sort of checks usually done in GDB? > > In gcc-land we have a "need_64bit_hwint" bit in config.gcc, and it > is set for targets that require the equivalent of LONGEST be at > least 64 bits, or we error out of configure. > > Dunno what's done in gdb. Because GDB doesn't have the same performance concerns with LONGEST that GCC does with H_W_I, it's the biggest thing we can find. Joel, the definitions in defs.h are pretty clear - it will only be smaller than 64-bit if we're really strapped for a 64-bit type, and if that's the case, there's no way you're loading 64-bit ELF files. -- Daniel Jacobowitz CodeSourcery, LLC