Summary: | No KeyboardInterrupt exception during gdb.execute | ||
---|---|---|---|
Product: | gdb | Reporter: | Marc Brünink <m> |
Component: | python | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | minor | CC: | tromey |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Marc Brünink
2012-10-05 01:35:19 UTC
The second C-c is delivered to the inferior. It is in the foreground due to "c". Then gdb intercepts that SIGINT via ptrace. So I think this is all expected, at least if I understand it properly. Now, the same thing happens if you attach to a program. This case is maybe more arguable. I think the second C-c should raise a KeyboardInterrupt. At least as long as I don't change how SIGINTs are handled. At the moment it depends on which statement your python script is executing when you hit C-c. You cannot have a single try block and catch C-c. Instead you need a try block and similar code in the stop_handler. I assume a user always expects the same behaviour. Thus, I think it is not optimal that I have to handle C-c at 2 different locations. |