From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23484 invoked by alias); 10 Apr 2012 16:28:29 -0000 Received: (qmail 23462 invoked by uid 22791); 10 Apr 2012 16:28:23 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Apr 2012 16:28:04 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3AGRkEM025396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Apr 2012 12:27:46 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3AGRhw9020435 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 10 Apr 2012 12:27:45 -0400 Message-ID: <4F845F7E.1010603@redhat.com> Date: Tue, 10 Apr 2012 16:28:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Patrick Monnerat CC: insight@sourceware.org, roland@onevision.com Subject: Re: [PATCH] print format does not match argument type References: <4F8443D1.9080105@onevision.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2012-q2/txt/msg00007.txt.bz2 On 04/10/2012 09:08 AM, Patrick Monnerat wrote: > I think I've found the universal (well: almost!) coding: > > Use format "%llx" and cast arg to (unsigned long long): This is C99 and > supported by MSVC, at least since 2005. Not OK for C89 :-( To be honest, I didn't even know that we did this. [The register code is some of the oldest code in insight.] Passing host memory addresses into the interpreter and back again as a string is just plain evil. The C code should create a map/hashtable and store the pointers to the types itself; then pass a string representation of the key into the interpreter. But for now, if your suggestion works (Roland will hopefully verify), then I say we go with that for the time being. Thank you! Keith