[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. For your interest. NetBSD will not use procfs for any operation. Today I implemented reading the process map with sysctl(7): https://github.com/NetBSD/pkgsrc-wip/commit/d4af36204feb616dd83f5f3ffb871a4b7274e5e0 procfs is used by SunOS.. but for regular debuggers they

[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-15 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297843: Remove some ProcFileReader occurences (authored by labath). Changed prior to commit: https://reviews.llvm.org/D30942?vs=91727&id=91875#toc Repository: rL LLVM https://reviews.llvm.org/D30942

[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-15 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: source/Host/linux/Host.cpp:166 + llvm::SmallString<64> ProcExe; + (llvm::Twine("/proc/") + llvm::Twine(pid) + "/exe").toVector(ProcExe); + llvm::SmallString<0> ExePath; labath wrote: > zturner wrote: > > You can make t

[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-14 Thread Eugene Zemtsov via Phabricator via lldb-commits
eugene accepted this revision. eugene added inline comments. Comment at: source/Host/linux/Host.cpp:167 + (llvm::Twine("/proc/") + llvm::Twine(pid) + "/exe").toVector(ProcExe); + llvm::SmallString<0> ExePath; + ExePath.assign(PATH_MAX, '\0'); std::string? Do w

[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-14 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Comment at: source/Host/linux/Host.cpp:63-70 + Line = Line.ltrim(); + uint32_t RGid, EGid; + Line.consumeInteger(10, RGid); + Line = Line.ltrim(); + Line.consumeInteger(10, EGid); + + ProcessInfo.SetGroupID(RGid); -

[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-14 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Code looks much nicer than before! Comment at: source/Host/linux/Host.cpp:59-60 - static const char tracerpid_token[] = "TracerPid:"; - char *buf_tracerpid = strstr((char *)buf_sp->GetBytes(), tracerpid_token); - if (buf_tracerpid) { -// Tracer

[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-14 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added subscribers: mgorny, srhines. ProcFileReader is the cause of the dependency from Host to ProcessLinux module. Since it's interface is also obsolete (ReadIntoDataBuffer is trivially replaceable by llvm::MemoryBuffer functions and ProcessLineByLine is trivi