This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [unwind-20030108-branch] Add sentinel-frame + misc
On Sat, Jan 11, 2003 at 01:14:47PM -0500, Andrew Cagney wrote:
> >@@ -555,8 +522,14 @@
> >> If the value isn't here AND a value is needed, try the next inner
> >> most frame. */
> >>
> >>+struct frame_unwind_cache
> >>+{
> >>+ void *regs[1];
> >>+};
> >>+
> >
> >
> >I know it makes some type-checking simpler, but naming all your private
> >types
> >the same thing is a real nuisance when using this lame "GDB" thing on
> >the code afterwards. Must we?
>
> Looks like more bugs in gdb :-(
It's hardly a bug; more of a deep interface shortcoming. Consider:
File A declares a type 'struct foo'.
File B declares a type 'struct foo'.
Header C forward declares 'struct foo;' and 'struct foo *get_foo ()'.
File D includes Header C and uses 'get_foo'.
I'm sitting in File D, and I want to look in the debugger at this
opaque unwind cache. There's no possible way to associate it with
either struct foo.
That's why I think the construct should be avoided; if one of them is
A_foo and the other is B_foo, and we do a bit of casting, then at least
I can dump the one I want.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer