summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-02-01 00:47:49 +0000
committerGreg Clayton <gclayton@apple.com>2013-02-01 00:47:49 +0000
commit13fbb991077f389d2b3cbb5f5673ad0d815af709 (patch)
tree8435827333d24e64461b3b0c8a391ea1afff7f39 /lldb/source/API/SBTarget.cpp
parent3dcaa2c8c817ef9e888cc118a980377e341e10ec (diff)
downloadbcm5719-llvm-13fbb991077f389d2b3cbb5f5673ad0d815af709.tar.gz
bcm5719-llvm-13fbb991077f389d2b3cbb5f5673ad0d815af709.zip
Allow the target to give out the size of the red zone for given ABIs.
A bit of cleanup in the heap module. llvm-svn: 174129
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index f4582da5e1d..115703e81f8 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -2568,3 +2568,22 @@ SBTarget::EvaluateExpression (const char *expr, const SBExpressionOptions &optio
return expr_result;
}
+
+lldb::addr_t
+SBTarget::GetStackRedZoneSize()
+{
+ TargetSP target_sp(GetSP());
+ if (target_sp)
+ {
+ ABISP abi_sp;
+ ProcessSP process_sp (target_sp->GetProcessSP());
+ if (process_sp)
+ abi_sp = process_sp->GetABI();
+ else
+ abi_sp = ABI::FindPlugin(target_sp->GetArchitecture());
+ if (abi_sp)
+ return abi_sp->GetRedZoneSize();
+ }
+ return 0;
+}
+
OpenPOWER on IntegriCloud