diff options
| author | Xusheng <xusheng@vector35.com> | 2021-09-28 14:19:23 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2022-04-29 11:21:47 +0800 |
| commit | 87a8a04db5c0a80c06819ec6caf1568b7202cf51 (patch) | |
| tree | 8850056e2ade5dd60262b20a76e035658136b965 /api-docs/source/conf.py | |
| parent | dbb5c9d47b3db0a478aab57b9ef43d0dd3f6d4b5 (diff) | |
Check in the debugger
Diffstat (limited to 'api-docs/source/conf.py')
| -rw-r--r-- | api-docs/source/conf.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/api-docs/source/conf.py b/api-docs/source/conf.py index 27e12c8f..3fc64ade 100644 --- a/api-docs/source/conf.py +++ b/api-docs/source/conf.py @@ -37,16 +37,18 @@ sys.path.insert(0, bnpath) os.environ["BN_DISABLE_USER_SETTINGS"] = "True" os.environ["BN_DISABLE_USER_PLUGINS"] = "True" os.environ["BN_DISABLE_REPOSITORY_PLUGINS"] = "True" +os.environ["BN_EXPERIMENTAL_DEBUGGER"] = "True" import binaryninja def modulelist(modulename): modules = inspect.getmembers(modulename, inspect.ismodule) + # We block the module named "debugger", because it is the folder that contains all debugger Python files moduleblacklist = ["abc", "atexit", "binaryninja", "builtins", "ctypes", "core", "struct", "sys", "_binaryninjacore", "traceback", "code", "enum", "json", "numbers", "threading", "re", "requests", "os", "startup", "associateddatastore", "range", "pyNativeStr", "cstr", "fnsignature", "get_class_members", "datetime", "inspect", "subprocess", "site", - "string", "random", "uuid", "queue", "collections"] + "string", "random", "uuid", "queue", "collections", "dbgcore", "debugger"] return sorted(set(x for x in modules if x[0] not in moduleblacklist)) def classlist(module): @@ -91,7 +93,9 @@ Full Class List ''') for modulename, module in modulelist(binaryninja): - filename = f"binaryninja.{modulename}-module.rst" + # 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" pythonrst.write(f" {modulename} <{filename}>\n") modulefile = open(filename, "w") underline = "="*len(f"{modulename} module") @@ -104,12 +108,12 @@ Full Class List ''') for (classname, classref) in classlist(module): - modulefile.write(f" binaryninja.{modulename}.{classname}\n") + modulefile.write(f" {module.__name__}.{classname}\n") modulefile.write('''\n.. toctree:: :maxdepth: 2\n''') - modulefile.write(f'''\n\n.. automodule:: binaryninja.{modulename} + modulefile.write(f'''\n\n.. automodule:: {module.__name__} :members: :undoc-members: :show-inheritance:''') |
