User forums > Help

Unexpected behavior of Step into option while debugging segfault

(1/1)

quastor:
I'm trying to debug a segfault in my project the cause of which is in a known function and encountering an unexpected behavior of the debugger.
My main() function has one breakpoint at the first line and includes several calls to functions either from other .c files.
When I use the Step into option with a function located in another file, the IDE behaves as if I hit Next line and just executes the function at once.


--- Code: ---int main(int argc, char **argv){
int n = argc;
while(--argc){
preproc(argv[n-argc]); /*just skips*/
proc(argv[n-argc]); /*just skips*/
write_code_to(argv[n-argc]); /*here is the segfault, also skips and just throws the segfault*/
}

return 0;
}

--- End code ---

If it matters, I use a custom makefile with a single make command: $make -f $makefile
What are possible reasons and ways to fix?

ollydbg:

--- Quote from: quastor on July 21, 2022, 08:06:50 pm ---When I use the Step into option with a function located in another file, the IDE behaves as if I hit Next line and just executes the function at once.

--- End quote ---

Here are my suggestions:
1, can you show us the full debug log?
2, what happens if those two source files are inside a cbp file, I mean not using the custom makefile method.

Navigation

[0] Message Index

Go to full version