summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2021-02-24 16:17:01 -0500
committerRusty Wagner <rusty.wagner@gmail.com>2021-02-24 16:17:14 -0500
commitf75c320ceb350106b018a277bf65b3f58c02d6df (patch)
treedb05b872a2e292b21e678f2b743eab7dda3b85e3 /docs
parent9709a4ac84e68701bcffaa849c0d8fe88f1c4121 (diff)
Document HLIL scoping options and dead store elimination
Diffstat (limited to 'docs')
-rw-r--r--docs/getting-started.md26
-rw-r--r--docs/img/dead-store-after.pngbin0 -> 27977 bytes
-rw-r--r--docs/img/dead-store-example.pngbin0 -> 35415 bytes
-rw-r--r--docs/img/dead-store-menu.pngbin0 -> 166633 bytes
-rw-r--r--docs/img/hlil-braces.pngbin0 -> 303084 bytes
-rw-r--r--docs/img/hlil-scope.pngbin0 -> 25489 bytes
6 files changed, 26 insertions, 0 deletions
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 9dcb4d9b..b039c943 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -338,6 +338,32 @@ The function list also highlights imports, and functions identified with symbols
- When main view is linear, Mini Graph renders the Reflection View
+### High Level IL
+
+Binary Ninja features a decompiler that produces High Level IL (HLIL) as output. HLIL is not intended to be a representation of the code in C, but some users prefer to have a more C-like scoping style.
+
+You can control the way HLIL appears in the settings.
+
+![HLIL Scoping Options >](img/hlil-scope.png "HLIL Scoping Options")
+
+The different options are shown below:
+
+![HLIL Scoping Display >](img/hlil-braces.png "HLIL Scoping Display")
+
+### Dead Store Elimination
+
+Binary Ninja tries to be convervative with eliminating unused variables on the stack. When the analysis finds a variable that cannot be eliminated but does not appear to be used, the assignment will appear grayed out in the decompiler output. The first two lines of the function below show this:
+
+![Dead Stores >](img/dead-store-example.png "Dead Stores")
+
+In this case, these variables are actually unused and can be eliminated. You can tell Binary Ninja to do this by right clicking on the variable and choosing "Allow" from the "Dead Store Elimination" submenu.
+
+![Dead Store Elimination Menu >](img/dead-store-menu.png "Dead Store Elimination Menu")
+
+Performing this action on both variables in the example results in the following output:
+
+![Dead Store Elimination Results >](img/dead-store-after.png "Dead Store Elimination Results")
+
### Script (Python) Console
The integrated script console is useful for small scripts that aren't worth writing as full plugins.
diff --git a/docs/img/dead-store-after.png b/docs/img/dead-store-after.png
new file mode 100644
index 00000000..24047d08
--- /dev/null
+++ b/docs/img/dead-store-after.png
Binary files differ
diff --git a/docs/img/dead-store-example.png b/docs/img/dead-store-example.png
new file mode 100644
index 00000000..2f5a5159
--- /dev/null
+++ b/docs/img/dead-store-example.png
Binary files differ
diff --git a/docs/img/dead-store-menu.png b/docs/img/dead-store-menu.png
new file mode 100644
index 00000000..71a1a48c
--- /dev/null
+++ b/docs/img/dead-store-menu.png
Binary files differ
diff --git a/docs/img/hlil-braces.png b/docs/img/hlil-braces.png
new file mode 100644
index 00000000..74fbaaca
--- /dev/null
+++ b/docs/img/hlil-braces.png
Binary files differ
diff --git a/docs/img/hlil-scope.png b/docs/img/hlil-scope.png
new file mode 100644
index 00000000..d16393a1
--- /dev/null
+++ b/docs/img/hlil-scope.png
Binary files differ