[lldb] Removed gdbserver ports map from lldb-server (#104238) · llvm/llvm-project@2e89312 (original) (raw)

File tree

13 files changed

lines changed

13 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -147,21 +147,8 @@ GDB-SERVER CONNECTIONS
147 147
148 148 .. option:: --gdbserver-port <port>
149 149
150 - Define a port to be used for gdb-server connections. Can be specified multiple
151 - times to allow multiple ports. Has no effect if --min-gdbserver-port
152 - and --max-gdbserver-port are specified.
153 -
154 -.. option:: --min-gdbserver-port <port>
155 -.. option:: --max-gdbserver-port <port>
156 -
157 - Specify the range of ports that can be used for gdb-server connections. Both
158 - options need to be specified simultaneously. Overrides --gdbserver-port.
159 -
160 -.. option:: --port-offset <offset>
161 -
162 - Add the specified offset to port numbers returned by server. This is useful
163 - if the server is running behind a firewall, and a range of ports is redirected
164 - to it with an offset.
150 + Define a port to be used for gdb-server connections. This port is used for
151 + multiple connections.
165 152
166 153 EXAMPLES
167 154 --------
Original file line number Diff line number Diff line change
@@ -149,30 +149,21 @@ to the host (refer to QEMU's manuals for the specific options).
149 149 * At least one to connect to the intial ``lldb-server``.
150 150 * One more if you want to use ``lldb-server`` in ``platform mode``, and have it
151 151 start a ``gdbserver`` instance for you.
152 -* A bunch more if you want to run tests against the ``lldb-server`` platform.
153 152
154 153 If you are doing either of the latter 2 you should also restrict what ports
155 154 ``lldb-server tries`` to use, otherwise it will randomly pick one that is almost
156 155 certainly not forwarded. An example of this is shown below.
157 156
158 157 ::
159 158
160 - $ lldb-server plaform --server --listen 0.0.0.0:54321 \
161 - --min-gdbserver-port 49140 --max-gdbserver-port 49150
159 + $ lldb-server plaform --server --listen 0.0.0.0:54321 --gdbserver-port 49140
162 160
163 161 The result of this is that:
164 162
165 163 * ``lldb-server`` platform mode listens externally on port ``54321``.
166 164
167 -* When it is asked to start a new gdbserver mode instance, it will use a port
168 -in the range ``49140`` to ``49150``.
165 +* When it is asked to start a new gdbserver mode instance, it will use the port
166 + ``49140``.
169 167
170 -Your VM configuration should have ports ``54321``, and ``49140`` to ``49150``
171 -forwarded for this to work.
172 -
173 -.. note::
174 - These options are used to create a "port map" within ``lldb-server``.
175 - Unfortunately this map is not cleaned up on Windows on connection close,
176 - and across a few uses you may run out of valid ports. To work around this,
177 - restart the platform every so often, especially after running a set of tests.
178 - This is tracked here: https://github.com/llvm/llvm-project/issues/90923
168 +Your VM configuration should have ports ``54321`` and ``49140`` forwarded for
169 +this to work.