From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32071 invoked by alias); 26 Nov 2011 23:42:33 -0000 Received: (qmail 32059 invoked by uid 22791); 26 Nov 2011 23:42:32 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,TW_DR X-Spam-Check-By: sourceware.org Received: from elasmtp-galgo.atl.sa.earthlink.net (HELO elasmtp-galgo.atl.sa.earthlink.net) (209.86.89.61) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Nov 2011 23:42:19 +0000 Received: from [70.170.59.51] (helo=macbook2.local) by elasmtp-galgo.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1RURsw-000818-Oz for gdb-patches@sourceware.org; Sat, 26 Nov 2011 18:42:18 -0500 Message-ID: <4ED17954.7070602@earthlink.net> Date: Sat, 26 Nov 2011 23:42:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix build on sparc (remote.c/tracepoints) References: <20111126.143855.1966723588620210024.davem@davemloft.net> <20111126201404.GA24943@adacore.com> <20111126205107.GB24943@adacore.com> In-Reply-To: <20111126205107.GB24943@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da94058831959c8dac0bbf7968e3e9bb5d9f3350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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: 2011-11/txt/msg00717.txt.bz2 On 11/26/11 12:51 PM, Joel Brobecker wrote: >> gdb/ChangeLog: >> >> * remote.c (remote_get_tracepoint_status): Delete addrbuf >> local variable. Avoid use of sprintf_vma. > Lucky me I didn't delete the patch before David called me on it! > Heh, I sit down from around-the-house tasks thinking to commit my fix, and Joel has it in hand already! There is one tweak I would suggest: - sprintf_vma (addrbuf, loc->address); - sprintf (rs->buf, "qTP:%x:%s", tp->number_on_target, addrbuf); + sprintf (rs->buf, "qTP:%x:%s", tp->number_on_target, + phex_nz (loc->address, + gdbarch_addr_bit (target_gdbarch) / 8)); Just use phex_nz (loc->address, 0) here, its builtin sizeof calculation should be satisfactory. Stan