This is an archive of the discontinued LLVM Phabricator instance.

Report actual tids from FreeBSD core files
ClosedPublic

Authored by emaste on Jul 30 2015, 8:53 AM.

Details

Summary

As noted in the thread "Question (bug?) about thread tids when lldb loads a core dump." on lldb-dev, lldb is not showing tids for core files.

For FreeBSD the tid is (somewhat unintuitively) found in the pr_pid field of the NT_PRSTATUS note. Collect it when parsing the note and store it in the thread data. I'm not sure how to obtain it on Linux. I'll update the patch if/when I find out -- this patch isn't committable as-is until then.

Diff Detail

Event Timeline

emaste updated this revision to Diff 31033.Jul 30 2015, 8:53 AM
emaste retitled this revision from to Report actual tids from FreeBSD core files.
emaste updated this object.
emaste added a subscriber: lldb-commits.
emaste updated this revision to Diff 31056.Jul 30 2015, 11:06 AM

Keep existing behaviour for Linux until updated to fetch the tid from the core file: assign 0, 1, 2, ... for tids

amccarth accepted this revision.Jul 30 2015, 4:52 PM
amccarth added a reviewer: amccarth.
amccarth added a subscriber: amccarth.

Looks good.

This revision is now accepted and ready to land.Jul 30 2015, 4:52 PM
This revision was automatically updated to reflect the committed changes.