[all-commits] [llvm/llvm-project] 47b713: [lldb] Fix incorrect error handling in GDBRemoteC...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Thu Nov 19 10:14:34 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 47b7138b484b8fc94633ac4750a11acad797473e
      https://github.com/llvm/llvm-project/commit/47b7138b484b8fc94633ac4750a11acad797473e
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-11-19 (Thu, 19 Nov 2020)

  Changed paths:
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list