Re: [RFA] fix disassemble foo::bar::~bar

Tom Tromey
2013-02-22T19:15:48Z

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> Another option is to use the c++ name parser:

Keith> diff --git a/gdb/valops.c b/gdb/valops.c
Keith> index 93c09d8..b006b49 100644
Keith> --- a/gdb/valops.c
Keith> +++ b/gdb/valops.c
Keith> @@ -3160,7 +3160,7 @@ destructor_name_p (const char *name, struct type
Keith> *type)
Keith> {
Keith> if (name[0] == '~')
Keith> {
Keith> - const char *dname = type_name_no_tag_or_error (type);
Keith> + const char *dname = cp_func_name (type_name_no_tag_or_error (type));
Keith> const char *cp = strchr (dname, '<');
Keith> unsigned int len;

Keith> The above patch fixes Doug's test cases and also is regression-free on
Keith> native x86_64-unknown-linux (Fedora 15).

I tend to think this is preferable. At least, as long as we have to
keep destructor_name_p.

This patch is ok with me, if it includes Doug's test case, though I'd
like to hear from Doug about it as well.

Tom