This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Commands] Implement "thread siginfo"
ClosedPublic

Authored by mgorny on Jan 28 2022, 7:44 AM.

Diff Detail

Event Timeline

mgorny requested review of this revision.Jan 28 2022, 7:44 AM
mgorny created this revision.

Seems reasonable to me, but let's get Jim's opinion too.

I think it would help readability if you put the thread ID for the signinfo before printing the siginfo value, otherwise if I list multiple threads (or use "all") I have to count instances to figure out which thread goes with which siginfo.

Otherwise this looks fine.

lldb/source/Commands/CommandObjectThread.cpp
1355

The CommandObjectIterateOverThreads class doesn't itself print which thread the output of each HandleOneThread is for, so if I did:

(lldb) thread siginfo all

Then I would just get a bunch of undifferentiated siginfo's and wouldn't have a way to figure out which thread went with which output. I think it would help to repeat the thread name before the siginfo output.

JDevlieghere added inline comments.
lldb/source/Commands/CommandObjectThread.cpp
1323

I know you're just being consistent with the rest of this file, but we've been slowly phasing out these kind of comments.

mgorny marked 2 inline comments as done.Feb 2 2022, 6:35 AM
mgorny added inline comments.
lldb/source/Commands/CommandObjectThread.cpp
1323

I'm all for it ;-).

mgorny updated this revision to Diff 405249.Feb 2 2022, 6:35 AM
mgorny marked an inline comment as done.

Removed the comment and added thread info-style status above siginfos.

jingham accepted this revision.Feb 2 2022, 10:08 AM

This looks fine to me.

This revision is now accepted and ready to land.Feb 2 2022, 10:08 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2022, 10:32 AM

Thanks for all the reviews and helpful suggestions!