diff options
author | Jason Molenda <jmolenda@apple.com> | 2014-02-14 05:06:49 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2014-02-14 05:06:49 +0000 |
commit | a4bea72ee72a8e477e9f6fd139ad24754efeac02 (patch) | |
tree | a561e13249c1d23f9504d6106199ad824a88ce20 /lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp | |
parent | 293349e4d786d5f1561bd057f94d54cd90c00aed (diff) | |
download | bcm5719-llvm-a4bea72ee72a8e477e9f6fd139ad24754efeac02.tar.gz bcm5719-llvm-a4bea72ee72a8e477e9f6fd139ad24754efeac02.zip |
Add a new target setting, trap-handler-names, where a user can
specify a list of functions which should be treated as trap handlers.
This will be primarily useful to people working in non-user-level
process debugging - kernels and other standalone environments.
For most people, the trap handler functions provided by the Platform
plugin will be sufficient.
<rdar://problem/15835846>, <rdar://problem/15982682>
llvm-svn: 201386
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp index 36223db8186..a3a7002ea09 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -26,8 +26,21 @@ using namespace lldb_private; UnwindLLDB::UnwindLLDB (Thread &thread) : Unwind (thread), m_frames(), - m_unwind_complete(false) + m_unwind_complete(false), + m_user_supplied_trap_handler_functions() { + ProcessSP process_sp(thread.GetProcess()); + if (process_sp) + { + Args args; + process_sp->GetTarget().GetUserSpecifiedTrapHandlerNames (args); + size_t count = args.GetArgumentCount(); + for (size_t i = 0; i < count; i++) + { + const char *func_name = args.GetArgumentAtIndex(i); + m_user_supplied_trap_handler_functions.push_back (ConstString (func_name)); + } + } } uint32_t |