From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23259 invoked by alias); 22 May 2012 15:25:20 -0000 Received: (qmail 23210 invoked by uid 22791); 22 May 2012 15:25:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,LOTS_OF_MONEY,TW_XF X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 May 2012 15:25:04 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 8C1ED29005D; Tue, 22 May 2012 17:25:05 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6bLyK9dWJyFv; Tue, 22 May 2012 17:25:05 +0200 (CEST) Received: from province.act-europe.fr (province.act-europe.fr [10.10.0.214]) by mel.act-europe.fr (Postfix) with ESMTP id 79E2E29005C; Tue, 22 May 2012 17:25:05 +0200 (CEST) Received: by province.act-europe.fr (Postfix, from userid 560) id 93275164973; Tue, 22 May 2012 17:24:59 +0200 (CEST) Date: Tue, 22 May 2012 15:25:00 -0000 From: Jerome Guitton To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC] setting the raw content of a register Message-ID: <20120522152459.GQ51051@adacore.com> References: <1337697398-25866-1-git-send-email-guitton@adacore.com> <4FBBA8C8.4030909@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FBBA8C8.4030909@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) 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: 2012-05/txt/msg00827.txt.bz2 Pedro Alves (palves@redhat.com): > What about : > > p $f14 = {double} {0xFFF0000000000050} I've been testing with a bareboard PPC, and this needs malloc; let me check how it would work on a target with malloc. Any chance that it would give me something different than my macro "raw_to_double" (that uses the stack instead of the heap)? define raw_to_double set $stack_content = *((long long *) ($sp - 8)) set *((long long *) ($sp - 8)) = $arg0 x/2x ((double *) ($sp - 8)) p *((double *) ($sp - 8)) set *((long long *) ($sp - 8)) = $stack_content end (gdb) raw_to_double 0xFFF0000000000050 0x1fffd8: 0xfff00000 0x00000050 $3 = -nan(0x000000050) (gdb) set $f14 = $ (gdb) info registers $f14 f14 nan(0x100000001) (raw 0x7ff0000100000001)