From: Luke Kenneth Casson Leighton Date: Wed, 8 Jul 2020 16:18:29 +0000 (+0100) Subject: add option to qemu to break at known alternate address X-Git-Tag: div_pipeline~156 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=570c6c220452bc982598e0053ea9e300e0e94251;p=soc.git add option to qemu to break at known alternate address --- diff --git a/src/soc/simulator/qemu.py b/src/soc/simulator/qemu.py index b39ada05..d1045f15 100644 --- a/src/soc/simulator/qemu.py +++ b/src/soc/simulator/qemu.py @@ -96,7 +96,7 @@ class QemuController: self.qemu_popen.stdin.close() -def run_program(program, initial_mem=None): +def run_program(program, initial_mem=None, extra_break_addr=None): q = QemuController(program.binfile.name) q.connect() # Run to the start of the program @@ -114,6 +114,9 @@ def run_program(program, initial_mem=None): q.break_address(0x20000000 + program.size()) # or to trap q.break_address(0x700) + # or to alternative (absolute) address) + if extra_break_addr: + q.break_address(extra_break_addr) q.gdb_continue() return q