From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11451 invoked by alias); 2 Jul 2012 17:29:14 -0000 Received: (qmail 11396 invoked by uid 22791); 2 Jul 2012 17:29:12 -0000 X-SWARE-Spam-Status: No, hits=-7.5 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; Mon, 02 Jul 2012 17:28:55 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q62HSpmL005478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Jul 2012 13:28:51 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q62HSn1c029223; Mon, 2 Jul 2012 13:28:50 -0400 Message-ID: <4FF1DA50.6020704@redhat.com> Date: Mon, 02 Jul 2012 17:29:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Doug Evans CC: gdb-patches@sourceware.org, stan@codesourcery.com Subject: Re: [commit] fix gdbserver build failure on amd64-linux References: <20120702171241.5E9E11E1392@ruffy2.mtv.corp.google.com> In-Reply-To: <20120702171241.5E9E11E1392@ruffy2.mtv.corp.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-07/txt/msg00019.txt.bz2 On 07/02/2012 06:12 PM, Doug Evans wrote: > Hi. > > fyi, I committed this. > > 2012-07-02 Doug Evans > > * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from > pointer to int. > > Index: mem-break.c > =================================================================== > RCS file: /cvs/src/src/gdb/gdbserver/mem-break.c,v > retrieving revision 1.34 > diff -u -p -r1.34 mem-break.c > --- mem-break.c 2 Jul 2012 15:29:38 -0000 1.34 > +++ mem-break.c 2 Jul 2012 17:10:13 -0000 > @@ -22,6 +22,7 @@ > #include "server.h" > #include "regcache.h" > #include "ax.h" > +#include > > const unsigned char *breakpoint_data; > int breakpoint_len; > @@ -929,8 +930,8 @@ gdb_no_commands_at_breakpoint (CORE_ADDR > return 0; > > if (debug_threads) > - fprintf (stderr, "at 0x%s, bp command_list is 0x%x\n", > - paddress (where), (int) bp->command_list); > + fprintf (stderr, "at 0x%s, bp command_list is 0x%lx\n", > + paddress (where), (long) (uintptr_t) bp->command_list); That's not correct on e.g., Win64, where sizeof long < sizeof pointer. The right fix is to either use host_address_to_string, or %p, if acceptable on all hosts. > return (bp->command_list == NULL); > } > > -- Pedro Alves