This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] c++/13615
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Thu, 08 Nov 2012 14:57:02 -0700
- Subject: Re: [RFA] c++/13615
- References: <505119AE.6040401@redhat.com> <87sja4wlqt.fsf@fleche.redhat.com> <506F38C2.4050107@redhat.com>
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> Yeah, the two are rather similar, but not exactly. Nonetheless, with
Keith> much hair-pulling [I haven't much left!], I've been able to modify my
Keith> original patch to fix the problem reported in the above thread. [I did
Keith> not use anything from the suggested patch other than the test case,
Keith> which I've updated a bit.]
Keith> I'm attaching the latest revision of this patch.
Thanks.
Keith> + sym = cp_lookup_symbol_namespace (scope, name,
Keith> + block, domain);
Keith> + if (sym != NULL)
Keith> + return sym;
Keith> +
Keith> + /* A simple lookup failed. Check if the symbol was defined in
Keith> + a base class. */
I wonder if this implements the right search rules.
Suppose you have something like:
namespace N {
typedef double value_type;
struct Base { typedef int value_type; };
struct Derived : public Base { };
}
ptype N::Derived::value_type should print 'int' -- but from the
comment and placement of this code I wonder if it would print 'double'.
Keith> + sprintf (concatenated_name, "%s::%s", base_name, name);
Pierre is trying to replace these with xsnprintf.
Tom