lundi 11 octobre 2021

Usage of gdb in jumping from one function to another to provide a trace of the function calls

Is it possible to get gdb to just go from one function to the other. so that it gives me a trace of the functions getting called ?

In the example below, I would love it to go from fn1, fn2, and fn3 alone without going into each of the individual statements within them. Thus providing me a trace of the function calls that happened.

int fn1( )
{
.
.
fn2();
}

void fn2()
{
.
.
float b;
b = fn3();
.
.
}

float fn3()
{
..
.
.
.}

There will be instances where I wouldn't know where the call would stop. Otherwise a backtrace would have helped.

Aucun commentaire:

Enregistrer un commentaire