This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import glob | |
| import sys | |
| import gdb | |
| gdb_path = gdb.PYTHONDIR | |
| gcc_parent_path = os.path.dirname(os.path.dirname(gdb_path)) | |
| gcc_version_pattern = os.path.join(gcc_parent_path, "gcc-*") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| (Kind of) A template script to use to debug VMs | |
| with their memory provided. breakpoints and opcodes can be edited | |
| according to the current VM implementation. | |
| """ | |
| import gdb | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import clang.cindex | |
| import os | |
| class CodebaseAnalyzer: | |
| def __init__(self, codebase_path): | |
| self.index = clang.cindex.Index.create() | |
| self.cache = {} # Cache to store indexes and extracted data for each file | |
| self.codebase_path = codebase_path | |
| self.load_codebase() |