Page MenuHomeFreeBSD

lldb: retrieve the whole thread name from the kernel
Needs ReviewPublic

Authored by vangyzen on Dec 8 2016, 2:25 PM.

Details

Reviewers
emaste
Summary

When getting a thread's name from kinfo_proc::ki_tdname,
get the remainder of the name from kinfo_proc::ki_moretdname.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8070
Build 8264: CI src buildJenkins
Build 8263: arc lint + arc unit

Event Timeline

vangyzen retitled this revision from to lldb: retrieve the whole thread name from the kernel.
vangyzen updated this object.
vangyzen edited the test plan for this revision. (Show Details)
vangyzen added a reviewer: emaste.
vangyzen added a subscriber: dim.
contrib/llvm/tools/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp
26

I'll add an #elif for 11.x after the MFC. This indirect condition is more readable than a big expression in a single #if.

Change a literal "16" to the sizeof the relevant fields of kinfo_proc

Also test __FreeBSD_version for 10.x and 11.x

contrib/llvm/tools/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
19–24

It'd be nice to avoid having to maintain two copies of this list.

contrib/llvm/tools/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp
26

I think you can make a single #if at least as clear as this, by putting pairs of >= < ranges on separate lines?

Implement code review suggestions

vangyzen marked an inline comment as done.