This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Now I know why we used to swap builtin_type_void.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jim Blandy <jimb at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Wed, 6 Dec 2006 14:52:27 -0500
- Subject: Now I know why we used to swap builtin_type_void.
(top-gdb) p *builtin_type_void_data_ptr
$24 = {pointer_type = 0x0, reference_type = 0x0, chain = 0x7b50d0,
instance_flags = 0, length = 8, main_type = 0x7b5100}
(top-gdb) p current_gdbarch.ptr_bit
$25 = 32
Because we didn't swap out "void", we followed the cached pointer link
in builtin_type_void when we tried to create a pointer to void. My
initial default gdbarch was 64-bit, because I built a 64-bit GDB
binary. So the cached pointer type is 64-bit.
This is a mess. I think we may need to revert the builtin_type_void
patch unless you have a better idea.
--
Daniel Jacobowitz
CodeSourcery