diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
commit | e81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch) | |
tree | 9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/API/SBFunction.cpp | |
parent | 85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff) |
Notes
Diffstat (limited to 'source/API/SBFunction.cpp')
-rw-r--r-- | source/API/SBFunction.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/source/API/SBFunction.cpp b/source/API/SBFunction.cpp index 2ec6072b51eb..2d03d53fd9f7 100644 --- a/source/API/SBFunction.cpp +++ b/source/API/SBFunction.cpp @@ -16,6 +16,7 @@ #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Type.h" +#include "lldb/Symbol/VariableList.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" @@ -216,6 +217,24 @@ SBFunction::GetEndAddress () return addr; } +const char * +SBFunction::GetArgumentName (uint32_t arg_idx) +{ + if (m_opaque_ptr) + { + Block &block = m_opaque_ptr->GetBlock(true); + VariableListSP variable_list_sp = block.GetBlockVariableList(true); + if (variable_list_sp) + { + VariableList arguments; + variable_list_sp->AppendVariablesWithScope (eValueTypeVariableArgument, arguments, true); + lldb::VariableSP variable_sp = arguments.GetVariableAtIndex(arg_idx); + if (variable_sp) + return variable_sp->GetName().GetCString(); + } + } + return nullptr; +} uint32_t SBFunction::GetPrologueByteSize () @@ -258,4 +277,13 @@ SBFunction::GetLanguage () return lldb::eLanguageTypeUnknown; } - +bool +SBFunction::GetIsOptimized () +{ + if (m_opaque_ptr) + { + if (m_opaque_ptr->GetCompileUnit()) + return m_opaque_ptr->GetCompileUnit()->GetIsOptimized(); + } + return false; +} |