Re: [RFA] Patch for PR gdb/2477

Ulrich Weigand
2008-07-15T18:52:49Z

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