llvm-project/lldb/source
Raphael Isemann 47b7138b48 [lldb] Fix incorrect error handling in GDBRemoteCommunicationClient::SendGetSupportedTraceType
GDBRemoteCommunicationClient::SendGetSupportedTraceType is checking whether the
response is `!response.IsNormalResponse()` and infers from that that it is an error response.
However, it could be either "unsupported" or "error". If we get an unsupported response,
the code then tries to generate an llvm::Expected from the non-error response which then asserts.

Debugserver doesn't implement `jLLDBTraceSupportedType`, so we get an unsupported response
whenever this function is called on macOS.

This fixes the TestAproposWithProcess on macOS (where the `apropos` command will query
the CommandObjectTraceStart which then sends the trace type query package).

Reviewed By: wallace, shafik

Differential Revision: https://reviews.llvm.org/D91801
2020-11-19 19:14:04 +01:00
..
API [lldb] Propagate llvm::Error to report_fatal_error 2020-11-10 08:19:47 -08: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 [trace][intel-pt] Scaffold the 'thread trace start | stop' commands 2020-11-18 18:24:36 -08:00
Core [trace][intel-pt] Scaffold the 'thread trace start | stop' commands 2020-11-18 18:24:36 -08:00
DataFormatters [lldb/DataFormatters] Display null C++ pointers as nullptr 2020-11-12 15:24:06 -08:00
Expression [lldb/DataFormatters] Display null C++ pointers as nullptr 2020-11-12 15:24:06 -08:00
Host [lldb][NFC] Move OptionDefinition from lldb-private-types.h to its own Utility header 2020-11-12 15:30:26 +01:00
Initialization [lldb] Always record both the working and home directory. 2020-09-02 20:53:11 -07:00
Interpreter [trace][intel-pt] Scaffold the 'thread trace start | stop' commands 2020-11-18 18:24:36 -08:00
Plugins [lldb] Fix incorrect error handling in GDBRemoteCommunicationClient::SendGetSupportedTraceType 2020-11-19 19:14:04 +01:00
Symbol [lldb][ObjectFile] Relocate sections for in-memory objects (e.g. received via JITLoaderGDB) 2020-11-10 11:37:53 +01:00
Target [trace][intel-pt] Scaffold the 'thread trace start | stop' commands 2020-11-18 18:24:36 -08:00
Utility [intel-pt][trace] Implement a "get supported trace type" packet 2020-11-11 10:35:58 -08:00
CMakeLists.txt Remove HAVE_VCS_VERSION_INC, not needed 2020-10-29 13:09:05 -07:00
lldb.cpp Remove HAVE_VCS_VERSION_INC, not needed 2020-10-29 13:09:05 -07:00