Skip to content

issue with ctrl+c in -g mode #86

@nickdesaulniers

Description

@nickdesaulniers

if I use ctrl+c in gdb mode, I get a crash:

(gdb) c
Continuing.
^Cqemu-system-ppc: terminating on signal 2
[Inferior 1 (process 1) exited normally]
(gdb) Traceback (most recent call last):
  File "/android1/boot-utils/boot-qemu.py", line 807, in <module>
    launch_qemu(config)
  File "/android1/boot-utils/boot-qemu.py", line 773, in launch_qemu
    subprocess.run(gdb_cmd, check=False)
  File "/usr/lib/python3.10/subprocess.py", line 505, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "/usr/lib/python3.10/subprocess.py", line 1146, in communicate
    self.wait()
  File "/usr/lib/python3.10/subprocess.py", line 1209, in wait
    return self._wait(timeout=timeout)
  File "/usr/lib/python3.10/subprocess.py", line 1943, in _wait
    (pid, sts) = self._try_wait(0)
  File "/usr/lib/python3.10/subprocess.py", line 1901, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

but if I ps -ef | grep gdb then send that process a SIGINT kill -SIGINT <pid> I get the expected output:

(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0xfff0b37c in ?? ()

This is important because it's common to halt the machine to grab a back trace via ctrl+c then bt in gdb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions