Reputation: 273
I am using gdb to debug my program and I need to try many combinations of inputs. So to make it easier for me, is there a way to kill the debug if a certain breakpoint hits so I can run it again with a different input?
Upvotes: 3
Views: 719
Reputation: 213526
is there a way to kill the debug if a certain breakpoint hits
You can attach commands to breakpoints. Documentation. You want something like:
break foo # creates breakpoint 1
commands 1
call _exit(1) # causes inferior process to exit.
end
Upvotes: 2