How to set a breakpoint at a C++ class function?

Meryl Silverburgh silverburgh.meryl@gmail.com
Tue Mar 17 05:35:00 GMT 2009


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.



More information about the Gdb mailing list