gdb/testsuite: Allow for failure to read some memory addresses
In the gdb.base/examine-backward.exp test script, we check to see if
address zero is readable, and then read memory first forward from
address zero, and then backward from address zero.
The problem is, being able to read address zero does not guarantee
that you'll be able to read from the other end of the address space,
and the test probably shouldn't assume that is the case.
This patch updates the test script so that even if address zero is
known non-readable, we still run the tests, the tests in question are
mostly about, can GDB calculate the correct address to read from, we
can confirm this even if the final read ultimately fails. We also no
longer assume that if address zero is readable, then the other end of
the address space will be readable.
One further change is that, when we examined the memory at address
zero, the regexp used to match the address expected that the zero
address would have two '0' digits as the least significant digits. As
GDB strips leading zeros from addresses this was causing the test to
fail. I've reduced the zero address to a single 0 digit.
gdb/testsuite/ChangeLog:
* gdb.base/examine-backward.exp: Still run tests around address
0x0, even if address 0x0 is not readable. Update the pattern for
matching address 0x0 in expected output.