diff options
author | Jason Molenda <jmolenda@apple.com> | 2013-05-03 23:56:12 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2013-05-03 23:56:12 +0000 |
commit | c16b4af0d7aa1bd6b5657474cc46482aa158c3ec (patch) | |
tree | 3ac4632102f1a5dd55e09a9bebc31f8dc5a3d064 /lldb/source/Commands/CommandObjectTarget.cpp | |
parent | 47752e489e30f029f59ab70cbf18c1d35618e74f (diff) | |
download | bcm5719-llvm-c16b4af0d7aa1bd6b5657474cc46482aa158c3ec.tar.gz bcm5719-llvm-c16b4af0d7aa1bd6b5657474cc46482aa158c3ec.zip |
Remove the UUID::GetAsCString() method which required a buffer to save the
UUID string in; added UUID::GetAsString() which returns the uuid string in
a std::string. Updated callers to use the new method.
llvm-svn: 181078
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 62343789007..899db4c9ce1 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -2928,7 +2928,7 @@ protected: } else { - char uuid_cstr[64]; + std::string uuid_str; if (module_spec.GetFileSpec()) module_spec.GetFileSpec().GetPath (path, sizeof(path)); @@ -2936,16 +2936,14 @@ protected: path[0] = '\0'; if (module_spec.GetUUIDPtr()) - module_spec.GetUUID().GetAsCString(uuid_cstr, sizeof(uuid_cstr)); - else - uuid_cstr[0] = '\0'; + uuid_str = module_spec.GetUUID().GetAsString(); if (num_matches > 1) { result.AppendErrorWithFormat ("multiple modules match%s%s%s%s:\n", path[0] ? " file=" : "", path, - uuid_cstr[0] ? " uuid=" : "", - uuid_cstr); + !uuid_str.empty() ? " uuid=" : "", + uuid_str.c_str()); for (size_t i=0; i<num_matches; ++i) { if (matching_modules.GetModulePointerAtIndex(i)->GetFileSpec().GetPath (path, sizeof(path))) @@ -2957,8 +2955,8 @@ protected: result.AppendErrorWithFormat ("no modules were found that match%s%s%s%s.\n", path[0] ? " file=" : "", path, - uuid_cstr[0] ? " uuid=" : "", - uuid_cstr); + !uuid_str.empty() ? " uuid=" : "", + uuid_str.c_str()); } result.SetStatus (eReturnStatusFailed); } |