EDIT: thank alot
Im understanding now that I should use gdb
I ask for understand how stack frame working and how change things
exit(0) and goto its not option
How can change that fun 'sec' will return to main? the output will be:
print start main
print this from first
print this from sec
print exit main
void sec()
{
/*change only here */
printf("print this from sec");
}
void first()
{
printf("print this from first");
sec();
printf("dont print this");
}
int main() {
printf("print start main");
first();
printf("print exit main\n");
return 0;
}
I dont want add asm code, only C. I try to find the address of the rbp but I dont know how.