This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFA: patch to ignore C++ method conversion errors


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]