diff options
author | Zachary Turner <zturner@google.com> | 2014-08-21 20:02:17 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-08-21 20:02:17 +0000 |
commit | b245ecac79459de6db2d1443190a1e67eac56fff (patch) | |
tree | 50381129110ed519d2b3516006c321c61b1cab18 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp | |
parent | 5ed17dad95d6c14d00565fa093da889ac4856ccb (diff) | |
download | llvm-b245ecac79459de6db2d1443190a1e67eac56fff.zip llvm-b245ecac79459de6db2d1443190a1e67eac56fff.tar.gz llvm-b245ecac79459de6db2d1443190a1e67eac56fff.tar.bz2 |
Move GetUsername and GetGroupname to HostInfoPosix
llvm-svn: 216210
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index dc99a99..bdece3d 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -1538,19 +1538,21 @@ GDBRemoteCommunicationServer::Handle_qsProcessInfo (StringExtractorGDBRemote &pa GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServer::Handle_qUserName (StringExtractorGDBRemote &packet) { +#if !defined(LLDB_DISABLE_POSIX) // Packet format: "qUserName:%i" where %i is the uid packet.SetFilePos(::strlen ("qUserName:")); uint32_t uid = packet.GetU32 (UINT32_MAX); if (uid != UINT32_MAX) { std::string name; - if (Host::GetUserName (uid, name)) + if (HostInfo::LookupUserName(uid, name)) { StreamString response; response.PutCStringAsRawHex8 (name.c_str()); return SendPacketNoLock (response.GetData(), response.GetSize()); } } +#endif return SendErrorResponse (5); } @@ -1558,19 +1560,21 @@ GDBRemoteCommunicationServer::Handle_qUserName (StringExtractorGDBRemote &packet GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServer::Handle_qGroupName (StringExtractorGDBRemote &packet) { +#if !defined(LLDB_DISABLE_POSIX) // Packet format: "qGroupName:%i" where %i is the gid packet.SetFilePos(::strlen ("qGroupName:")); uint32_t gid = packet.GetU32 (UINT32_MAX); if (gid != UINT32_MAX) { std::string name; - if (Host::GetGroupName (gid, name)) + if (HostInfo::LookupGroupName(gid, name)) { StreamString response; response.PutCStringAsRawHex8 (name.c_str()); return SendPacketNoLock (response.GetData(), response.GetSize()); } } +#endif return SendErrorResponse (6); } |