From bab464fb07acf7c3ceb7248f01a4c7b67ecda021 Mon Sep 17 00:00:00 2001 From: jonschz Date: Tue, 30 Jul 2024 14:12:08 +0200 Subject: [PATCH] Improvements to documentation --- tools/ghidra_scripts/lego_util/function_importer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ghidra_scripts/lego_util/function_importer.py b/tools/ghidra_scripts/lego_util/function_importer.py index 7e2cd12c..6ccc6935 100644 --- a/tools/ghidra_scripts/lego_util/function_importer.py +++ b/tools/ghidra_scripts/lego_util/function_importer.py @@ -215,7 +215,7 @@ def overwrite_ghidra_function(self, ghidra_function: Function): """Replace the function declaration in Ghidra by the one derived from C++.""" if ghidra_function.hasCustomVariableStorage(): - # Unfortunately, Ghidra has a bug where setting custom variable storage back to `False` + # Unfortunately, calling `ghidra_function.setCustomVariableStorage(False)` # leads to two `this` parameters. Therefore, we first need to remove all `this` parameters # and then re-generate a new one ghidra_function.replaceParameters( @@ -330,7 +330,7 @@ def _set_this_adjust( ghidra_function: Function, ): """ - Then `this adjust` is non-zero, the pointer type of `this` needs to be replaced by an offset version. + When `this adjust` is non-zero, the pointer type of `this` needs to be replaced by an offset version. The offset can only be set on a typedef on the pointer. We also must enable custom storage so we can modify the auto-generated `this` parameter. """