Page MenuHomeFreeBSD

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

Authored by vangyzen on Dec 8 2016, 2:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 29 2024, 12:39 AM
Unknown Object (File)
Jan 19 2024, 10:54 AM
Unknown Object (File)
Dec 23 2023, 9:51 AM
Unknown Object (File)
Dec 14 2023, 9:11 PM
Unknown Object (File)
Dec 14 2023, 2:23 AM
Unknown Object (File)
Nov 14 2023, 8:47 AM
Unknown Object (File)
Sep 24 2023, 7:05 PM
Unknown Object (File)
Sep 24 2023, 4:02 AM
Subscribers

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

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
27

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
20–25

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

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

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.

This will need to be rebased but IMO can do without the condition now, ki_moretdname exists in all supported versions