On 09/25/2013 11:49 PM, Guiu Rocafort wrote:
Hi list !
I'm trying to set a breakpoint in the function cssReader::parseFile() using gdb.
I've tried several’s ways to do that in gdb, including:
"break cssReader::parseFile"
then I read this ( http://stackoverflow.com/questions/6892395/set-breakpoint-for-class-member-f...) and tried:
"break org::w3c::dom::css::parseFile"
I also attempted to use the "file:line" method trying:
"break cssreader.cpp:1591" "break dom/cssreader.cpp:1591"
In the gdb documentation I was not able to find anything related to debugging class methods in C++. I didn't find any useful info in the inkscape debugging wiki page.
So anyone can point me the right way to do this ? Thank you.
Two general debugging tips: 1) Disable optimization by changing all three occurrences of -O2 to -O0 and remove -DFORTIFY_SOURCE . 2) Use qtcreator. By creating a make-based project, you can use qtcreator as a very nice C++ debugging tool, including managing breakpoints and inspecting data via GUI.
Sebastian