[all-commits] [llvm/llvm-project] a7f8d9: [lldb] Use llvm::Optional for port in LaunchGDBServer

David Spickett via All-commits all-commits at lists.llvm.org
Mon Nov 30 03:20:58 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a7f8d96b16a394a87230d592c727906f67a4ba07
      https://github.com/llvm/llvm-project/commit/a7f8d96b16a394a87230d592c727906f67a4ba07
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2020-11-30 (Mon, 30 Nov 2020)

  Changed paths:
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
    M lldb/tools/lldb-server/lldb-platform.cpp

  Log Message:
  -----------
  [lldb] Use llvm::Optional for port in LaunchGDBServer

Previously we used UINT16_MAX to mean no port/no specifc
port. This leads to confusion because 65535 is a valid
port number.

Instead use an optional. If you want a specific port call
LaunchGDBServer as normal, otherwise pass an empty optional
and it will be set to the port that gets chosen.
(or left empty in the case where we fail to find a port)

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D92035




More information about the All-commits mailing list