aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2021-09-24 23:36:49 +0200
committerMichał Górny <mgorny@moritz.systems>2021-09-25 14:19:19 +0200
commit3a6ba3675177cb5e47dee325f300aced4cd864ed (patch)
tree2beb8e402b78598b299587f1022b189992602939 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
parent2c28e3f008b6b93a58635999ff20572de01e8392 (diff)
downloadllvm-3a6ba3675177cb5e47dee325f300aced4cd864ed.zip
llvm-3a6ba3675177cb5e47dee325f300aced4cd864ed.tar.gz
llvm-3a6ba3675177cb5e47dee325f300aced4cd864ed.tar.bz2
[lldb] Convert misc. StringConvert uses
Replace misc. StringConvert uses with llvm::to_integer() and llvm::to_float(), except for cases where further refactoring is planned. The purpose of this change is to eliminate the StringConvert API that is duplicate to LLVM, and less correct in behavior at the same time. Differential Revision: https://reviews.llvm.org/D110447
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 013d407..adc8d6f 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -22,7 +22,6 @@
#include "lldb/Host/Pipe.h"
#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Host/Socket.h"
-#include "lldb/Host/StringConvert.h"
#include "lldb/Host/ThreadLauncher.h"
#include "lldb/Host/common/TCPSocket.h"
#include "lldb/Host/posix/ConnectionFileDescriptorPosix.h"
@@ -1173,7 +1172,9 @@ Status GDBRemoteCommunication::StartDebugserverProcess(
port_cstr, num_bytes, std::chrono::seconds{10}, num_bytes);
if (error.Success() && (port != nullptr)) {
assert(num_bytes > 0 && port_cstr[num_bytes - 1] == '\0');
- uint16_t child_port = StringConvert::ToUInt32(port_cstr, 0);
+ uint16_t child_port = 0;
+ // FIXME: improve error handling
+ llvm::to_integer(port_cstr, child_port);
if (*port == 0 || *port == child_port) {
*port = child_port;
LLDB_LOGF(log,