Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Keith Seitz <keiths@redhat.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Remove support for old mangling schemes
Date: Wed, 09 Jan 2019 04:36:00 -0000	[thread overview]
Message-ID: <6bbbc56c6c8e7db98242bda10af0db02@polymtl.ca> (raw)
In-Reply-To: <e8dcdefe-5f8f-6e1b-116f-f4bf166d55c6@redhat.com>

On 2019-01-08 19:24, Keith Seitz wrote:
> On 1/8/19 3:22 PM, Simon Marchi wrote:
>> An upcoming sync with gcc's libiberty [1] will remove support for old
>> mangling schemes (GNU v2, Lucid, ARM, HP and EDG).  It will remove the
>> cplus_demangle_opname function, so we need to get rid of its usages in
>> GDB (it's a GNU v2 specific function).
> 
> Thank you so much for doing this. I was working on my own version of 
> this
> before other work got in the way.

Thanks for looking at mine then!

> Your patch looks just about identical to mine, and I had a few 
> additional
> questions about my own patch that I needed to answer.
> 
> I would think this should have/deserve doc and NEWS changes.

I agree.

> The manual talks about several demangling-related features which
> raised questions for me about the general support for gnu-v2 code. If
> libiberty is removing support for v2 demangling, how useful will GDB be
> without the ability to demangle v2 symbols? Should we deprecate or 
> remove
> that, too? /me opens can of worms

Yes, probably.  The goal of this patch is to unblock the sync'ing with 
gcc's libiberty (remove usages of cplus_demangle_opname), but we can 
certainly do some cleanup later.

> WRT docs specifically, "set cp-abi" and "set demangling-style" still 
> carry
> either direct or indirect mentions of the different ABIs/mangling 
> schemes in
> the documentation that are now no longer valid, e.g., "lucid" and 
> "arm".
> Some comments in demangle.c do, too.

Well, this patch has the effect of removing those demangling styles, so 
it should certainly update the doc for "set demangle-style".  But it 
doesn't touch the cp-abi, so I won't change that part in this patch 
(although as you noted, gnu-v2 will probably be useless if binaries with 
this ABI also use the "gnu" demangling style).

> The help system references that exist today/right now, I presume, will 
> disappear
> when the libiberty patch goes back in (when libiberty_demanglers is 
> updated), so
> I *think* there's nothing to do there.

Indeed, "set demangle-style" and "set demande-style<TAB>" are both 
automatically updated.

> Now the bonus. :-)
> 
>> diff --git a/gdb/testsuite/gdb.cp/demangle.exp 
>> b/gdb/testsuite/gdb.cp/demangle.exp
>> index 698231b82b4..9231b54f787 100644
>> --- a/gdb/testsuite/gdb.cp/demangle.exp
>> +++ b/gdb/testsuite/gdb.cp/demangle.exp
>> -
>> -
>>  proc catch_demangling_errors {command} {
>>      if {[catch $command result]} {
>>  	puts "ERROR: demangle.exp: while running $command: $result"
>> @@ -1593,10 +183,7 @@ proc do_tests {} {
>>      # Using catch_demangling_errors this way ensures that, if one of
>>      # the functions raises a Tcl error, then it'll get reported, and
>>      # the rest of the functions will still run.
>> -    catch_demangling_errors test_lucid_style_demangling
>> -    catch_demangling_errors test_gnu_style_demangling
>> -    catch_demangling_errors test_arm_style_demangling
>> -    catch_demangling_errors test_hp_style_demangling
>> +    catch_demangling_errors test_gnuv3_style_demangling
>> 
> 
> Please consider getting rid of catch_demangling_errors and removing the
> "error" calls in set_demangling_style. They are not needed, and in 
> fact,
> they cause the test suite to hang if that error is ever called. I ran
> across this while prepping my patch, and planned to remove it.
> 
> Of course, this (nit) is sorta orthogonal, so please feel free to ask
> me to do it!
> ;-)

Right, I noticed the hang too.  I was thinking of doing a pass of 
cleanup/modernization on that file after, as I spotted some other things 
(such as unused "global").  I won't ask you to do it nor prevent you :P.

Simon


  parent reply	other threads:[~2019-01-09  4:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 23:22 Simon Marchi
2019-01-09  3:38 ` Eli Zaretskii
2019-01-09  4:12   ` Simon Marchi
2019-01-09 16:54     ` Tom Tromey
     [not found] ` <e8dcdefe-5f8f-6e1b-116f-f4bf166d55c6@redhat.com>
2019-01-09  4:36   ` Simon Marchi [this message]
2019-01-09 16:59   ` Tom Tromey
2019-01-09 18:53     ` Pedro Alves
2019-01-09  4:50 ` [PATCH v2] " Simon Marchi
     [not found]   ` <83h8ehj0wi.fsf@gnu.org>
2019-01-09 15:59     ` Simon Marchi
2019-01-09 16:14       ` Eli Zaretskii
2019-01-09 16:18         ` Simon Marchi
2019-01-09 17:02           ` Keith Seitz
2019-01-09 18:08             ` Simon Marchi

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=6bbbc56c6c8e7db98242bda10af0db02@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=simon.marchi@ericsson.com \
    /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