summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/backtrace/Backtrace.h8
-rw-r--r--include/backtrace/backtrace.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/include/backtrace/Backtrace.h b/include/backtrace/Backtrace.h
index bf4efd3..df40b87 100644
--- a/include/backtrace/Backtrace.h
+++ b/include/backtrace/Backtrace.h
@@ -60,6 +60,7 @@ public:
// Create a string representing the formatted line of backtrace information
// for a single frame.
virtual std::string FormatFrameData(size_t frame_num);
+ virtual std::string FormatFrameData(const backtrace_frame_data_t* frame);
pid_t Pid() { return backtrace_.pid; }
pid_t Tid() { return backtrace_.tid; }
@@ -68,9 +69,16 @@ public:
const backtrace_t* GetBacktrace() { return &backtrace_; }
const backtrace_frame_data_t* GetFrame(size_t frame_num) {
+ if (frame_num > NumFrames()) {
+ return NULL;
+ }
return &backtrace_.frames[frame_num];
}
+ const backtrace_map_info_t* GetMapList() {
+ return map_info_;
+ }
+
protected:
Backtrace(BacktraceImpl* impl, pid_t pid, backtrace_map_info_t* map_info);
diff --git a/include/backtrace/backtrace.h b/include/backtrace/backtrace.h
index fa81f21..cfcbf0f 100644
--- a/include/backtrace/backtrace.h
+++ b/include/backtrace/backtrace.h
@@ -44,6 +44,7 @@ typedef struct backtrace_map_info {
} backtrace_map_info_t;
typedef struct {
+ size_t num; /* The current fame number. */
uintptr_t pc; /* The absolute pc. */
uintptr_t sp; /* The top of the stack. */
size_t stack_size; /* The size of the stack, zero indicate an unknown stack size. */