public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "mgaudet at mozilla dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/26122] New: gdb fails to demangle a name
Date: Tue, 16 Jun 2020 15:18:24 +0000	[thread overview]
Message-ID: <bug-26122-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 26122
           Summary: gdb fails to demangle a name
           Product: gdb
           Version: 9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: mgaudet at mozilla dot com
  Target Milestone: ---

Using a locally compiled GDB 9.2, I'm trying to use `skip -rfunction`,
however,according to `set debug skip on`, the regexp is being applied to the
mangled name, not the demangled name: 

```
(gdb) step 
skip: checking if function
_ZN2JS6HandleINS_11PropertyKeyEEC2IS1_EERKNS_6RootedIT_EENSt9enable_ifIXsr3stdE16is_convertible_vIS5_S1_EEiE4typeE
matches regex .*JS::Handle.*...no.
skip: checking if function
_ZN2JS6HandleINS_11PropertyKeyEEC2IS1_EERKNS_6RootedIT_EENSt9enable_ifIXsr3stdE16is_convertible_vIS5_S1_EEiE4typeE
matches regex .*JS::Handle.*...no.
```

This appears to be because the name cannot be demangled by GDB: 

```
(gdb) demangle
_ZN2JS6HandleINS_11PropertyKeyEEC2IS1_EERKNS_6RootedIT_EENSt9enable_ifIXsr3stdE16is_convertible_vIS5_S1_EEiE4typeE 
Can't demangle
"_ZN2JS6HandleINS_11PropertyKeyEEC2IS1_EERKNS_6RootedIT_EENSt9enable_ifIXsr3stdE16is_convertible_vIS5_S1_EEiE4typeE"
```

Gimli-rs cpp_demangle [1] appears to demangle it correctly: 


```
$ /home/matthew/.cargo/bin/cppfilt 
_ZN2JS6HandleINS_11PropertyKeyEEC2IS1_EERKNS_6RootedIT_EENSt9enable_ifIXsr3stdE16is_convertible_vIS5_S1_EEiE4typeE 
JS::Handle<JS::PropertyKey>::Handle<JS::PropertyKey>(std::enable_if<std::is_convertible_v<JS::PropertyKey,
JS::PropertyKey>, int>::type) 
```

[1]: https://github.com/gimli-rs/cpp_demangle

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

             reply	other threads:[~2020-06-16 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 15:18 mgaudet at mozilla dot com [this message]
2020-09-02 16:18 ` [Bug c++/26122] " trass3r at gmail dot com

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=bug-26122-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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).