python使用gdb进行堆栈查看与调试

以ubuntu示例,先安装gdb与python-dbg,dbg按照python版本安装

bash 复制代码
apt install -y gdb python3.10-dbg

使用top查看python进程,使用gdb操作python进程

bash 复制代码
gdb python3 6618

加载环境

bash 复制代码
source /usr/share/gdb/auto-load/usr/bin/python3.10-gdb.py

使用命令查看python进程

bash 复制代码
(gdb) py-bt
相关推荐
六件套是我25 分钟前
无法访问org.springframeword.beans.factory.annotation.Value
java·开发语言·spring boot
S-码农38 分钟前
Linux ——条件变量
linux·开发语言
清水白石00838 分钟前
《Python 编程全景解析:从核心精要到 Hypothesis 属性基测试的边界探索》
开发语言·python
IT枫斗者43 分钟前
IntelliJ IDEA 2025.3史诗级更新:统一发行版+Spring Boot 4支持,这更新太香了!
java·开发语言·前端·javascript·spring boot·后端·intellij-idea
勇往直前plus2 小时前
深入理解 Python 内存模型:模块、类、对象的存储与运行机制
开发语言·python
yunhuibin2 小时前
NIN网络学习
人工智能·python·深度学习·神经网络·学习
派大星-?2 小时前
自动化测试五模块一框架(下)
开发语言·python
两万五千个小时2 小时前
构建mini Claude Code:02 - 把 Bash 拆成专用工具(read_file, write_file 等)
人工智能·python
三无少女指南3 小时前
开发者环境配置:用 Ollama 实现本地大模型部署(附下载慢的解决方案
c语言·开发语言·数据库·ubuntu