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/Host/macosx/Symbols.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/Host/macosx/Symbols.cpp')
-rw-r--r-- | lldb/source/Host/macosx/Symbols.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lldb/source/Host/macosx/Symbols.cpp b/lldb/source/Host/macosx/Symbols.cpp index b2e0ca1d80c..138fec78517 100644 --- a/lldb/source/Host/macosx/Symbols.cpp +++ b/lldb/source/Host/macosx/Symbols.cpp @@ -364,9 +364,7 @@ LocateMacOSXFilesUsingDebugSymbols CFDictionaryRef uuid_dict = NULL; if (dict.get()) { - char uuid_cstr_buf[64]; - const char *uuid_cstr = uuid->GetAsCString (uuid_cstr_buf, sizeof(uuid_cstr_buf)); - CFCString uuid_cfstr (uuid_cstr); + CFCString uuid_cfstr (uuid->GetAsString().c_str()); uuid_dict = static_cast<CFDictionaryRef>(::CFDictionaryGetValue (dict.get(), uuid_cfstr.get())); if (uuid_dict) { @@ -719,21 +717,19 @@ Symbols::DownloadObjectAndSymbolFile (ModuleSpec &module_spec, bool force_lookup } if (g_dsym_for_uuid_exe_exists) { - char uuid_cstr_buffer[64]; + std::string uuid_str; char file_path[PATH_MAX]; - uuid_cstr_buffer[0] = '\0'; file_path[0] = '\0'; - const char *uuid_cstr = NULL; if (uuid_ptr) - uuid_cstr = uuid_ptr->GetAsCString(uuid_cstr_buffer, sizeof(uuid_cstr_buffer)); + uuid_str = uuid_ptr->GetAsString(); if (file_spec_ptr) file_spec_ptr->GetPath(file_path, sizeof(file_path)); StreamString command; - if (uuid_cstr) - command.Printf("%s --ignoreNegativeCache --copyExecutable %s", g_dsym_for_uuid_exe_path, uuid_cstr); + if (!uuid_str.empty()) + command.Printf("%s --ignoreNegativeCache --copyExecutable %s", g_dsym_for_uuid_exe_path, uuid_str.c_str()); else if (file_path && file_path[0]) command.Printf("%s --ignoreNegativeCache --copyExecutable %s", g_dsym_for_uuid_exe_path, file_path); @@ -760,9 +756,9 @@ Symbols::DownloadObjectAndSymbolFile (ModuleSpec &module_spec, bool force_lookup if (plist.get() && CFGetTypeID (plist.get()) == CFDictionaryGetTypeID ()) { - if (uuid_cstr) + if (!uuid_str.empty()) { - CFCString uuid_cfstr(uuid_cstr); + CFCString uuid_cfstr(uuid_str.c_str()); CFDictionaryRef uuid_dict = (CFDictionaryRef)CFDictionaryGetValue (plist.get(), uuid_cfstr.get()); success = GetModuleSpecInfoFromUUIDDictionary (uuid_dict, module_spec); } |