llvm-project/lldb/source
David Spickett 71cf97e95b Reland "[lldb] Don't send invalid region addresses to lldb server"
This reverts commit c65627a1fe.

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
2020-10-05 11:50:29 +01:00
..
API [lldb] Remove redundant ctor call (NFC) 2020-09-29 10:05:12 -07:00
Breakpoint [lldb][NFC] Use llvm::is_contained instead of std::find in a few places 2020-08-13 14:11:28 +02:00
Commands Reland "[lldb] Don't send invalid region addresses to lldb server" 2020-10-05 11:50:29 +01:00
Core Add a "Trace" plug-in to LLDB to add process trace support in stages. 2020-09-21 17:13:18 -07:00
DataFormatters [lldb][NFC] Remove FormatMap 2020-07-23 18:34:59 +02:00
Expression Use zu rather than llu format specifier for size_t (-Wformat warning fix). 2020-09-16 19:28:05 -07:00
Host [lldb] [netbsd] Avoid comparison of signed and unsigned integers 2020-09-10 15:49:15 +02:00
Initialization [lldb] Always record both the working and home directory. 2020-09-02 20:53:11 -07:00
Interpreter Add a "Trace" plug-in to LLDB to add process trace support in stages. 2020-09-21 17:13:18 -07:00
Plugins Reland "[lldb] Don't send invalid region addresses to lldb server" 2020-10-05 11:50:29 +01:00
Symbol Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter."" 2020-09-29 12:01:14 -07:00
Target Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter."" 2020-09-29 12:01:14 -07:00
Utility Utility: ignore OS version on non-Darwin targets in `ArchSpec` 2020-09-23 18:21:34 -07:00
CMakeLists.txt Make LLVM_APPEND_VC_REV=OFF affect clang, lld, and lldb as well. 2020-01-16 19:04:08 -05:00
lldb.cpp [lldb] Fix version string when using LLDB_REVISION but not LLDB_REPOSITORY 2020-02-20 10:07:50 -08:00