[Bug python/25985] New: Control+C on python-interactive prompt crashes GDB

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug python/25985] New: Control+C on python-interactive prompt crashes GDB

Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25985

            Bug ID: 25985
           Summary: Control+C on python-interactive prompt crashes GDB
           Product: gdb
           Version: 9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: bugmenot at mailinator dot com
  Target Milestone: ---

Reproduce:

* Start gdb
* Enter `pi` (`python-interactive`)
* Press Control+C

Expected behavior: the current line is discarded (similar to how control+C
works in other prompts)
Actual behavior: gdb crashes, without any prompt/warning. (for example, the "A
debugging session is active. Inferior 1 will be killed. Quit anyway?" prompt)


Operating system: Arch Linux

======

In the current version (9.1) it's possible to do nothing on Control+C (and
prevent the crash) with

```
python import signal; signal.signal(signal.SIGINT, signal.SIG_IGN)
```

This will also do nothing on Control+C on the `(gdb)` prompt as well (which can
be a good thing, because Control+C by default does not reset the readline
state, which can be annoying)

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug python/25985] Control+C on python-interactive prompt crashes GDB

Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25985

Christian Biesinger <cbiesinger at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cbiesinger at google dot com

--- Comment #1 from Christian Biesinger <cbiesinger at google dot com> ---
> Control+C by default does not reset the readline state

Is that fixed by
https://sourceware.org/pipermail/gdb-patches/2020-May/168595.html ?

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug python/25985] Control+C on python-interactive prompt crashes GDB

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=25985

--- Comment #2 from John Doe <bugmenot at mailinator dot com> ---
Edit: `signal.signal(signal.SIGINT, signal.SIG_IGN)` will make control+C do
nothing while the inferior process runs (instead of interrupting the process).


Regarding the patch: it may fix the read line reset state bug, but I think it
won't fix this bug.

--
You are receiving this mail because:
You are on the CC list for the bug.