summaryrefslogtreecommitdiffstats
path: root/source/API/SBModule.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-11-25 21:00:58 +0000
committeremaste <emaste@FreeBSD.org>2014-11-25 21:00:58 +0000
commit01ee1789d6aa7294e5966a97f8d29387f6f81699 (patch)
treec94307da318be46e5aeea1a325c1e91749506e4f /source/API/SBModule.cpp
parent788502c6f6261e2d84ef85d1052b41a6c5be31b3 (diff)
downloadFreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.zip
FreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.tar.gz
Import LLDB as of upstream SVN r216948 (git 50f7fe44)
This corresponds with the branchpoint for the 3.5 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/API/SBModule.cpp')
-rw-r--r--source/API/SBModule.cpp49
1 files changed, 24 insertions, 25 deletions
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index c8543d4..0d7dda1 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -110,10 +110,9 @@ SBModule::GetFileSpec () const
file_spec.SetFileSpec(module_sp->GetFileSpec());
if (log)
- {
- log->Printf ("SBModule(%p)::GetFileSpec () => SBFileSpec(%p)",
- module_sp.get(), file_spec.get());
- }
+ log->Printf ("SBModule(%p)::GetFileSpec () => SBFileSpec(%p)",
+ static_cast<void*>(module_sp.get()),
+ static_cast<const void*>(file_spec.get()));
return file_spec;
}
@@ -122,20 +121,18 @@ lldb::SBFileSpec
SBModule::GetPlatformFileSpec () const
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
-
+
SBFileSpec file_spec;
ModuleSP module_sp (GetSP ());
if (module_sp)
file_spec.SetFileSpec(module_sp->GetPlatformFileSpec());
-
+
if (log)
- {
- log->Printf ("SBModule(%p)::GetPlatformFileSpec () => SBFileSpec(%p)",
- module_sp.get(), file_spec.get());
- }
-
+ log->Printf ("SBModule(%p)::GetPlatformFileSpec () => SBFileSpec(%p)",
+ static_cast<void*>(module_sp.get()),
+ static_cast<const void*>(file_spec.get()));
+
return file_spec;
-
}
bool
@@ -143,22 +140,19 @@ SBModule::SetPlatformFileSpec (const lldb::SBFileSpec &platform_file)
{
bool result = false;
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
-
+
ModuleSP module_sp (GetSP ());
if (module_sp)
{
module_sp->SetPlatformFileSpec(*platform_file);
result = true;
}
-
+
if (log)
- {
- log->Printf ("SBModule(%p)::SetPlatformFileSpec (SBFileSpec(%p (%s)) => %i",
- module_sp.get(),
- platform_file.get(),
- platform_file->GetPath().c_str(),
- result);
- }
+ log->Printf ("SBModule(%p)::SetPlatformFileSpec (SBFileSpec(%p (%s)) => %i",
+ static_cast<void*>(module_sp.get()),
+ static_cast<const void*>(platform_file.get()),
+ platform_file->GetPath().c_str(), result);
return result;
}
@@ -201,10 +195,12 @@ SBModule::GetUUIDBytes () const
{
StreamString s;
module_sp->GetUUID().Dump (&s);
- log->Printf ("SBModule(%p)::GetUUIDBytes () => %s", module_sp.get(), s.GetData());
+ log->Printf ("SBModule(%p)::GetUUIDBytes () => %s",
+ static_cast<void*>(module_sp.get()), s.GetData());
}
else
- log->Printf ("SBModule(%p)::GetUUIDBytes () => NULL", module_sp.get());
+ log->Printf ("SBModule(%p)::GetUUIDBytes () => NULL",
+ static_cast<void*>(module_sp.get()));
}
return uuid_bytes;
}
@@ -225,6 +221,7 @@ SBModule::GetUUIDString () const
if (!uuid_string.empty())
{
strncpy (uuid_string_buffer, uuid_string.c_str(), sizeof (uuid_string_buffer));
+ uuid_string_buffer[sizeof (uuid_string_buffer) - 1] = '\0';
uuid_c_string = uuid_string_buffer;
}
@@ -234,10 +231,12 @@ SBModule::GetUUIDString () const
{
StreamString s;
module_sp->GetUUID().Dump (&s);
- log->Printf ("SBModule(%p)::GetUUIDString () => %s", module_sp.get(), s.GetData());
+ log->Printf ("SBModule(%p)::GetUUIDString () => %s",
+ static_cast<void*>(module_sp.get()), s.GetData());
}
else
- log->Printf ("SBModule(%p)::GetUUIDString () => NULL", module_sp.get());
+ log->Printf ("SBModule(%p)::GetUUIDString () => NULL",
+ static_cast<void*>(module_sp.get()));
}
return uuid_c_string;
}
OpenPOWER on IntegriCloud