diff options
| author | Jim Ingham <jingham@apple.com> | 2014-01-10 23:46:59 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2014-01-10 23:46:59 +0000 |
| commit | 1460e4bf0e722086d76de65ef74e76ec54a5534b (patch) | |
| tree | e7e8ee24d300abecbf45a972b88a0bf9002e6d63 /lldb/source/Plugins/Process/Utility | |
| parent | 87c2b0400d0675ad68d7e3d5b4e7e81508ba3c51 (diff) | |
| download | bcm5719-llvm-1460e4bf0e722086d76de65ef74e76ec54a5534b.tar.gz bcm5719-llvm-1460e4bf0e722086d76de65ef74e76ec54a5534b.zip | |
Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression evaluator to handle Indirect
symbols correctly. There were a couple of pieces to this.
1) When a breakpoint location finds itself pointing to an Indirect symbol, when the site for it is created
it needs to resolve the symbol and actually set the site at its target.
2) Not all breakpoints want to do this (i.e. a straight address breakpoint should always set itself on the
specified address, so somem machinery was needed to specify that.
3) I added some info to the break list output for indirect symbols so you could see what was happening.
Also I made it clear when we re-route through re-exported symbols.
4) I moved ResolveIndirectFunction from ProcessPosix to Process since it works the exact same way on Mac OS X
and the other posix systems. If we find a platform that doesn't do it this way, they can override the
call in Process.
5) Fixed one bug in RunThreadPlan, if you were trying to run a thread plan after a "running" event had
been broadcast, the event coalescing would cause you to miss the ThreadPlan running event. So I added
a way to override the coalescing.
6) Made DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan handle Indirect & Re-exported symbols.
<rdar://problem/15280639>
llvm-svn: 198976
Diffstat (limited to 'lldb/source/Plugins/Process/Utility')
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp index 6d1b04f7f1a..1d5d19fad25 100644 --- a/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp +++ b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp @@ -34,9 +34,16 @@ using namespace lldb; using namespace lldb_private; -bool lldb_private::InferiorCallMmap(Process *process, addr_t &allocated_addr, - addr_t addr, addr_t length, unsigned prot, - unsigned flags, addr_t fd, addr_t offset) { +bool +lldb_private::InferiorCallMmap (Process *process, + addr_t &allocated_addr, + addr_t addr, + addr_t length, + unsigned prot, + unsigned flags, + addr_t fd, + addr_t offset) +{ Thread *thread = process->GetThreadList().GetSelectedThread().get(); if (thread == NULL) return false; @@ -139,8 +146,11 @@ bool lldb_private::InferiorCallMmap(Process *process, addr_t &allocated_addr, return false; } -bool lldb_private::InferiorCallMunmap(Process *process, addr_t addr, - addr_t length) { +bool +lldb_private::InferiorCallMunmap (Process *process, + addr_t addr, + addr_t length) +{ Thread *thread = process->GetThreadList().GetSelectedThread().get(); if (thread == NULL) return false; @@ -209,7 +219,14 @@ bool lldb_private::InferiorCallMunmap(Process *process, addr_t addr, return false; } -bool lldb_private::InferiorCall(Process *process, const Address *address, addr_t &returned_func) { +// FIXME: This has nothing to do with Posix, it is just a convenience function that calls a +// function of the form "void * (*)(void)". We should find a better place to put this. + +bool +lldb_private::InferiorCall (Process *process, + const Address *address, + addr_t &returned_func) +{ Thread *thread = process->GetThreadList().GetSelectedThread().get(); if (thread == NULL || address == NULL) return false; @@ -233,7 +250,7 @@ bool lldb_private::InferiorCall(Process *process, const Address *address, addr_t lldb::ThreadPlanSP call_plan_sp (call_function_thread_plan); if (call_plan_sp) { - StreamFile error_strm; + StreamString error_strm; // This plan is a utility plan, so set it to discard itself when done. call_plan_sp->SetIsMasterPlan (true); call_plan_sp->SetOkayToDiscard(true); |

