From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6882 invoked by alias); 19 May 2005 02:23:16 -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 5355 invoked from network); 19 May 2005 02:22:59 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 19 May 2005 02:22:59 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j4J2Mwb4031217 for ; Wed, 18 May 2005 22:22:59 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j4J2MwO29824; Wed, 18 May 2005 22:22:58 -0400 Received: from ballpeen.sfbay.redhat.com (ballpeen.sfbay.redhat.com [172.16.24.33]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id j4J2Mua8017502; Wed, 18 May 2005 22:22:57 -0400 Received: from ballpeen.sfbay.redhat.com (ballpeen.sfbay.redhat.com [127.0.0.1]) by ballpeen.sfbay.redhat.com (8.13.1/8.13.1) with ESMTP id j4J2Muk6008227; Wed, 18 May 2005 19:22:56 -0700 Received: (from rth@localhost) by ballpeen.sfbay.redhat.com (8.13.1/8.13.1/Submit) id j4J2MuI8008226; Wed, 18 May 2005 19:22:56 -0700 X-Authentication-Warning: ballpeen.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Thu, 19 May 2005 03:03:00 -0000 From: Richard Henderson To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: Question: Checking register value in buffer Message-ID: <20050519022256.GA8204@redhat.com> References: <20050519020443.GP1462@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050519020443.GP1462@adacore.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-05/txt/msg00461.txt.bz2 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. r~