llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.78k stars 11.9k forks source link

[lldb][Windows] The GDB protocol code should not be depending on the host definitions of the permission constants #92255

Open slydiman opened 5 months ago

slydiman commented 5 months ago

GDBRemoteCommunicationClient::GetFilePermissions() always return 0 on the Windows host because S_IRWXU, S_IRWXG and S_IRWXO are 0. The problem code is the following

file_permissions = mode & (S_IRWXU | S_IRWXG | S_IRWXO);

Related tests are lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py

These tests must be independent of the host OS.

llvmbot commented 5 months ago

@llvm/issue-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

`GDBRemoteCommunicationClient::GetFilePermissions()` always return 0 on the Windows host because S_IRWXU, S_IRWXG and S_IRWXO are 0. The problem code is the following ``` file_permissions = mode & (S_IRWXU | S_IRWXG | S_IRWXO); ``` Related tests are lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py - test_file_permissions - test_file_permissions_fallback These tests must be independent of the host OS.