public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/15830] New: upgrade "maint demangle" to a regular user command.
@ 2013-08-12 12:55 palves at redhat dot com
  2015-01-11 22:09 ` [Bug gdb/15830] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: palves at redhat dot com @ 2013-08-12 12:55 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15830

            Bug ID: 15830
           Summary: upgrade "maint demangle" to a regular user command.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: palves at redhat dot com

GDB has all the bits necessary internally already for doing the equivalent
of:

  $ echo _ZNSt16nested_exceptionD2Ev | c++filt
  std::nested_exception::~nested_exception()

In fact, it already has such a command -- "maint demangle".
Demangling is something a user will reasonable want to do.  IBWN to expose this
functionality as a regular user command.

-----

>From <http://sourceware.org/ml/gdb/2013-08/msg00052.html>:

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> On 08/09/2013 11:22 AM, Jan Kratochvil wrote:
>> (gdb) maintenance demangle _ZNSt16nested_exceptionD2Ev
>> std::nested_exception::~nested_exception()

Pedro> Interesting.  It seems a pity this is a maintenance
Pedro> command.  Shouldn't we "upgrade" it to a regular user command?

Yeah, though the command as currently formulated is a bit of a pain.  At
least, I usually forget to "set lang c++" first and then have to go
back.  Similarly, sometimes it would be nice to be able to specify the
language as an argument.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/15830] upgrade "maint demangle" to a regular user command.
  2013-08-12 12:55 [Bug gdb/15830] New: upgrade "maint demangle" to a regular user command palves at redhat dot com
@ 2015-01-11 22:09 ` cvs-commit at gcc dot gnu.org
  2015-01-12  4:33 ` cvs-commit at gcc dot gnu.org
  2015-06-19 16:39 ` dje at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-01-11 22:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15830

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Doug Evans <devans@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=439250fbacfc212a5959b4b5a53ecfee91dfb866

commit 439250fbacfc212a5959b4b5a53ecfee91dfb866
Author: Doug Evans <xdje42@gmail.com>
Date:   Sun Jan 11 14:06:34 2015 -0800

    PR gdb/15830

    gdb/ChangeLog:

        PR gdb/15830
        * NEWS: The "maint demangle" command is renamed as "demangle".
        * demangle.c: #include cli/cli-utils.h, language.h.
        (demangle_command): New function.
        (_initialize_demangle): Add new command "demangle".
        * maint.c (maintenance_demangle): Stub out.
        (_initialize_maint_cmds): Update help text for "maint demangle",
        and mark as deprecated.

    gdb/doc/ChangeLog:

        * gdb.texinfo (Debugging C Plus Plus): Mention "demangle".
        (Symbols): Ditto.
        (Maintenance Commands): Delete docs for "maint demangle".

    gdb/testsuite/ChangeLog:

        * gdb.base/maint.exp: Remove references to "maint demangle".
        * gdb.cp/demangle.exp: Update.  "maint demangle" -> "demangle".
        Add tests for explicitly specifying language to demangle.
        * gdb.dlang/demangle.exp: Ditto.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/15830] upgrade "maint demangle" to a regular user command.
  2013-08-12 12:55 [Bug gdb/15830] New: upgrade "maint demangle" to a regular user command palves at redhat dot com
  2015-01-11 22:09 ` [Bug gdb/15830] " cvs-commit at gcc dot gnu.org
@ 2015-01-12  4:33 ` cvs-commit at gcc dot gnu.org
  2015-06-19 16:39 ` dje at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-01-12  4:33 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15830

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
commit 005e54bb792bc74f1168def16f35078be588871a
Author: Doug Evans <xdje42@gmail.com>
Date:   Sun Jan 11 16:39:46 2015 -0800

    dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.

    gdb/ChangeLog:

        * dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 75b286c..d8c6a14 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2015-01-11  Doug Evans  <xdje42@gmail.com>

+    * dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.
+
+2015-01-11  Doug Evans  <xdje42@gmail.com>
+
     PR gdb/15830
     * NEWS: The "maint demangle" command is renamed as "demangle".
     * demangle.c: #include cli/cli-utils.h, language.h.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 86c3a73..96b2537 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -7704,7 +7704,8 @@ compute_delayed_physnames (struct dwarf2_cu *cu)
       struct fn_fieldlist *fn_flp
     = &TYPE_FN_FIELDLIST (mi->type, mi->fnfield_index);
       physname = dwarf2_physname (mi->name, mi->die, cu);
-      fn_flp->fn_fields[mi->index].physname = physname ? physname : "";
+      TYPE_FN_FIELD_PHYSNAME (fn_flp->fn_fields, mi->index)
+    = physname ? physname : "";
     }
 }

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/15830] upgrade "maint demangle" to a regular user command.
  2013-08-12 12:55 [Bug gdb/15830] New: upgrade "maint demangle" to a regular user command palves at redhat dot com
  2015-01-11 22:09 ` [Bug gdb/15830] " cvs-commit at gcc dot gnu.org
  2015-01-12  4:33 ` cvs-commit at gcc dot gnu.org
@ 2015-06-19 16:39 ` dje at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dje at google dot com @ 2015-06-19 16:39 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15830

dje at google dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dje at google dot com
         Resolution|---                         |FIXED

--- Comment #3 from dje at google dot com ---
"demangle" is now a user command, and takes an optional -l argument to specify
the language.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-19 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12 12:55 [Bug gdb/15830] New: upgrade "maint demangle" to a regular user command palves at redhat dot com
2015-01-11 22:09 ` [Bug gdb/15830] " cvs-commit at gcc dot gnu.org
2015-01-12  4:33 ` cvs-commit at gcc dot gnu.org
2015-06-19 16:39 ` dje at google dot com

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).