Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows LLDB does not mask bytes that have breakpoint on it when reading memory #60063

Open
xusheng6 opened this issue Jan 16, 2023 · 1 comment

Comments

@xusheng6
Copy link
Contributor

xusheng6 commented Jan 16, 2023

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:

.\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 #60062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants