summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
diff options
context:
space:
mode:
authorLuke Drummond <luke.drummond@codeplay.com>2016-08-03 17:31:58 +0000
committerLuke Drummond <luke.drummond@codeplay.com>2016-08-03 17:31:58 +0000
commit5d05763761758c7ab425f32221571b94d4bd2b61 (patch)
tree30071cafb46ff2cd4dbd706a473f583e52adf170 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
parent51a767c6b86b6f2e2c10a308e50b2ab3a423b8b8 (diff)
downloadbcm5719-llvm-5d05763761758c7ab425f32221571b94d4bd2b61.tar.gz
bcm5719-llvm-5d05763761758c7ab425f32221571b94d4bd2b61.zip
[RenderScript] Always create a new allocation ID in CaptureAllocationInit hook
Due to internal reuse of buffers in the RenderScript runtime by the system allocator, comparing pointers is not a safe way to check whether an allocation is tracked by lldb. This change updates the lldb RenderScript internal hook callback to properly identify and remove old allocations that had have an address that is currently being tracked. This change also removes the need for `lldb_private::renderscript::LookupAllocation` to take a `create` flag, as this is now always the case. Original Author: <dean@codeplay.com> Subscribers: lldb-commits llvm-svn: 277613
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index d2ae4f10b55..50db2e13bcb 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -408,10 +408,13 @@ private:
// Search for a previously saved allocation detail object using a target address.
// If an allocation does not exist for this address then nullptr will be returned.
- // If 'create' is true and there is no previous allocation then a new allocation
- // detail object will be created for this address and returned.
AllocationDetails *
- LookUpAllocation(lldb::addr_t address, bool create);
+ LookUpAllocation(lldb::addr_t address);
+
+ // Creates a new allocation with the specified address assigning a new ID and removes
+ // any previous stored allocation which has the same address.
+ AllocationDetails *
+ CreateAllocation(lldb::addr_t address);
bool
GetOverrideExprOptions(clang::TargetOptions &prototype) override;
OpenPOWER on IntegriCloud