summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2023-01-10 18:35:54 +0800
committerXusheng <xusheng@vector35.com>2023-01-10 18:35:54 +0800
commitc14db13ccfedf2e4f5e1fed02bd2217bebe7f1e2 (patch)
tree4cf85ce4b53b9e175c191a2a72a458f9296dad15
parentda6e583784879f845bc5d80861b695bb899557bf (diff)
Fix debugger Python docs generation
-rw-r--r--api-docs/source/conf.py10
-rw-r--r--docs/guide/debugger.md5
2 files changed, 11 insertions, 4 deletions
diff --git a/api-docs/source/conf.py b/api-docs/source/conf.py
index 9f495e2c..642cfce4 100644
--- a/api-docs/source/conf.py
+++ b/api-docs/source/conf.py
@@ -39,6 +39,7 @@ os.environ["BN_DISABLE_USER_SETTINGS"] = "True"
os.environ["BN_DISABLE_USER_PLUGINS"] = "True"
os.environ["BN_DISABLE_REPOSITORY_PLUGINS"] = "True"
import binaryninja
+import binaryninja.debugger
def modulelist(modulename):
modules = inspect.getmembers(modulename, inspect.ismodule)
@@ -49,7 +50,7 @@ def modulelist(modulename):
"associateddatastore", "range", "pyNativeStr", "cstr", "fnsignature",
"get_class_members", "datetime", "inspect", "subprocess", "site",
"string", "random", "uuid", "queue", "collections", "dbgcore", "debugger", "webbrowser",
- "dataclasses"]
+ "dataclasses", "_debuggercore"]
return sorted(set(x for x in modules if x[0] not in moduleblacklist))
def classlist(module):
@@ -101,7 +102,12 @@ Full Class List
''')
- for modulename, module in modulelist(binaryninja):
+ # Generate docs for both binaryninja and binaryninja.debugger module
+ modules = modulelist(binaryninja)
+ modules.extend(modulelist(binaryninja.debugger))
+ modules = sorted(modules)
+
+ for modulename, module in modules:
# Since we put debugger python files in a folder, binaryninja.{modulename} is no longer the
# correct name of the module
filename = f"{module.__name__}-module.rst"
diff --git a/docs/guide/debugger.md b/docs/guide/debugger.md
index c602c87d..e2593c42 100644
--- a/docs/guide/debugger.md
+++ b/docs/guide/debugger.md
@@ -220,9 +220,10 @@ Right now, the Debugger BinaryView is discarded once the target exits. It cannot
## API
-The debugger exposes its functionality in both the Python and C++ APIs. The Python documentation can be accessed [online](https://api.binary.ninja/binaryninja.debugger.debuggercontroller-module.html).
+The debugger exposes its functionality in both the Python and C++ APIs. The Python documentation can be accessed online, for [stable](https://api.binary.ninja/binaryninja.debugger.debuggercontroller-module.html)
+and [dev](https://dev-api.binary.ninja/binaryninja.debugger.debuggercontroller-module.html) version.
-The API is centered around the [`DebuggerController`](https://api.binary.ninja/binaryninja.debugger.debuggercontroller-module.html#binaryninja.debugger.debuggercontroller.DebuggerController) class, which provides all functionalities of the debugger. There is no need to directly access the `DebugAdapter` classes.
+The API is centered around the [`DebuggerController`](https://dev-api.binary.ninja/binaryninja.debugger.debuggercontroller-module.html#binaryninja.debugger.debuggercontroller.DebuggerController) class, which provides all functionalities of the debugger. There is no need to directly access the `DebugAdapter` classes.
When the debugger is used within the UI, the `dbg` magic variable is injected into the Python interpreter. It always represents the debugger for the currently active Binary View. You can think of it as being created by