projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed77d3d
)
add option to qemu to break at known alternate address
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 8 Jul 2020 16:18:29 +0000
(17:18 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 8 Jul 2020 16:18:29 +0000
(17:18 +0100)
src/soc/simulator/qemu.py
patch
|
blob
|
history
diff --git
a/src/soc/simulator/qemu.py
b/src/soc/simulator/qemu.py
index b39ada05d07d1bb4879ec3f93bbdba9b400e1c79..d1045f15e54bf6aef5c14e289485a241f2a972a6 100644
(file)
--- 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