Files
Leeksov 4647310322 GLEGram 12.5 — Initial public release
Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
2026-04-06 09:48:12 +03:00

47 lines
1.3 KiB
Python

"""Common utilities for LLDB scripts in the VSCode/Cursor debugging workflow."""
import json
import os
import pathlib
import sys
from typing import Any
import lldb
# These files are generated by the lldb_launch_and_debug.sh script.
LAUNCH_INFO_PATH = pathlib.Path(".bsp/skbsp_generated/lldb.json")
BAZEL_INFO_PATH = pathlib.Path(".bsp/skbsp_generated/bazel_info.json")
def _load_file(path: pathlib.Path) -> str:
if not path.exists():
print(f"File not found: {path}. Exiting.", file=sys.stderr, flush=True)
lldb.SBDebugger.Terminate()
os._exit(0)
return path.read_text()
def load_launch_info() -> dict[str, Any]:
return json.loads(_load_file(LAUNCH_INFO_PATH))
def load_bazel_info() -> dict[str, Any]:
return json.loads(_load_file(BAZEL_INFO_PATH))
def run_command(command: str) -> None:
print(f"(lldb) {command}", flush=True)
result = lldb.SBCommandReturnObject()
lldb.debugger.GetCommandInterpreter().HandleCommand(command, result)
if result.Succeeded():
output = result.GetOutput()
if output:
print(output, flush=True)
else:
output = result.GetError()
if output:
print(output, file=sys.stderr, flush=True)
msg = "Command failed. See above for any error messages."
raise RuntimeError(msg)