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: [RFA] Patch for PR gdb/2477


Paul Pluzhnikov wrote:

> I've also added a "non-zero but invalid" pointer test at ~0UL.
> Is there a "canonical" invalid address I should be testing instead?

This test fails on spu-elf:

+  gamma.c1 = 0; gamma.c2 = (A *) ~0UL;

+gdb_test "p acp->c2" "\\(A \\*\\) 0xf+"

because our pointer-to-address conversion mimics the wrap-around
behaviour of the SPU hardware's local store access: all addresses
will wrap around modulo 256 KB.

The c2 pointer will therefore show up as 0x3ffff:

p acp->c2^M
$10 = (A *) 0x3ffff^M
(gdb) FAIL: gdb.cp/class2.exp: p acp->c2

Any suggestions how to fix this?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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