[PATCH v5] Add negative repeat count to 'x' command
Thomas Preudhomme
thomas.preudhomme@foss.arm.com
Thu Aug 11 14:08:00 GMT 2016
Hi Pedro,
On 11/08/16 13:51, Thomas Preudhomme wrote:
>>
>> The find-strings-backwards algorithm just looks back for '\0' to
>> find string boundaries. Looks like it just happens that in your
>> case, the TestStrings array is immediately preceded by the
>> tail of _fini, with no gap in between.
>>
>> Try this. It's not strictly correct to assume that the linker
>> places the objects consecutively, but it's probably safe
>> in practice.
>
> The patch works indeed. Thanks for your quick answer.
While trying this I noticed that the following 2 tests fail when running with
qemu-user (it works with qemu-system):
gdb.base/examine-backward.exp: address zero boundary: examine 6 bytes backward
gdb.base/examine-backward.exp: address zero boundary: examine 3 bytes backward
from 0x0
They fail with:
0xfffffffd: Cannot access memory at address 0xfffffffd
I suppose these two tests should also be guarded or maybe have several expected
results.
Best regards,
Thomas
More information about the Gdb-patches
mailing list