This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Patch for PR gdb/2477
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: ppluzhnikov at google dot com (Paul Pluzhnikov)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 15 Jul 2008 20:52:14 +0200 (CEST)
- Subject: 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