Skip to content

[lldb] Remove lldb-server min and max gdbserver port options #133275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 1, 2025

Conversation

DavidSpickett
Copy link
Collaborator

@DavidSpickett DavidSpickett commented Mar 27, 2025

Since lldb 20, these have had no effect:
https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html#changes-to-lldb

lldb-server now listens to a single port for gdbserver connections and
provides that port to the connection handler processes. This means that
only 2 ports need to be opened in the firewall (one for the lldb-server
platform, one for gdbserver connections). In addition, due to this work,
lldb-server now works on Windows in the server mode.

Remove them.

Since lldb 20, these have done nothing:
https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html#changes-to-lldb

> lldb-server now listens to a single port for gdbserver connections and
> provides that port to the connection handler processes. This means that
> only 2 ports need to be opened in the firewall (one for the lldb-server
> platform, one for gdbserver connections). In addition, due to this work,
lldb-server now works on Windows in the server mode.

Remove them.
@llvmbot
Copy link
Member

llvmbot commented Mar 27, 2025

@llvm/pr-subscribers-lldb

Author: David Spickett (DavidSpickett)

Changes

Since lldb 20, these have had no effect:
https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html#changes-to-lldb

> lldb-server now listens to a single port for gdbserver connections and
> provides that port to the connection handler processes. This means that
> only 2 ports need to be opened in the firewall (one for the lldb-server
> platform, one for gdbserver connections). In addition, due to this work,
lldb-server now works on Windows in the server mode.

Remove them.


Full diff: https://github.com/llvm/llvm-project/pull/133275.diff

2 Files Affected:

  • (modified) lldb/tools/lldb-server/lldb-platform.cpp (-2)
  • (modified) llvm/docs/ReleaseNotes.md (+3)
diff --git a/lldb/tools/lldb-server/lldb-platform.cpp b/lldb/tools/lldb-server/lldb-platform.cpp
index 880b45b989b9c..24a2ea12ae3f1 100644
--- a/lldb/tools/lldb-server/lldb-platform.cpp
+++ b/lldb/tools/lldb-server/lldb-platform.cpp
@@ -66,8 +66,6 @@ static struct option g_long_options[] = {
     {"log-channels", required_argument, nullptr, 'c'},
     {"listen", required_argument, nullptr, 'L'},
     {"gdbserver-port", required_argument, nullptr, 'P'},
-    {"min-gdbserver-port", required_argument, nullptr, 'm'},
-    {"max-gdbserver-port", required_argument, nullptr, 'M'},
     {"socket-file", required_argument, nullptr, 'f'},
     {"server", no_argument, &g_server, 1},
     {"child-platform-fd", required_argument, nullptr, 2},
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index bb75aec44ef8e..c633d9ca9bd52 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -214,6 +214,9 @@ Changes to LLDB
   Windows 11 on the Microsoft SQ2 and Snapdragon Elite X platforms.
 * LLDB now steps through C++ thunks. This fixes an issue where previously, it
   wouldn't step into multiple inheritance virtual functions.
+* The `min-gdbserver-port` and `max-gdbserver-port` options have been removed
+  from `lldb-server`'s platform mode. Since the changes to `lldb-server`'s port
+  handling in LLDB 20, these options have had no effect.
 
 ### Changes to lldb-dap
 

@DavidSpickett DavidSpickett merged commit 7581cb6 into llvm:main Apr 1, 2025
7 of 11 checks passed
@DavidSpickett DavidSpickett deleted the lldb-ports branch April 1, 2025 09:05
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request Apr 2, 2025
…3275)

Since lldb 20, these have had no effect:
https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html#changes-to-lldb

> lldb-server now listens to a single port for gdbserver connections and
> provides that port to the connection handler processes. This means
that
> only 2 ports need to be opened in the firewall (one for the
lldb-server
> platform, one for gdbserver connections). In addition, due to this
work,
lldb-server now works on Windows in the server mode.

Remove them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants