Skip to content

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

Notifications You must be signed in to change notification settings

togi/gdb-thread-names

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published