public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28908] New: Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class
@ 2022-02-18 21:53 msebor at gmail dot com
  2022-02-18 21:54 ` [Bug c++/28908] " msebor at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: msebor at gmail dot com @ 2022-02-18 21:53 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28908
           Summary: Assertion `strstr (name, "::") == NULL' failed.
                    listing member function names of a namespace class
           Product: gdb
           Version: 11.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: msebor at gmail dot com
  Target Milestone: ---

I encountered the following internal error while testing the fix for pr28901. 
The error is with GNU gdb (GDB) Fedora 11.1-5.fc35 but it's reproducible with
trunk.

$ cat t.C && g++ -g3 t.C && gdb -batch -nx -ex "break main" -ex run -ex "print
(N::A*)&b" -ex "list $1->N::A::f" a.out
namespace N {
  struct A { void f () { } };
  struct B: A { };
}

N::B b;

int main ()
{
  b.f ();
}
Breakpoint 1 at 0x40110a: file t.C, line 10.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main () at t.C:10
10        b.f ();
$1 = (N::A *) 0x40401d <b>
../../gdb/cp-namespace.c:178: internal-error: block_symbol
cp_lookup_bare_symbol(const language_defn*, const char*, const block*,
domain_enum, int): Assertion `strstr (name, "::") == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

../../gdb/cp-namespace.c:178: internal-error: block_symbol
cp_lookup_bare_symbol(const language_defn*, const char*, const block*,
domain_enum, int): Assertion `strstr (name, "::") == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Aborted (core dumped)

-- 
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:[~2023-12-30 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18 21:53 [Bug c++/28908] New: Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class msebor at gmail dot com
2022-02-18 21:54 ` [Bug c++/28908] " msebor at gmail dot com
2022-02-24 15:06 ` tromey at sourceware dot org
2023-12-30 15:45 ` ssbssa at sourceware dot org

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