GNU gdb for C++ applications

For C programmers, using GDB for C++ applications could be daunting task. I have learned following lessons:

    • Always pass fully qualified name of a function such as namespace_1::class_1::function1
    • You can’t put a breakpoint on a template function.
      • The easiest way is to put the breakpoint on the line number of the template function.
    • C++ application’s core is legible if you interpret it ignoring name mangling of functions.
 ==> ns::class_a::functionB()

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: