Reland "[lldb] Don't send invalid region addresses to lldb server"
This reverts commit c65627a1. The test immediately after the new invalid symbol test was failing on Windows. This was because when we called VirtualQueryEx to get the region info for 0x0, even if it succeeded we would call GetLastError. Which must have picked up the last error that was set while trying to lookup "not_an_address". Which happened to be 2. ("The system cannot find the file specified.") To fix this only call GetLastError when we know VirtualQueryEx has failed. (when it returns 0, which we were also checking for anyway) Also convert memory region to an early return style to make the logic clearer. Reviewed By: labath, stella.stamenova Differential Revision: https://reviews.llvm.org/D88229
Loading
Please register or sign in to comment