This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/17579] New: can't set breakpoint using demangled name


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::NativeObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>,
js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, 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::NativeObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>,
js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, 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::NativeObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>,
js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, bool)' 
$1 = {bool (js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType, 
    js::HandleNativeObject, JS::HandleObject, JS::HandleId, 
    js::baseops::QualifiedBool, JS::MutableHandleValue, 
    bool)} 0x558389d
<js::baseops::SetPropertyHelper<(js::ExecutionMode)1>(js::ExecutionModeTraits<(js::ExecutionMode)1>::ContextType,
JS::Handle<js::NativeObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>,
js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, 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::NativeObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>,
js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]