<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/92255>92255</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lldb][Windows] The GDB protocol code should not be depending on the host definitions of the permission constants
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lldb,
platform:windows
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
slydiman
</td>
</tr>
</table>
<pre>
`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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k8-OmzAQh59muFiLiAkkHDgkQUR72tXuVttb5D9DcGtshE2jvH1lwzZSVVWKlAHD-OdvPphz6moQayiOUDQJm31vp9rpu1QDMwm38l5DmZ2b4xsO1uPJDsNslGBeWXPSCo2H_AD54Yy-VRpfcRqUc8oaB3QPtIIyI0zf2N2RCf08GZIRa4jvkXwqI-3Nkd46TzgKNjsk75fnt8_v34Ce1vJMmJFr_ULYhCRLIWsgO3z0SMbJco0DEVYiUS727azW9qbMdXkMymz9xctOabyMj5gE8oYM4XWgJQG6XxMQ2D0iPOqXcKb8-M_Wb6iZR0k8Ou9iVK0lB9qGG0Dbw-sz0LabjQj0mFZeoQPaXiW_TBHvRSxIafuBzv-h_qqZ7-w0BMLpeF92e4r7XP4-z38XLx3TmjPxc83_xdHhGnqY4yyIMhJHNBKNJ7aLWOOYXt7TRNa5rPKKJVhvdptityt3eZX0NXJalZILKatKFoJluSy3sqObknVbIUSiaprRbVZsig3N90WV5tuKiz3Pu33OdpztYZvhwJROtf41pHa6Jsq5GeuK0qJINOOoXVSV0oUsBXoCSseVD-SH2yJVWCqaZKpDpyc-Xx1sM62cd4_eXnkdzY-9igaK46okFA0Jdp2bYzDMW2H1opjr7awlMTZSWhgpc_1SOjKS2CmjfJRrZfcYARHWOM-Md8k86br3fnThC6JtEEH5fuapsAPQNuRc_57Gyf5AEbyIQII0kcnvAAAA__-GxzsD">