Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

About This Script

This script can be used within GDB to set thread names by extracting them from /proc in situations where prctl(PR_SET_NAME, ...) and similar methods are not being read properly by GDB.

Requirements

A (recent) version of GDB that was compiled with --with-python.

Installation

To install this script, add the following to ~/.gdbinit:

python
import sys
sys.path.insert(0, '/path/to/gdb-thread-names')
from gdb_thread_names import get_thread_names
end

Usage

While in GDB, just type

python get_thread_names()

It will print the threads for which it was able to successfully find names.

Subsequent calls to info threads and similar commands will show correct thread names.

About

A Python script that extracts thread names from /proc on platforms where thread name support isn't built-in

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages