Skip to content

Releases: Cerdore/gdb-cli

v0.3.1 — 中优先级安全与健壮性修复

25 Apr 05:56

Choose a tag to compare

修复内容

安全加固

  • #10 GDB_CLI_SERVER_DIR 默认值从 /tmp 改为包目录,防止代码注入
  • #11 启动器中所有文件路径做 GDB 命令转义,防止命令注入
  • #12 Unix socket 文件权限设为 0o600,防止非授权本地进程连接

健壮性

  • #13 动态模块加载添加 null 检查,防止 spec_from_file_location 返回 None 时崩溃
  • #14 Backtrace 范围超出可用帧时返回 out_of_bounds 标记
  • #16 import signal 移至文件顶部(之前在使用之后导入)
  • #17 cleanup_session() 改为 SIGTERM → poll → SIGKILL 升级模式
  • #18 服务器加载阶段增加 60 秒超时,防止永久卡在 loading 状态
  • #19 _write_meta() 改为原子写(临时文件 + rename),消除 TOCTOU 竞态
  • #21 文档说明 _gdb_process 为运行时属性,不持久化到磁盘

性能

  • #15 Backtrace 帧号计算从 O(n²) 优化为 O(n)
  • #22 接收循环中字节拼接改用 io.BytesIO,消除 O(n²) 内存分配

共计修复 11 个中优先级问题。全部 37 个已识别问题中已修复 24 个。

v0.2.0 - Multilanguage support & remote debugging

24 Apr 18:54

Choose a tag to compare

What's new in v0.2.0

Added

  • Multilanguage support (i18n): en, zh-CN, ru — auto-detected from GDB_CLI_LANG / LANG (#1)
  • target command: SSH remote debugging via gdb-cli target --remote HOST:PID
  • status now shows elapsed time since session start
  • env-check --gdb-path option for specifying GDB executable
  • Python 3.6.8+ compatibility restored
  • thread-switch command for switching current thread
  • up/down commands for stack frame navigation
  • sharedlibs command for viewing loaded shared libraries
  • disasm command for disassembly

Changed

  • All user-facing error messages now translated via i18n catalog
  • License: MIT → Apache 2.0
  • Skill renamed to gdb-cli for consistency with bunx ecosystem

Fixed

  • Handler thread safety: replaced gdb.execute() with Python API
  • Commands now execute on Python main thread to avoid GDB concurrency issues
  • sessions shows GDB process PID instead of target PID in attach mode
  • Various lint and CI fixes

v0.1.0

21 Mar 09:53

Choose a tag to compare

GDB CLI for AI v0.1.0

Initial release.

Features

  • Core dump analysis with symbol resident in memory
  • Live attach debugging with non-stop mode support
  • Structured JSON output for all commands
  • Command whitelist security mechanism
  • Heartbeat timeout auto-cleanup
  • Session management with idempotency
  • SSH remote debugging support

Installation

pip install gdb-cli

See README for full documentation.