From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30773 invoked by alias); 26 Jun 2013 16:07:56 -0000 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 Received: (qmail 30763 invoked by uid 89); 26 Jun 2013 16:07:55 -0000 X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,TW_CP autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 26 Jun 2013 16:07:55 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5QG7qSi011723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Jun 2013 12:07:52 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5QG7oNn023171; Wed, 26 Jun 2013 12:07:51 -0400 Message-ID: <51CB11D6.1020306@redhat.com> Date: Wed, 26 Jun 2013 16:11:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: "gdb-patches@sourceware.org" CC: Udma Catalin-Dan-B32721 Subject: Re: gdb 7.6: Fix info mem command for 32 bits host/64 bits target References: <51CB116D.7060009@redhat.com> In-Reply-To: <51CB116D.7060009@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00779.txt.bz2 BTW, $ grep hex_string_custom * | grep long finds: breakpoint.c: /* The longest string possibly returned by hex_string_custom breakpoint.c: strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8)); breakpoint.c: strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8)); Those casts are likewise bogus: static void breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr, int bnum, int have_bnum) { /* The longest string possibly returned by hex_string_custom is 50 chars. These must be at least that big for safety. */ char astr1[64]; char astr2[64]; strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8)); strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8)); if (have_bnum) warning (_("Breakpoint %d address previously adjusted from %s to %s."), bnum, astr1, astr2); else warning (_("Breakpoint address adjusted from %s to %s."), astr1, astr2); } -- Pedro Alves