diff options
| author | Greg Clayton <gclayton@apple.com> | 2015-05-28 03:27:22 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2015-05-28 03:27:22 +0000 |
| commit | 424a5dbc73ad8dc932a2544864535e9d0117d05d (patch) | |
| tree | 2b18ba4ac239472cdc7c3f30b9111b77bf19db0b /lldb/source/API | |
| parent | 08765fac3f4523883ce44ac938fa0523cfb8bbd6 (diff) | |
| download | bcm5719-llvm-424a5dbc73ad8dc932a2544864535e9d0117d05d.tar.gz bcm5719-llvm-424a5dbc73ad8dc932a2544864535e9d0117d05d.zip | |
Added a new API to SBFrame:
lldb::addr_t SBFrame::GetCFA();
This gets the CFA (call frame address) of the frame so it allows us to take an address that is on the stack and figure out which thread it comes from.
Also modified the heap.py module to be able to find out which variable in a frame's stack frame contains an address. This way when ptr_refs finds a match on the stack, it get then report which variable contains the pointer.
llvm-svn: 238393
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBFrame.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp index bc96ad1959c..224b6663a42 100644 --- a/lldb/source/API/SBFrame.cpp +++ b/lldb/source/API/SBFrame.cpp @@ -454,6 +454,17 @@ SBFrame::GetFrameID () const return frame_idx; } +lldb::addr_t +SBFrame::GetCFA () const +{ + ExecutionContext exe_ctx(m_opaque_sp.get()); + StackFrame *frame = exe_ctx.GetFramePtr(); + if (frame) + return frame->GetStackID().GetCallFrameAddress(); + return LLDB_INVALID_ADDRESS; +} + + addr_t SBFrame::GetPC () const { |

