tags:

views:

81

answers:

2

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 the copy constructors of the two passed values, but all I care about is MyFunction. Any tips? There are two parts to the question,

  1. ignore code that isn't mine (not in home dir)
  2. 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.

+1  A: 

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.

Vijay Sarathi
left this question out for a few days, and I was afraid this was going to be the answer. thanks n'way
Chris H
A: 

See this answer.

Employed Russian