gcc weirdness
Pav Lucistnik
pav at oook.cz
Fri Aug 29 15:17:22 PDT 2003
What am I missing here?
Let we have a function called popup(). Inside this function there is
this code:
list = get_children(ds, x, TYPE_ELEMENT);
gdb shows these values:
(gdb) print ds
$46 = (Type *) 0x1
(gdb) print x
$47 = 0x86adb80
So far, everything is fine. Now, let step down one frame in gdb:
(gdb) down
#5 0x0808b807 in get_children(ds=0x86adb80, node=0x1, tag_type=TYPE_E...
In the source, there is a
GList* get_children (Type* ds, PtrNode node, enum Types tag_type) {
Do you see ds and node values swapped? The program crashes because of
this swapping. What is wrong? I use gcc-3.3.1 on today's -CURRENT.
--
Pav Lucistnik <pav at oook.cz>
What do we know about love? Love is like a pear. Pear is sweet and have
a specific shape. Try to exactly define the shape of a pear.
-- Marigold: 50 Years Of Poetry
More information about the freebsd-hackers
mailing list