![]() |
gdb , setting break point for c++ methods ?
Hi there !
I do not underestand how to correctly set breakpoints with gdb for a c++ application. The bits i am interested in are in calendar_backend. For example, I would like to get a break poing whenever i reach CMulticalendar::importIcsFileData: [sbox-FREMANTLE_X86: ~/dev/test-cal/test1] > run-standalone.sh gdb ./test GNU gdb (GDB) 6.8.50.20090417 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... (gdb) set args ./sample.ical (gdb) b CMulticalendar::importIcsFileData the class CMulticalendar does not have any method named importIcsFileData Hint: try 'CMulticalendar::importIcsFileData<TAB> or 'CMulticalendar::importIcsFileData<ESC-?> (Note leading single quote.) Any idea what i am doing wrong ? |
Re: gdb , setting break point for c++ methods ?
ouch... i should have read the "note leading single quote" .
I have been puzzled by since since yesterday evening, and i just find it 10 seconds after i posted here.... |
Re: gdb , setting break point for c++ methods ?
Actually, i still have a problem, the leading single quote trick did not work for ICalConverter::importEventDateEnd
(gdb) b ICalConverter::importEventDateEnd Can't find member of namespace, class, struct, or union named "ICalConverter::importEventDateEnd" Hint: try 'ICalConverter::importEventDateEnd<TAB> or 'ICalConverter::importEventDateEnd<ESC-?> (Note leading single quote.) (gdb) b 'ICalConverter::importEventDateEnd here, tabs show nothing. any help is appreciated. |
Re: gdb , setting break point for c++ methods ?
Quote:
So: b 'CalConverter::importEventDateEnd and then press Tab (two tabs to show all matching functions). Note that in c++, arguments are added to the functions, something like foo(int,char*). Also namespaces needs to be added, so for 'namespace Foo { foo(int, char*); }' you need to write in gdb 'Foo::foo(int,char*)' |
All times are GMT. The time now is 21:09. |
vBulletin® Version 3.8.8