This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
How to set a breakpoint at a C++ class function?
- From: Meryl Silverburgh <silverburgh dot meryl at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 16 Mar 2009 22:35:49 -0700
- Subject: How to set a breakpoint at a C++ class function?
HI,
I am tyring to set a break point at a c++ class function.
at a gdb prompt, I did:
(gdb) break RenderBlock::calcBlockPrefWidths
Can't find member of namespace, class, struct, or union named
"RenderBlock::calcBlockPrefWidths"
Hint: try 'RenderBlock::calcBlockPrefWidths<TAB> or
'RenderBlock::calcBlockPrefWidths<ESC-?>
It did not work.
But when I do
(gdb_ break RenderBlock.cpp:4148 (using line number), it works.
(gdb) break RenderBlock.cpp:4148
Breakpoint 1 at 0xaa1fdfd8: file
webkit/WebCore/rendering/RenderBlock.cpp, line 4148.
Can you please tell me why?
Thank you.