[Lldb-commits] [PATCH] D107811: [lldb] [gdb-remote] Add fallbacks for vFile:mode and vFile:exists
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 10 00:52:21 PDT 2021
labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:3184-3185
+ // Fallback to fstat.
+ llvm::Optional<GDBRemoteFStatData> st = Stat(file_spec);
+ if (st) {
+ file_permissions = st->gdb_st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
----------------
This is exactly the use case that if-declarations (`if (Optional<...> st = ...)`were designed for.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107811/new/
https://reviews.llvm.org/D107811
More information about the lldb-commits
mailing list