From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6742 invoked by alias); 12 Apr 2013 06:55:53 -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 6732 invoked by uid 89); 12 Apr 2013 06:55:52 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 12 Apr 2013 06:55:52 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UQXtm-0005Kl-Bs from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 11 Apr 2013 23:55:50 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 11 Apr 2013 23:55:49 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Thu, 11 Apr 2013 23:55:46 -0700 Message-ID: <5167AFF3.2050508@codesourcery.com> Date: Fri, 12 Apr 2013 12:35:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Subject: Re: [PATCH 4/7] range stepping: gdb References: <1363006291-13334-1-git-send-email-yao@codesourcery.com> <1365648222-12540-1-git-send-email-yao@codesourcery.com> <1365648222-12540-5-git-send-email-yao@codesourcery.com> <51666804.6060903@codesourcery.com> In-Reply-To: <51666804.6060903@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-04/txt/msg00370.txt.bz2 On 04/11/2013 03:36 PM, Yao Qi wrote: > It is incorrect to copy address to buffer via phex_nz here and > somewhere else in remote.c. We should use remote_address_masked first > to mask the CORE_ADDR and then call hexnumstr to copy address to > buffer. Here is an updated one. After a further thought, I decide to withdraw the updated patch 4/7, and keep using the original V2 patch 4/7. The comments of variable 'remote_address_size' say: /* This variable sets the number of bits in an address that are to be sent in a memory ("M" or "m") packet. Normally, after stripping leading zeros, the entire address would be sent. This variable restricts the address to REMOTE_ADDRESS_SIZE bits. HISTORY: The initial implementation of remote.c restricted the address sent in memory packets to ``host::sizeof long'' bytes - (typically 32 bits). Consequently, for 64 bit targets, the upper 32 bits of an address was never sent. Since fixing this bug may cause a break in some remote targets this variable is principly provided to facilitate backward compatibility. */ static unsigned int remote_address_size; variable 'remote_address_size' has only effect on memory packet and breakpoint packet (it is not documented, but actually used). Address in these packets should be masked by remote_address_masked, and address in new packets should not be, because the stub supports these new packets should be able to parse address correctly. -- Yao (齐尧)