public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Iain Buclaw <ibuclaw@gdcproject.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 5/5] Fix for D demangling in GDB
Date: Thu, 09 Jan 2014 21:54:00 -0000	[thread overview]
Message-ID: <87zjn47ref.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CABOHX+fr7hyD0WM-=1G4zcoJH61uPiE9ezYSYmKuUoqvZnLmvA@mail.gmail.com>	(Iain Buclaw's message of "Thu, 9 Jan 2014 13:12:55 +0000")

>>>>> "Iain" == Iain Buclaw <ibuclaw@gdcproject.org> writes:

Iain>         * d-lang.h (d_parse_symbol): Add declaration.
Iain>         * d-lang.c (extract_identifiers)
Iain>         (extract_type_info): Remove functions.
Iain>         (d_demangle): Use d_parse_symbol implemented in d-support.c to
Iain>         demangle D symbols.
Iain>         * d-support.c: New file.

The usual approach in cases like this is to do a "pure move" patch to
move the functions to another file, followed by a second patch to
implement the fixes.

It's also worth noting that with a bit more work you could push the D
demangler into libiberty (see ada_demangle there) and then get
demangling from "nm" and the other binutils.

Iain> +proc catch_demangling_errors {command} {
Iain> +    if {[catch $command result]} {
Iain> +	puts "ERROR: demangle.exp: while running $command: $result"
Iain> +    }
Iain> +}

Iain> +    # Using catch_demangling_errors this way ensures that, if one of
Iain> +    # the functions raises a Tcl error, then it'll get reported, and
Iain> +    # the rest of the functions will still run.
Iain> +    catch_demangling_errors test_d_demangling

I don't think this stuff is needed.  Usually we just let Tcl errors keep
going, since ordinarily they represent bugs in the test case.  Is there
a particular failure you were seeing?

Iain> +
Iain> +} else {
Iain> +    warning "D demangling tests suppressed."

I think "unsupported" instead of "warning" here.

Tom

  reply	other threads:[~2014-01-09 21:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 13:13 Iain Buclaw
2014-01-09 21:54 ` Tom Tromey [this message]
2014-01-10 13:24   ` Iain Buclaw
2014-01-10 14:51     ` Iain Buclaw
2014-01-10 21:43       ` Tom Tromey
2014-01-11 20:08         ` Iain Buclaw
2014-01-10 15:05     ` Iain Buclaw
2014-01-10 21:45       ` Tom Tromey
2014-01-11 20:18         ` Iain Buclaw
2014-01-13 20:04           ` Tom Tromey
2014-01-18 18:24             ` Iain Buclaw
2014-01-10 21:22     ` Tom Tromey
2014-01-10 23:09       ` Iain Buclaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjn47ref.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ibuclaw@gdcproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).