Re: [PATCH 4/7] range stepping: gdb

Yao Qi
2013-04-12T06:55:53Z

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 (é½å°§)