[all-commits] [llvm/llvm-project] d097f4: [lldb] Fixed the error `unable to launch a GDB ser...
Dmitry Vasilyev via All-commits
all-commits at lists.llvm.org
Thu Jul 18 02:05:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d097f430a172a5d798a39b416b1af84f4ec572e1
https://github.com/llvm/llvm-project/commit/d097f430a172a5d798a39b416b1af84f4ec572e1
Author: Dmitry Vasilyev <dvassiliev at accesssoftek.com>
Date: 2024-07-18 (Thu, 18 Jul 2024)
Changed paths:
M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
M lldb/tools/lldb-server/lldb-platform.cpp
Log Message:
-----------
[lldb] Fixed the error `unable to launch a GDB server` in API tests (#98833)
TestPlatformLaunchGDBServer.py runs `ldb-server` w/o parameters
`--min-gdbserver-port`, `--max-gdbserver-port` or `--gdbserver-port`. So
`gdbserver_portmap` is empty and
`gdbserver_portmap.GetNextAvailablePort()` will return 0. Do not call
`portmap_for_child.AllowPort(0)` in this case. Otherwise
`portmap_for_child.GetNextAvailablePort()` will allocate and never free
the port 0 and next call `portmap_for_child.GetNextAvailablePort()` will
fail.
Added few asserts in `GDBRemoteCommunicationServerPlatform::PortMap` to
avoid such issue in the future.
This patch fixes a bug added in #88845. The behaviour is very close to
#97537 w/o parameters `--min-gdbserver-port`, `--max-gdbserver-port` and
`--gdbserver-port`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list