gdb如何显示线程名称 [英] gdb how to get thread name displayed

查看:34
本文介绍了gdb如何显示线程名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中创建了许多线程.当我执行命令信息线程"时,一些线程名称在 gdb 中可见,其他线程名称不显示.如何获取所有线程名称本身而不是像 0xb7fe1424 这样的十六进制值

There are many threads created in my application. some of the threads name are visible in the gdb while i execute the command 'info threads', others are not displayed. How to get all the thread name itself instead of the hex value like 0xb7fe1424

4 Thread 0xb68ffb70 (LWP 18377)  0xb7fe1424 in __kernel_vsyscall ()
* 3 Thread 0xb7291b70 (LWP 18375)  JKMainT (arg=0x0) at mylib.cpp:482
2 Thread 0xb7a92b70 (LWP 18374)  0xb7fe1424 in __kernel_vsyscall ()
1 Thread 0xb7a94730 (LWP 18371)  0xb7fe1424 in __kernel_vsyscall ()

推荐答案

如果升级到gdb 7.3或更高版本,info thread"会显示线程名称;至少在本机(非远程)Linux 上.

If you upgrade to gdb 7.3 or later, "info thread" will show thread names; at least on native (not remote) Linux.

这篇关于gdb如何显示线程名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆