2

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 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.