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
相关推荐
BK贝壳3 小时前
bool-hybrid-array 的 GPU_opt 与 cjx:一个没显卡就报错的开关,一个把 800 字压到 96 字节的编码
python
多加点辣也没关系7 小时前
JavaScript|第41章:性能优化实战
开发语言·javascript·性能优化
BD_Marathon7 小时前
安装Jupyter notebook
ide·python·jupyter
Zlzxzw7 小时前
End-to-End Autonomous Generation of Human Assembly Plans
python
Resean02237 小时前
架构设计系列(十六):DDD 与代码架构
java·开发语言·架构
Wellijohn8 小时前
2000 个请求、30% 失败率:我把 Python 批量并发的限流和重试参数算了一遍
后端·python·性能优化
码途行者8 小时前
每天10分钟学Go:第22课 自定义错误
开发语言·后端·golang
23图8 小时前
C 语言开散列表(拉链法)拆解:链挂得没错,key=-1 会去读 T[-1]
c语言·开发语言·散列表
feixing_fx9 小时前
解构与展开:可读性和性能的取舍
开发语言·前端·javascript·前端框架
小飞在努力9 小时前
【实现负载均匀在线判题③】从零散模块到统一,编译运行全链路封装
c语言·开发语言·c++·笔记