This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v5] Add negative repeat count to 'x' command




On 11/08/16 17:32, Pedro Alves wrote:
On 08/11/2016 03:08 PM, Thomas Preudhomme wrote:


While trying this I noticed that the following 2 tests fail when running
with qemu-user (it works with qemu-system):

So this is emulating a no-MMU configuration, right?  Since gdb managed to
read from address 0.  Otherwise, the problem is in is_address_zero_readable.

qemu-system-user would be no MMU, qemu-user would have an MMU *but* the qemu gdb stub would bypass lots of memory access checks AFAIK.



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.

If you try reading from that address directly, does it work?
E.g. "x 0xfffffffd".

Same error: 0xfffffffd:     Cannot access memory at address 0xfffffffd


Wondering whether gdb is actually trying to read from 0xfffffffffffffffd,
and that failing somewhere.  The address print routine (paddress) trims
the upper 32-bits of CORE_ADDR when debugging a 32-bit target.

But probably this just means that that physical address really
does not exist on the emulated system, and so qemu's stub returns
error when gdb tries to read off of it?

Yes, I believe that's the case. For some reason reading from 0 works but not from the end of the address space. Why not use a multiple regex matching and make the test UNSUPPORTED with a new regex on this error message?

This is just a suggestion, I am not very familiar with how GDB deals with this kind of issue generally but have noticed testcases with several -re patterns.

Best regards,

Thomas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]