This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Host/netbsd] Set Arg0 for 'platform process list -v'
ClosedPublic

Authored by mgorny on Oct 24 2019, 10:51 AM.

Diff Detail

Event Timeline

mgorny created this revision.Oct 24 2019, 10:51 AM
wallace added a comment.EditedOct 24 2019, 11:26 AM

Supposedly Arguments shouldn't contain Arg0 (https://reviews.llvm.org/source/llvm-github/browse/master/lldb/include/lldb/Utility/ProcessInfo.h$96)
I think you just need to change the dump method that prints to platform process list.

I don't know if NetBSD is doing something different, but the general dump method for ProcessInfo prints first arg0 and then the other args https://reviews.llvm.org/source/llvm-github/browse/master/lldb/source/Utility/ProcessInfo.cpp$229-235

Hmm, I think I see how it's supposed to work. I'm going to update the patch after I test it.

mgorny updated this revision to Diff 226309.Oct 24 2019, 12:02 PM
mgorny retitled this revision from [lldb] [Host/netbsd] Include argv[0] in process_info.GetArguments() to [lldb] [Host/netbsd] Set Arg0 for 'platform process list -v'.
mgorny edited the summary of this revision. (Show Details)

Ok, how does that look instead? ;-)

wallace accepted this revision.Oct 24 2019, 12:31 PM

cool! thanks!!

This revision is now accepted and ready to land.Oct 24 2019, 12:31 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2019, 12:48 AM