[Lldb-commits] [PATCH] Add qModuleInfo request in order to get module information (uuid, triple, ..) by module path from remote platform.
Greg Clayton
clayborg at gmail.com
Mon Feb 23 11:25:29 PST 2015
A few changes only for the MD5 computation calls: don't require people to pass magic values of 0 for offset and 0 for length when they want the whole file. See inlined comments.
================
Comment at: source/Host/common/FileSystem.cpp:57-61
@@ -47,3 +56,7 @@
bool
-FileSystem::CalculateMD5(const FileSpec &file_spec, uint64_t &low, uint64_t &high)
+FileSystem::CalculateMD5(const FileSpec &file_spec,
+ uint64_t offset,
+ uint64_t length,
+ uint64_t &low,
+ uint64_t &high)
{
----------------
Can we make one version where offset and length are supplied and one that doesn't require it? I hate to have magic values like 0 and 0 for offset and length unless we can make them default argument values.
================
Comment at: source/Host/common/FileSystem.cpp:75-78
@@ -61,3 +74,6 @@
bool
-FileSystem::CalculateMD5AsString(const FileSpec &file_spec, std::string& digest_str)
+FileSystem::CalculateMD5AsString(const FileSpec &file_spec,
+ uint64_t offset,
+ uint64_t length,
+ std::string& digest_str)
{
----------------
Can we make one version where offset and length are supplied and one that doesn't require it? I hate to have magic values like 0 and 0 for offset and length unless we can make them default argument values.
================
Comment at: source/Plugins/Platform/MacOSX/PlatformDarwin.cpp:395
@@ -394,3 +394,3 @@
uint64_t high_local,high_remote,low_local,low_remote;
- FileSystem::CalculateMD5(module_cache_spec, low_local, high_local);
+ FileSystem::CalculateMD5(module_cache_spec, 0, 0, low_local, high_local);
m_remote_platform_sp->CalculateMD5(module_spec.GetFileSpec(), low_remote, high_remote);
----------------
Call the version that doesn't require file offset and size.
================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp:828
@@ -822,3 +827,3 @@
StreamGDBRemote response;
- if (FileSystem::CalculateMD5(FileSpec(path.c_str(), false), a, b) == false)
+ if (!FileSystem::CalculateMD5(FileSpec(path.c_str(), false), 0, 0, a, b))
{
----------------
Call the version that doesn't require file offset and size.
================
Comment at: source/Target/Platform.cpp:1470
@@ -1469,3 +1469,3 @@
if (IsHost())
- return FileSystem::CalculateMD5(file_spec, low, high);
+ return FileSystem::CalculateMD5(file_spec, 0, 0, low, high);
else
----------------
Call the version that doesn't require file offset and size.
http://reviews.llvm.org/D7709
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list