diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2023-11-30 17:02:29 -0500 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2023-11-30 17:02:29 -0500 |
| commit | d40ab66a50fa8f33451458be15582c7a8d93fd5f (patch) | |
| tree | 973cbc06def10dbe2f7a11c3ce90137f5e83c50d /docs/dev | |
| parent | 49cb6a4245a832685a897a37beb2035e46f3fef5 (diff) | |
add docs on analysis updating in repl vs scripts
Diffstat (limited to 'docs/dev')
| -rw-r--r-- | docs/dev/concepts.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/dev/concepts.md b/docs/dev/concepts.md index f962ba0d..43bef354 100644 --- a/docs/dev/concepts.md +++ b/docs/dev/concepts.md @@ -8,6 +8,18 @@ APIs that query these mappings are plural. So for example, while `current_hlil.l  +## REPL versus Scripts + +When you're interacting with the Binary Ninja [scripting console](../guide/index.md#script-python-console), it's important to realize that every time you run a command, the UI is automatically going to update analysis. You can see this by even running a simply command like: + +``` +print("test") +``` + +and then checking the `Log` pane where you will see an `Analysis update took #.###` message. This is a convenience the UI does for you just like if you were to change a type or create a function, you almost always want the analysis to be updated. However, in scripts you run yourself as plugins or via the "Run Script" command, you may not get the same results mid-execution until after the entire script is finished running. + + + ## Operating on IL versus Native Generally speaking, scripts should operate on ILs. The available information far surpasses the native addresses and querying properties and using APIs almost always beats directly manipulating bytes. However, when it comes time to change the binary, there are some operations that can only be done at a simple virtual address. So for example, the [comment](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.set_comment_at) or [tag](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.add_tag) APIs (among others) work off of native addressing irrespective of IL level. |
