This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/5] Fix for D demangling in GDB
- From: Iain Buclaw <ibuclaw at gdcproject dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 10 Jan 2014 23:09:12 +0000
- Subject: Re: [PATCH 5/5] Fix for D demangling in GDB
- Authentication-results: sourceware.org; auth=none
- References: <CABOHX+fr7hyD0WM-=1G4zcoJH61uPiE9ezYSYmKuUoqvZnLmvA at mail dot gmail dot com> <87zjn47ref dot fsf at fleche dot redhat dot com> <CABOHX+dXQQjpE2-S3wM5Qcrq=i29HewDzRptXcrn0=T+EVjOrg at mail dot gmail dot com> <87vbxr4jmk dot fsf at fleche dot redhat dot com>
On 10 January 2014 21:22, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Iain" == Iain Buclaw <ibuclaw@gdcproject.org> writes:
>
> Tom> It's also worth noting that with a bit more work you could push the D
> Tom> demangler into libiberty (see ada_demangle there) and then get
> Tom> demangling from "nm" and the other binutils.
>
> Iain> That sounds like a good plan. I'll keep a note to get round to do that.
>
> Just FYI - I'm not sure if you know this or not, but libiberty is
> canonically maintained in the GCC tree, so if you do this, it has to be
> submitted there first. Then it will be merged (either by me, or by
> whoever else seems to be doing (semi-)automated merges) into
> binutils-gdb.git. So, it's a little bit of a pain.
>
Incidentally, I have a assignment form for GCC that has been sitting
in my inbox waiting to be signed and sent off. This will probably
give me an excuse to get round to do that.
I've ported this demangler over to libiberty, changing obstack ->
string where appropriate. Whilst happy at the result, I think I'll
wait until I've finished off demangling D templates. Which is the only
part of demangling where things get a bit hairy (and also why I chose
to move demangling in a separate file).
> Iain> This was copied from cp-demangle.exp. I believe it is written that
> Iain> way so that all demangle tests are ran, rather than stopping at the
> Iain> first error?
>
> The C++ one only works proc-by-proc. If a test fails with a Tcl error
> -- which btw isn't the same as just an ordinary failure, those don't
> cause particular problems -- then it will run the subsequent procs.
> Your test file only has a single proc; and anyway I'm guessing that code
> in the C++ test is not useful anyway. I think dropping it from your
> patch is safe.
>
OK, thanks for the explaination.
Regards
Iain.