llvm-project/lldb
Pavel Labath aa51e6a683 Refactor user/group name resolving code
Summary:
This creates an abstract base class called "UserIDResolver", which can
be implemented to provide user/group ID resolution capabilities for
various objects. Posix host implement a PosixUserIDResolver, which does
that using posix apis (getpwuid and friends).  PlatformGDBRemote
forwards queries over the gdb-remote link, etc. ProcessInstanceInfo
class is refactored to make use of this interface instead of taking a
platform pointer as an argument. The base resolver class already
implements caching and thread-safety, so implementations don't have to
worry about that.

The main motivating factor for this was to remove external dependencies
from the ProcessInstanceInfo class (so it can be put next to
ProcessLaunchInfo and friends), but it has other benefits too:
- ability to test the user name caching code
- ability to test ProcessInstanceInfo dumping code
- consistent interface for user/group resolution between Platform and
  Host classes.

Reviewers: zturner, clayborg, jingham

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D58167

llvm-svn: 355323
2019-03-04 18:48:00 +00:00
..
cmake [cmake] Move LLDB_DISABLE_LIBEDIT handling code into a central place 2019-02-28 16:04:54 +00:00
docs Mention predicting exception catch at throw site 2019-02-26 19:18:09 +00:00
examples Fix use of non-existing variable in crashlog.py 2019-01-31 17:33:17 +00:00
include/lldb Refactor user/group name resolving code 2019-03-04 18:48:00 +00:00
lit [lldb] [test] Mark failing tests XFAIL on NetBSD 2019-03-04 16:54:06 +00:00
lldb.xcodeproj Resubmit r354706 with a fix for process launch. 2019-03-01 18:13:38 +00:00
lldb.xcworkspace Remove accidentally commited file in xcshareddata 2019-02-05 23:35:01 +00:00
packages/Python/lldbsuite [lldb] [test] Mark failing tests XFAIL on NetBSD 2019-03-04 16:54:06 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts Insert blocks of python code with swig instead of modify-python-lldb.py 2019-02-27 14:16:48 +00:00
source Refactor user/group name resolving code 2019-03-04 18:48:00 +00:00
test [CMake] Make lldb-test-deps a dependency of check-lldb 2019-02-13 20:51:13 +00:00
third_party/Python/module [dotest] Consider unexpected passes as failures. 2018-12-20 20:44:23 +00:00
tools Update com.apple.diagnosticd.diagnostic entitlement 2019-03-01 03:34:51 +00:00
unittests Refactor user/group name resolving code 2019-03-04 18:48:00 +00:00
utils Use sys.executable in lldb-dotest 2019-02-15 07:41:17 +00:00
www Mention predicting exception catch at throw site 2019-02-26 19:18:09 +00:00
.arcconfig
.clang-format
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt [cmake] Move LLDB_DISABLE_LIBEDIT handling code into a central place 2019-02-28 16:04:54 +00:00
CODE_OWNERS.txt Fix/unify the spelling of Objective-C. 2018-06-13 16:21:24 +00:00
INSTALL.txt Changed builld-llvm.py to use .json files 2017-02-23 02:21:34 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py