diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectPlatform.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index d176d52cb48..7f840e4a8ad 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -19,6 +19,7 @@ #include "lldb/Core/Debugger.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" +#include "lldb/Host/StringConvert.h" #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandOptionValidators.h" @@ -104,7 +105,7 @@ public: case 'v': { bool ok; - uint32_t perms = Args::StringToUInt32(option_arg, 777, 8, &ok); + uint32_t perms = StringConvert::ToUInt32(option_arg, 777, 8, &ok); if (!ok) error.SetErrorStringWithFormat("invalid value for permissions: %s", option_arg); else @@ -751,7 +752,7 @@ public: { std::string cmd_line; args.GetCommandString(cmd_line); - const lldb::user_id_t fd = Args::StringToUInt64(cmd_line.c_str(), UINT64_MAX); + const lldb::user_id_t fd = StringConvert::ToUInt64(cmd_line.c_str(), UINT64_MAX); Error error; bool success = platform_sp->CloseFile(fd, error); if (success) @@ -803,7 +804,7 @@ public: { std::string cmd_line; args.GetCommandString(cmd_line); - const lldb::user_id_t fd = Args::StringToUInt64(cmd_line.c_str(), UINT64_MAX); + const lldb::user_id_t fd = StringConvert::ToUInt64(cmd_line.c_str(), UINT64_MAX); std::string buffer(m_options.m_count,0); Error error; uint32_t retcode = platform_sp->ReadFile(fd, m_options.m_offset, &buffer[0], m_options.m_count, error); @@ -849,12 +850,12 @@ protected: switch (short_option) { case 'o': - m_offset = Args::StringToUInt32(option_arg, 0, 0, &success); + m_offset = StringConvert::ToUInt32(option_arg, 0, 0, &success); if (!success) error.SetErrorStringWithFormat("invalid offset: '%s'", option_arg); break; case 'c': - m_count = Args::StringToUInt32(option_arg, 0, 0, &success); + m_count = StringConvert::ToUInt32(option_arg, 0, 0, &success); if (!success) error.SetErrorStringWithFormat("invalid offset: '%s'", option_arg); break; @@ -930,7 +931,7 @@ public: std::string cmd_line; args.GetCommandString(cmd_line); Error error; - const lldb::user_id_t fd = Args::StringToUInt64(cmd_line.c_str(), UINT64_MAX); + const lldb::user_id_t fd = StringConvert::ToUInt64(cmd_line.c_str(), UINT64_MAX); uint32_t retcode = platform_sp->WriteFile (fd, m_options.m_offset, &m_options.m_data[0], @@ -977,7 +978,7 @@ protected: switch (short_option) { case 'o': - m_offset = Args::StringToUInt32(option_arg, 0, 0, &success); + m_offset = StringConvert::ToUInt32(option_arg, 0, 0, &success); if (!success) error.SetErrorStringWithFormat("invalid offset: '%s'", option_arg); break; @@ -1537,37 +1538,37 @@ protected: switch (short_option) { case 'p': - match_info.GetProcessInfo().SetProcessID (Args::StringToUInt32 (option_arg, LLDB_INVALID_PROCESS_ID, 0, &success)); + match_info.GetProcessInfo().SetProcessID (StringConvert::ToUInt32 (option_arg, LLDB_INVALID_PROCESS_ID, 0, &success)); if (!success) error.SetErrorStringWithFormat("invalid process ID string: '%s'", option_arg); break; case 'P': - match_info.GetProcessInfo().SetParentProcessID (Args::StringToUInt32 (option_arg, LLDB_INVALID_PROCESS_ID, 0, &success)); + match_info.GetProcessInfo().SetParentProcessID (StringConvert::ToUInt32 (option_arg, LLDB_INVALID_PROCESS_ID, 0, &success)); if (!success) error.SetErrorStringWithFormat("invalid parent process ID string: '%s'", option_arg); break; case 'u': - match_info.GetProcessInfo().SetUserID (Args::StringToUInt32 (option_arg, UINT32_MAX, 0, &success)); + match_info.GetProcessInfo().SetUserID (StringConvert::ToUInt32 (option_arg, UINT32_MAX, 0, &success)); if (!success) error.SetErrorStringWithFormat("invalid user ID string: '%s'", option_arg); break; case 'U': - match_info.GetProcessInfo().SetEffectiveUserID (Args::StringToUInt32 (option_arg, UINT32_MAX, 0, &success)); + match_info.GetProcessInfo().SetEffectiveUserID (StringConvert::ToUInt32 (option_arg, UINT32_MAX, 0, &success)); if (!success) error.SetErrorStringWithFormat("invalid effective user ID string: '%s'", option_arg); break; case 'g': - match_info.GetProcessInfo().SetGroupID (Args::StringToUInt32 (option_arg, UINT32_MAX, 0, &success)); + match_info.GetProcessInfo().SetGroupID (StringConvert::ToUInt32 (option_arg, UINT32_MAX, 0, &success)); if (!success) error.SetErrorStringWithFormat("invalid group ID string: '%s'", option_arg); break; case 'G': - match_info.GetProcessInfo().SetEffectiveGroupID (Args::StringToUInt32 (option_arg, UINT32_MAX, 0, &success)); + match_info.GetProcessInfo().SetEffectiveGroupID (StringConvert::ToUInt32 (option_arg, UINT32_MAX, 0, &success)); if (!success) error.SetErrorStringWithFormat("invalid effective group ID string: '%s'", option_arg); break; @@ -1730,7 +1731,7 @@ protected: for (size_t i=0; i<argc; ++ i) { const char *arg = args.GetArgumentAtIndex(i); - lldb::pid_t pid = Args::StringToUInt32 (arg, LLDB_INVALID_PROCESS_ID, 0, &success); + lldb::pid_t pid = StringConvert::ToUInt32 (arg, LLDB_INVALID_PROCESS_ID, 0, &success); if (success) { ProcessInstanceInfo proc_info; @@ -1805,7 +1806,7 @@ public: { case 'p': { - lldb::pid_t pid = Args::StringToUInt32 (option_arg, LLDB_INVALID_PROCESS_ID, 0, &success); + lldb::pid_t pid = StringConvert::ToUInt32 (option_arg, LLDB_INVALID_PROCESS_ID, 0, &success); if (!success || pid == LLDB_INVALID_PROCESS_ID) { error.SetErrorStringWithFormat("invalid process ID '%s'", option_arg); @@ -2055,7 +2056,7 @@ public: case 't': { bool success; - timeout = Args::StringToUInt32(option_value, 10, 10, &success); + timeout = StringConvert::ToUInt32(option_value, 10, 10, &success); if (!success) error.SetErrorStringWithFormat("could not convert \"%s\" to a numeric value.", option_value); break; |