tags:

views:

88

answers:

1

Hello all,

I am using standard template libraries along with boost. I want to debug code using cgdb. But I just want to debug my code while doing next and step in cgdb, like right now it enters the code in other libraries whereas I want it should just return or step into the code which I have coded and wrote down.

Is there any way to make this happen.

+1  A: 

It should be noted that CGDB is just a front end to GDB, so your question really only is in regards to GDB. The answer to your problem is relatively simple. When you want to step into your function type 's' (for 'step'). If GDB takes you somewhere you don't want to be (ie. an inlined function in a header file), type 'f' (for finish) and then type 's' again. Continue this process until you are in the function you want to be in. Yes, this is annoying, but this is the behavior of GDB.

Chris Wilson