This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: RFA: patch to ignore C++ method conversion errors
- To: nsd at cygnus dot com
- Subject: Re: RFA: patch to ignore C++ method conversion errors
- From: dan at cgsoftware dot com (Daniel Berlin+list.gdb-patches)
- Date: 30 Mar 2000 18:38:51 -0500
- Cc: gdb-patches at sourceware dot cygnus dot com
- References: <200003302327.XAA08910@nog.bosbc.com>
- Reply-To: dan at cgsoftware dot com
nsd@cygnus.com writes:
> Hi,
>
> When GDB tries to handle a command like "call foo.method()", it walks
> through foo's methods, calling check_stub_method() on each method until
> finding one with the correct prototype.
>
> check_stub_method() calls parse_and_eval_type(), which calls error() if it
> encounters any surprises. As a result, "call foo.method()" can fail due
> to problems with some other method in the same class.
>
> For example, if a program containing the following is compiled with STABS
> info and a non-debugging libstdc++:
>
> #include <iostream>
>
> class Foo {
> public:
> void method1(ostream *);
> void method2();
> } foo;
>
> then "ostream" isn't present in the STABS symbol table, which makes "call
> foo.method2()" fail with the following error:
>
> No symbol "ostream" in current context.
>
> Here's a simple fix which wraps the parse_and_eval_type() call within
> catch_errors() and disables error messages during that call.
>
> There are no regressions on sparc-sun-solaris2.5.1. It actually seems to
> fix a pthreads regression; I haven't investigated why.
>
> Okay to apply this, Dan?
>
Yup, please do.