Add two new commands 'platform get-file-permissions' and 'platform
file-exists' for the respective bits of LLDB protocol. Add tests for
them. Fix error handling in GetFilePermissions().
Details
Diff Detail
Event Timeline
I was thinking this would be more useful in the SB form (and indeed we have SBPlatform::GetFilePermissions) already, though I suppose making it available through the command line does not hurt either..
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | ||
---|---|---|
661–665 | Unless I'm mistaken, the test does not actually run this code (as it tests the client bits). | |
lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py | ||
142–150 | Maybe it's time to create a separate test class which would perform this in the setUp/tearDown methods? |
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | ||
---|---|---|
661–665 | Yes, this is the case. Adding tests for the server is a bit out of scope for what I'm working on. |
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | ||
---|---|---|
661–665 | Why is that? You did have them in the other patches I looked at... Batching these changes in this way is particularly unfortunate because a casual observer might conclude that you actualy _are_ including a test for the bug you've fixed. |
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | ||
---|---|---|
661–665 | Just to be clear, are we talking of adding a generic server-side test for vFile:mode, or specifically one that triggers an error? Though thinking about it a bit more, using a file that does not exist should be good enough to trigger this. |
clang-format: please reformat the code