forked from espressif/esp-idf
test: panic: use gdb-no-python to have ability to send signals
This commit is contained in:
@@ -160,20 +160,21 @@ class PanicTestDut(IdfDut):
|
|||||||
Runs GDB and connects it to the "serial" port of the DUT.
|
Runs GDB and connects it to the "serial" port of the DUT.
|
||||||
After this, the DUT expect methods can no longer be used to capture output.
|
After this, the DUT expect methods can no longer be used to capture output.
|
||||||
"""
|
"""
|
||||||
|
gdb_args = ['--nx', '--quiet', '--interpreter=mi2']
|
||||||
if self.is_xtensa:
|
if self.is_xtensa:
|
||||||
gdb_path = f'xtensa-{self.target}-elf-gdb'
|
gdb_path = 'xtensa-esp-elf-gdb-no-python' # TODO: GCC-311
|
||||||
|
gdb_args = [f'--mcpu={self.target}'] + gdb_args
|
||||||
else:
|
else:
|
||||||
gdb_path = 'riscv32-esp-elf-gdb'
|
gdb_path = 'riscv32-esp-elf-gdb-no-python' # TODO: GCC-311
|
||||||
try:
|
try:
|
||||||
from pygdbmi.constants import GdbTimeoutError
|
from pygdbmi.constants import GdbTimeoutError
|
||||||
default_gdb_args = ['--nx', '--quiet', '--interpreter=mi2']
|
gdb_command = [gdb_path] + gdb_args
|
||||||
gdb_command = [gdb_path] + default_gdb_args
|
|
||||||
self.gdbmi = GdbController(command=gdb_command)
|
self.gdbmi = GdbController(command=gdb_command)
|
||||||
pygdbmi_logger = attach_logger()
|
pygdbmi_logger = attach_logger()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# fallback for pygdbmi<0.10.0.0.
|
# fallback for pygdbmi<0.10.0.0.
|
||||||
from pygdbmi.gdbcontroller import GdbTimeoutError
|
from pygdbmi.gdbcontroller import GdbTimeoutError
|
||||||
self.gdbmi = GdbController(gdb_path=gdb_path)
|
self.gdbmi = GdbController(gdb_path=gdb_path, gdb_args=gdb_args)
|
||||||
pygdbmi_logger = self.gdbmi.logger
|
pygdbmi_logger = self.gdbmi.logger
|
||||||
|
|
||||||
# pygdbmi logs to console by default, make it log to a file instead
|
# pygdbmi logs to console by default, make it log to a file instead
|
||||||
|
Reference in New Issue
Block a user