scripts: west_commands: runners: openocd: Fix debugging with TUI

Prevent server output when running gdb with --tui to prevent garbled
console output.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-12-10 19:08:06 +01:00 committed by Benjamin Cabé
commit 4d1d8a77a7

View file

@ -396,7 +396,12 @@ class OpenOcdBinaryRunner(ZephyrBinaryRunner):
self.print_gdbserver_message() self.print_gdbserver_message()
if command in ('attach', 'debug'): if command in ('attach', 'debug'):
self.run_server_and_client(server_cmd, gdb_cmd) server_proc = self.popen_ignore_int(server_cmd, stderr=subprocess.DEVNULL)
try:
self.run_client(gdb_cmd)
finally:
server_proc.terminate()
server_proc.wait()
elif command == 'rtt': elif command == 'rtt':
self.print_rttserver_message() self.print_rttserver_message()
server_proc = self.popen_ignore_int(server_cmd) server_proc = self.popen_ignore_int(server_cmd)