automatically skipping/ignoring external code in gdb [duplicate]
Possible Duplicate:
How to avoid entering library's source files while debugging in Qt Creator with gdb?
anybody know how to tell gdb to only enter code that is in your project? I know it's hard for a debugger to know what is "in the project" and what is a library....but I thought some naive checks could help, eg don't look in any files that aren't in the users home directory. I frequently have code like this:
MyFunction(complexVarable, complexvar); //passed by value
and gdb insists on going through t开发者_JS百科he copy constructors of the two passed values, but all I care about is MyFunction. Any tips? There are two parts to the question,
- ignore code that isn't mine (not in home dir)
- skip copies for function calls.
thanks.
EDIT: btw I use emacs, maybe there are some tools there I missed, but I'm open to using external gdb frontends.
As per my opinion this cannot be done. every project has a flow of data from one function to other. gdb is designed to work on the flow of data. so if your project is somewhere in the middle of the flow,gdb cant help you,since evry function has some purpose to do with the input it gets and output it gives. all you can do is create the same function separately and replicate the scenario as if its running in teh flow by giving the inputs it needs and output it gives.
精彩评论