<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60063>60063</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Windows LLDB does not mask bytes that have breakpoint on it when reading memory
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          xusheng6
      </td>
    </tr>
</table>

<pre>
    LLDB on Windows seems not masking the bytes which have a breakpoint on it. Reading the memory returns 0xcc instead of its original value. This can be reproduced using the following binary [`helloworld.exe`](https://github.com/Vector35/debugger/blob/dev/test/binaries/Windows-x86_64/helloworld.exe):

```
.\lldb.exe C:\Users\xushe\debugger_build\debugger\test\binaries\Windows-x86_64\helloworld.exe
(lldb) target create "C:\\Users\\xushe\\debugger_build\\debugger\\test\\binaries\\Windows-x86_64\\helloworld.exe"
Current executable set to 'C:\Users\xushe\debugger_build\debugger\test\binaries\Windows-x86_64\helloworld.exe' (x86_64).
(lldb) b -s helloworld.exe -a 0x140001338
Breakpoint 1: where = helloworld.exe`helloworld.exe[0x0000000140001338], address = 0x0000000140001338
(lldb) r
Process 47296 launched: 'C:\Users\xushe\debugger_build\debugger\test\binaries\Windows-x86_64\helloworld.exe' (x86_64)
Process 47296 stopped
* thread #1, stop reason = breakpoint 1.1
    frame #0: 0x00007ff739cb1338 helloworld.exe
->  0x7ff739cb1338: int3
    0x7ff739cb1339: subl   $0x28, %esp
    0x7ff739cb133c: callq 0x7ff739cb159c
    0x7ff739cb1341: addq   $0x28, %rsp
(lldb) x 0x7ff739cb1338
0x7ff739cb1338: cc 83 ec 28 e8 5b 02 00 00 48 83 c4 28 e9 72 fe  ...(.[...H..(.r.
0x7ff739cb1348: ff ff cc cc 48 83 ec 28 e8 97 07 00 00 85 c0 74  ....H..(.......t
```

Related to https://github.com/llvm/llvm-project/issues/60062
</pre>
<img width="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