diff options
| author | Ajax <commial@gmail.com> | 2018-05-14 15:12:41 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-05-14 15:12:41 +0200 |
| commit | f72b3eaee44315ecd5905e56c55b7fad094e39ef (patch) | |
| tree | a5fe4962ba0f485709b1201d6cae261208fded6d | |
| parent | d7c7527fbc4dea0f340402b62e7146b1d1916d2a (diff) | |
| download | miasm-f72b3eaee44315ecd5905e56c55b7fad094e39ef.tar.gz miasm-f72b3eaee44315ecd5905e56c55b7fad094e39ef.zip | |
DSE: update doc on attachment in a breakpoint
Diffstat (limited to '')
| -rw-r--r-- | miasm2/analysis/dse.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/miasm2/analysis/dse.py b/miasm2/analysis/dse.py index 0a5445a6..427a8bd0 100644 --- a/miasm2/analysis/dse.py +++ b/miasm2/analysis/dse.py @@ -192,7 +192,25 @@ class DSEEngine(object): def attach(self, emulator): """Attach the DSE to @emulator - @emulator: jitload (or API equivalent) instance""" + @emulator: jitload (or API equivalent) instance + + To attach *DURING A BREAKPOINT*, one may consider using the following snippet: + + def breakpoint(self, jitter): + ... + dse.attach(jitter) + dse.update... + ... + # Additionnal call to the exec callback is necessary, as breakpoints are + # honored AFTER exec callback + jitter.exec_cb(jitter) + + return True + + Without it, one may encounteer a DriftException error due to a + "desynchronization" between jitter and dse states. Indeed, on 'handle' + call, the jitter must be one instruction AFTER the dse. + """ self.jitter = emulator self.prepare() |