ladybird/.gdbinit
Suraj Yadav ec2b96f4bf Meta: Restore serenity_gdb.py
Restore serenity_gdb.py => Meta/gdb/PrettyPrinters/ak.py.
Remove VirtualAddress and AKFixedStringBuffer.
Fix Hashmap, IntrusiveList, Optional and Vector printers.
2026-05-28 14:33:25 +01:00

29 lines
713 B
Text

python
from pathlib import Path
import importlib.util
import os
import traceback
import gdb
try:
ak_path = Path(os.getcwd()) / "Meta" / "Debuggers" / "gdb" / "AK.py"
gdb.write(f"[ak] loading: {ak_path}\n")
if not ak_path.exists():
raise FileNotFoundError(f"{ak_path} does not exist")
spec = importlib.util.spec_from_file_location("AK", ak_path)
if spec is None or spec.loader is None:
raise ImportError("Failed to create module spec")
ak = importlib.util.module_from_spec(spec)
spec.loader.exec_module(ak)
gdb.write("[AK] successfully loaded AK.py\n")
except Exception:
gdb.write("[AK] failed to load AK.py\n")
gdb.write(traceback.format_exc())
end