From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10901 invoked by alias); 11 Nov 2014 18:44:15 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 10851 invoked by uid 48); 11 Nov 2014 18:44:14 -0000 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/17579] New: can't set breakpoint using demangled name Date: Tue, 11 Nov 2014 18:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q4/txt/msg00229.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17579 Bug ID: 17579 Summary: can't set breakpoint using demangled name Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: breakpoints Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org I'm afraid I don't have a simple reproducer for this. I built firefox trunk ("mozilla-central") with debugging enabled and optimization disabled. Then I started gdb on libxul.so. Next I tried to set a breakpoint: (gdb) break 'js::baseops::SetPropertyHelper<(js::ExecutionMode)1>(js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType, JS::Handle, JS::Handle, JS::Handle, js::baseops::QualifiedBool, JS::MutableHandle, bool)' (I actually did this via TAB completion, so I know gdb knows about this symbol...) However gdb doesn't like it: Function "js::baseops::SetPropertyHelper<(js::ExecutionMode)1>(js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType, JS::Handle, JS::Handle, JS::Handle, js::baseops::QualifiedBool, JS::MutableHandle, bool)" not defined. Make breakpoint pending on future shared library load? (y or [n]) n But the symbol is definitely defined. In fact I can print it and disassemble the address: (gdb) p 'js::baseops::SetPropertyHelper<(js::ExecutionMode)1>(js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType, JS::Handle, JS::Handle, JS::Handle, js::baseops::QualifiedBool, JS::MutableHandle, bool)' $1 = {bool (js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType, js::HandleNativeObject, JS::HandleObject, JS::HandleId, js::baseops::QualifiedBool, JS::MutableHandleValue, bool)} 0x558389d (js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType, JS::Handle, JS::Handle, JS::Handle, js::baseops::QualifiedBool, JS::MutableHandle, bool)> (gdb) disassemble 0x558389d Dump of assembler code for function js::baseops::SetPropertyHelper<(js::ExecutionMode)1>(js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType, JS::Handle, JS::Handle, JS::Handle, js::baseops::QualifiedBool, JS::MutableHandle, bool): 0x000000000558389d <+0>: push %rbp 0x000000000558389e <+1>: mov %rsp,%rbp 0x00000000055838a1 <+4>: push %r12 0x00000000055838a3 <+6>: push %rbx [...] Setting the breakpoint works fine if I use the mangled name or file:line. -- You are receiving this mail because: You are on the CC list for the bug.