Re: arm_addr_bits_remove

Daniel Jacobowitz
2008-01-24T13:39:19Z

On Thu, Jan 24, 2008 at 12:39:55PM +0000, Pedro Alves wrote:
> Jim Blandy wrote:
>> On Jan 23, 2008 8:53 PM, Pedro Alves wrote:
>>> Would a patch removing this be more acceptable then?
>>
>> I'd certainly be more enthusiastic about it. :)
>>
>
> Well, then, here's one for the review-enthusiasts amongst us. :-)

If you're daring enough, this is OK - this could affect any target
defining gdbarch_addr_bits_remove so keep an eye out in case hppa,
m88k, mips, or s390 break. Please wait another day before checking it
in, in case someone else knows more about it.

I think the original patch should be committed too. Jim objected in
terms of "returning the wrong answer", but that's not really the case.
The 0x2 bit is never an extra piece of information about an address,
like the 0x1 bit is. It's part of the address; just if it happens
to be part of an ARM address, executing code there is unpredictable.

--
Daniel Jacobowitz
CodeSourcery