summaryrefslogtreecommitdiffstats
path: root/include/backtrace
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-03-17 14:42:03 -0700
committerChristopher Ferris <cferris@google.com>2015-03-17 14:56:02 -0700
commit2b4a63fc6a4bfc6db69901258539276b888c7ec4 (patch)
treef111f48c45ff5ffd16401bbe0c89a71fc86c0a2d /include/backtrace
parent928cbdd2c34cd5db9b344e593866f9e1e1e477e2 (diff)
downloadsystem_core-2b4a63fc6a4bfc6db69901258539276b888c7ec4.zip
system_core-2b4a63fc6a4bfc6db69901258539276b888c7ec4.tar.gz
system_core-2b4a63fc6a4bfc6db69901258539276b888c7ec4.tar.bz2
Add variable length read to Backtrace.
Included tests for this new feature. Changed the NULLs to nullptr in backtrace_test. Changed UniquePtr to std::unique_ptr in backtrace_test. Change-Id: I92375465b8f8ba84589834cc162db5915bf1be81
Diffstat (limited to 'include/backtrace')
-rw-r--r--include/backtrace/Backtrace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/backtrace/Backtrace.h b/include/backtrace/Backtrace.h
index e2d718b..8c39acb 100644
--- a/include/backtrace/Backtrace.h
+++ b/include/backtrace/Backtrace.h
@@ -84,6 +84,12 @@ public:
// Read the data at a specific address.
virtual bool ReadWord(uintptr_t ptr, word_t* out_value) = 0;
+ // Read arbitrary data from a specific address. If a read request would
+ // span from one map to another, this call only reads up until the end
+ // of the current map.
+ // Returns the total number of bytes actually read.
+ virtual size_t Read(uintptr_t addr, uint8_t* buffer, size_t bytes) = 0;
+
// Create a string representing the formatted line of backtrace information
// for a single frame.
virtual std::string FormatFrameData(size_t frame_num);