summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/ProcessInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][NFC] Migrate FileSpec::Dump to raw_ostreamRaphael Isemann2019-12-061-1/+1
|
* [lldb][NFC] Migrate to raw_ostream in ArchSpec::DumpTripleRaphael Isemann2019-12-041-3/+3
| | | | | | | | | | | | Reviewers: labath, davide Reviewed By: davide Subscribers: clayborg, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70979
* [android/process list] support showing process argumentsWalter Erquinigo2019-10-161-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The qfProcessInfo and qsProcessInfo packets currently don't set the processes' arguments, however the platform process list -v command tries to print it. In this diff I'm adding the arguments as part of the packet, and now the command shows the arguments just like on mac. On Mac: 507 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/libexec/secd 503 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/libexec/secinitd 501 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/libexec/languageassetd --firstLogin 497 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/libexec/trustd --agent 496 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/libexec/lsd 494 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /System/Library/Frameworks/CoreTelephony.framework/Support/CommCenter -L 491 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/sbin/distnoted agent 489 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/libexec/UserEventAgent (Aqua) 484 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /usr/sbin/cfprefsd agent 483 1 wallace 1876110778 wallace 1876110778 x86_64-apple-macosx /System/Library/Frameworks/LocalAuthentication.framework/Support/coreauthd On android: 1561 1016 root 0 0 aarch64-unknown-linux-android /system/bin/ip6tables-restore--noflush -w -v 1805 982 1000 1000 1000 android:drmService 1811 982 10189 10189 10189 com.qualcomm.embms:remote 1999 1 1000 1000 1000 aarch64-unknown-linux-android /system/bin/tlc_serverCCM 2332 982 10038 10038 10038 com.android.systemui 2378 983 1053 1053 1053 webview_zygote 2448 982 5013 5013 5013 com.sec.location.nsflp2 2465 982 10027 10027 10027 com.google.android.gms.persistent Differential Revision: https://reviews.llvm.org/D68293 llvm-svn: 375029
* ProcessInstanceInfoMatch: Don't match processes with no name if a name match ↵Pavel Labath2019-10-111-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | was requested, take 2 Summary: The previous attempt at making nameless process not match when searching for a given name failed because the macos implementation was depending on this detail in its partial matching strategy. Doing partial matching to avoid expensive lookups is a perfectly valid thing to do, the way it was implemented seems somewhat unexpected. This patch implements it differently by providing special methods in the ProcessInstanceInfoMatch which match only a subset of fields, and changes mac host code to use those instead. Then, it re-applies r373925 to get make the ProcessInstanceInfoMatch with a name *not* match a nameless process. Reviewers: JDevlieghere, teemperor, jingham Subscribers: wallace, lldb-commits Differential Revision: https://reviews.llvm.org/D68631 llvm-svn: 374529
* Revert "ProcessInstanceInfoMatch: Don't match processes with no name if a ↵Jonas Devlieghere2019-10-081-1/+1
| | | | | | | | name match was requested" This breaks TestProcessAttach and TestHelloWorld on Darwin. llvm-svn: 374008
* ProcessInstanceInfoMatch: Don't match processes with no name if a name match ↵Pavel Labath2019-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | was requested Since D68289, a couple of tests on linux started being extremely flaky. All of them were doing name-based attaching and were failing because they couldn't find an unambiguous process to attach to. The patch above changed the process finding logic, so that failure to find a process name does not constitute an error. This meant that a lot more transient processes showed up in the process list during the test suite run. Previously, these processes would not appear as they would be gone by the time we went to read their executable name, arguments, etc. Now, this alone should not cause an issue were it not for the fact that we were considering a process with no name as if it matched by default (even if we were explicitly searching for a process with a specified name). This meant that any of the "transient" processes with no name would make the name match ambiguous. That clearly seems like a bug to me so I fix that. llvm-svn: 373925
* [process list] make the TRIPLE column widerWalter Erquinigo2019-10-031-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Now that `process list` works better on the android platform, the arch aarch64-unknown-linux-android appears quite often. The existing printed width of the TRIPLE column is not long enough, which doesn't look okay. E.g. ``` 1561 1016 aarch64-unknown-linux-android ip6tables-restore 1999 1 aarch64-unknown-linux-android tlc_server 2332 982 com.android.systemui 2378 983 webview_zygote ``` Now, after adding 6 spaces, it looks better ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ============================== ============================ ... 1561 1016 aarch64-unknown-linux-android ip6tables-restore 1999 1 aarch64-unknown-linux-android tlc_server 2332 982 com.android.systemui 2378 983 webview_zygote 2448 982 com.sec.location.nsflp2 ``` Reviewers: clayborg, labath, xiaobai, aadsm Reviewed By: labath Subscribers: srhines, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68291 llvm-svn: 373670
* ProcessInstanceInfo: Fix dumping of invalid user idsPavel Labath2019-08-261-11/+26
| | | | | | | Don't attempt to print invalid user ids. Previously, these would come out as UINT32_MAX, or as an assertion failure. llvm-svn: 369906
* [lldb][NFC] Add ProcessInfo::GetNameAsStringRef to simplify some codeRaphael Isemann2019-08-261-2/+2
| | | | llvm-svn: 369880
* Fix file names in file headers. NFCFangrui Song2019-05-131-1/+1
| | | | llvm-svn: 360554
* Move ProcessInfo from Host to Utility.Zachary Turner2019-03-041-0/+310
There are set of classes in Target that describe the parameters of a process - e.g. it's PID, name, user id, and similar. However, since it is a bare description of a process and contains no actual functionality, there's nothing specifically that makes this appropriate for being in Target -- it could just as well be describing a process on the host, or some hypothetical virtual process that doesn't even exist. To cement this, I'm moving these classes to Utility. It's possible that we can find a better place for it in the future, but as it is neither Host specific nor Target specific, Utility seems like the most appropriate place for the time being. After this there is only 2 remaining references to Target from Host, which I'll address in a followup. Differential Revision: https://reviews.llvm.org/D58842 llvm-svn: 355342
OpenPOWER on IntegriCloud