summaryrefslogtreecommitdiff
path: root/docs/dev
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2025-02-05 23:10:33 -0500
committerJordan Wiens <jordan@psifertex.com>2025-02-05 23:10:33 -0500
commit3b4471e7daf2745e35af558d096c222fad845ff6 (patch)
tree562b5fbfbae4203935a0a5e61526e638563f416c /docs/dev
parent2826099522363319229627011695818908344880 (diff)
correct user/auto api differences explanation
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/concepts.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/dev/concepts.md b/docs/dev/concepts.md
index 011209ca..a81ae5df 100644
--- a/docs/dev/concepts.md
+++ b/docs/dev/concepts.md
@@ -40,7 +40,7 @@ Another difference in the REPL / scripting console is that the scripting console
## Auto vs User
-In the Binary Ninja API, there are often two parallel sets of functions with `_auto_` and `_user_` in their names. For example: [add_user_segment](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.add_user_segment) and [add_auto_segment](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.add_auto_segment). So what's the difference? Auto functions are those that are expected to be run _automatically_, every time the file is loaded. So for example, if you're writing a [custom file loader](https://github.com/Vector35/binaryninja-api/blob/dev/python/examples/nsf.py) that will parse a particular binary format, you would use `_auto_` functions because each time the file is opened your loader will be used. The results of auto functions are **not** saved in a `.bndb` database because it's expected that whatever produced them originally will again when the file is re-opened or analyzed. This means that even if you're writing a plugin to make changes on a file during analysis, you likely want to use the `_user_` set of APIs so that the changes your plugin causes will separately be saved to the database as if they were done by a user.
+In the Binary Ninja API, there are often two parallel sets of functions with `_auto_` and `_user_` in their names. For example: [add_user_segment](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.add_user_segment) and [add_auto_segment](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.add_auto_segment). So what's the difference? Auto functions are those that are expected to be run _automatically_, every time the file is loaded. So for example, if you're writing a [custom file loader](https://github.com/Vector35/binaryninja-api/blob/dev/python/examples/nsf.py) that will parse a particular binary format, you would use `_auto_` functions because each time the file is opened your loader will be used. The results of auto functions are saved in a `.bndb` database, but will be cleared if re-running auto-analysis (which happens when updating the version of the database due to updating Binary Ninja in some instances). This is because it's expected that whatever produced them originally will again when the file is re-analyzed (you can use the [`analysis.database.suppressReanalysis`](../guide/settings.md#analysis.database.suppressReanalysis) setting to avoid this, but it's generally discouraged). This means that even if you're writing a plugin to make changes on a file during analysis, you likely want to use the `_user_` set of APIs so that the changes your plugin causes will separately be saved to the database as if they were done by a user. User actions are also added to the undo serialization and can be undone by the user which is not true of auto actions.
## Concepts for ILs