This is the mail archive of the
mailing list for the GDB project.
Re: RFA: GCC stabs don't contain prototype info
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: Daniel Berlin <dan at cgsoftware dot com>
- Cc: Michael Snyder <msnyder at cygnus dot com>,Daniel Jacobowitz <drow at mvista dot com>, <gdb-patches at sources dot redhat dot com>
- Date: 27 Nov 2001 23:50:27 -0500
- Subject: Re: RFA: GCC stabs don't contain prototype info
- References: <Pine.LNX.email@example.com>
Daniel Berlin <firstname.lastname@example.org> writes:
> > FYI, it is not only stabs that fails this test. I've got a recent
> > elf/dwarf target that also fails it.
> Err, it shouldn't.
> Unless you really mean dwarf and not dwarf2.
> GCC adds DW_AT_prototyped to prototyped functions.
> And gdb consumes it.
With Dwarf 2, GDB always has enough information to do the right
thing, but it doesn't use it.
At the moment, a function type can have its TYPE_FLAG_PROTOTYPED flag
set or clear. Stabs doesn't set it reliably; Dwarf 2 does. But the
code which checks this flag doesn't know where its setting came from,
so it doesn't know whether it should trust it or not. There's an
arch-specific macro which says whether it should. *gag*