Automatically skip / ignore external code in gdb

Possible duplicate:
How to avoid entering source library files when debugging in Qt Creator using gdb?

Does anyone know how to tell gdb to only enter the code that is in your project? I know that it is difficult for the debugger to know what is "in the project" and what is a library .... but I thought that some naive checks might help, for example, not looking at files that are not in the users home directory. I often have code like this:

MyFunction(complexVarable, complexvar); //passed by value 

and gdb insists on looking at 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 is not mine (not in the home directory)
  • skip copies for function calls.

thanks.

EDIT: btw I am using emacs, maybe there are some tools that I have missed, but I am open to using gdb external interfaces.

+4
source share
1 answer

In my opinion, this is not possible. Each project has a data stream from one function to another. gdb is designed to work with data stream. therefore, if your project is somewhere in the middle of the stream, gdb cannot help you because the evry function has a specific purpose to make the input it receives and output it. all you can do is create the same function separately and replicate the script as if it were running in a stream, providing the inputs and output it needs.

+1
source

Source: https://habr.com/ru/post/1300367/


All Articles