Is it possible in gdb to go to a line before the currently executing line. e.g:
void my_fun( somePtrType** arr,int start,int end)
{
// arr is an array of p
If your setup code for arr is just above "line a" (a very commonly scenario), you can do it like this:
tbreak myfilename.c:123 (line 123 is the start of setup code for arr) then
jump 123
The "tbreak" prevents gdb from continuing (resuming) the program after the jump.
then you can step through the setup code or just set a breakpoint at "line a" and continue