[Lldb-commits] [PATCH] D92035: [lldb] Use llvm::Optional for port in LaunchGDBServer

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 24 07:48:28 PST 2020


DavidSpickett created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
DavidSpickett requested review of this revision.
Herald added a subscriber: JDevlieghere.

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)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92035

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92035.307358.patch
Type: text/x-patch
Size: 5137 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201124/508ea4de/attachment-0001.bin>


More information about the lldb-commits mailing list