From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31021 invoked by alias); 21 Apr 2018 20:13:22 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 31007 invoked by uid 89); 21 Apr 2018 20:13:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=81, 8.1, glibc227, glibc-2.27 X-HELO: mail-wr0-f179.google.com Received: from mail-wr0-f179.google.com (HELO mail-wr0-f179.google.com) (209.85.128.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 21 Apr 2018 20:13:20 +0000 Received: by mail-wr0-f179.google.com with SMTP id w3-v6so31060649wrg.2 for ; Sat, 21 Apr 2018 13:13:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=NnTaCkZ0EuUk9CYS1FvxKW5JVfHsbo+VqiV/F8qMvzQ=; b=GL1h0Nrm9qJvjRu662/Y9Wm4FFwUVnKedUcRc7CLAETqxwjNuIPIzVF3zF9PsS+/92 ynn+0+fqKrHOY8KRBKAuPalkUTxkGVPWjvXhRNvCuF7cUU2HCTrm78E4FIFOW3qHdJvd sdEOozkOiezoiiQw0wT6hCinXFUJjFmzY/zjvi2Y1AskKCrBJBIgLLpxpzs8Q/uYqvv7 f4F08zbH5WrmIIydpbVSF4/syQ10cuVPsXDFqTuau+yKQW3j2w1GU/pPTT0MTd9vFRiM 06RFbTa16YsmX9tTnVt5oV6Fq4ckDRuYyBnrqDqoQmUUBlwViJ45duRaFkVo9xDRXgkV 5QyA== X-Gm-Message-State: ALQs6tCvykJ7AnQeHEh+V3A58iIombM83b3mhwaNxB5HL3bjO11tuZY2 iJNVg4A9YKBf3hmUJYCNkNgKWd56 X-Google-Smtp-Source: AIpwx4/4ek6Ukh4Azhzd3usUQsUP6kaniXjIN0GFt6+baXkHhauC8Ep6vHBrLS1uBd4gNrkS1ZwxWw== X-Received: by 10.80.244.181 with SMTP id s50mr20546259edm.262.1524341598146; Sat, 21 Apr 2018 13:13:18 -0700 (PDT) Received: from jvdlux ([185.51.72.244]) by smtp.gmail.com with ESMTPSA id p1sm4484681edm.0.2018.04.21.13.13.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Apr 2018 13:13:17 -0700 (PDT) From: Jason Vas Dias To: gdb@sourceware.org Subject: 'b ::new' causes gdb 8.1 to coredump ? Date: Sat, 21 Apr 2018 20:57:00 -0000 Message-ID: <4lk4tj1i.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00012.txt.bz2 I was just debugging a noddy C++ test program, (Linux x86_64: g++ 5.4.0, glibc-2.27, binutils-2.30, gdb-8.1 ) and tried: Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd828, envp=0x7fffffffd838) at test/tTuple.C:75 75 { MyT t; (gdb) b ::new cp-namespace.c:177: 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) Please answer y or n. cp-namespace.c:177: 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) n This is a bug, please report it. For instructions, see: . cp-namespace.c:177: 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) n Command aborted. (gdb) b ::new(std::size_t) Function "::new(std::size_t)" not defined. (gdb) b operator ::new(size_t) Function "operator ::new(size_t)" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) b operator ::new(std::size_t) Function "operator ::new(std::size_t)" not defined. Make breakpoint pending on future shared library load? (y or [n]) n Is there something I'm not getting or does gdb's C++ symbol handling leave alot to be desired ? How to set a breakpoint at the ONE definition @ : /usr/include/c++/5.4.0/new @ line 98 : } // namespace std ... void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) __attribute__((__externally_visible__)); (END QUOTE) This symbol has the fully qualified name 'operator ::new::(std::size_t)' - so I think GDB should be able to mangle and look it up this name in libstdc++, especially as it has the '__externally_visible__' attribute. Why can't it ? I think on 'b ::new' , if on a terminal, gdb should present a list of matches for ::new(.*) , and allow user to select which to break at . Would this be too difficult to implement ? Thanks & Best Regards, Jason