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.
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;
}
If it matters, I use a custom makefile with a single make command:
$make -f $makefileWhat are possible reasons and ways to fix?