diff --git a/tools/ade b/tools/ade index 474320dca6a3f1f6282038b908e778936bb8212e..7df08396323fa8c47806b8dfa1c9b0d53bda735a 100755 --- a/tools/ade +++ b/tools/ade @@ -21,6 +21,7 @@ import pathlib import paramiko import re import shutil +import signal import stat import struct import subprocess @@ -235,11 +236,17 @@ class Debugger: self.project.install(debugdir) cmds = self._get_commands(server, debugdir, libdir) - args = ['gdb'] + args = ['gdb-multiarch'] for cmd in cmds: args.append('-ex') args.append(cmd) - os.execv('/usr/bin/gdb', args) + # While running gdb ignore SIGINT such that it gets passed on to gdb + # (e.g. for stopping the remote execution) without affecting ade. + signal.signal (signal.SIGINT, signal.SIG_IGN) + p = subprocess.Popen(args) + p.wait() + signal.signal (signal.SIGINT, signal.SIG_DFL) + class Simulator: