summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Target.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-02-14 05:06:49 +0000
committerJason Molenda <jmolenda@apple.com>2014-02-14 05:06:49 +0000
commita4bea72ee72a8e477e9f6fd139ad24754efeac02 (patch)
treea561e13249c1d23f9504d6106199ad824a88ce20 /lldb/source/Target/Target.cpp
parent293349e4d786d5f1561bd057f94d54cd90c00aed (diff)
downloadbcm5719-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/Target/Target.cpp')
-rw-r--r--lldb/source/Target/Target.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 3a980251ef6..e7816266b41 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -2638,6 +2638,7 @@ g_properties[] =
"'partial' will load sections and attempt to find function bounds without downloading the symbol table (faster, still accurate, missing symbol names). "
"'minimal' is the fastest setting and will load section data with no symbols, but should rarely be used as stack frames in these memory regions will be inaccurate and not provide any context (fastest). " },
{ "display-expression-in-crashlogs" , OptionValue::eTypeBoolean , false, false, NULL, NULL, "Expressions that crash will show up in crash logs if the host system supports executable specific crash log strings and this setting is set to true." },
+ { "trap-handler-names" , OptionValue::eTypeArray , true, OptionValue::eTypeString, NULL, NULL, "A list of trap handler function names, e.g. a common Unix user process one is _sigtramp." },
{ NULL , OptionValue::eTypeInvalid , false, 0 , NULL, NULL, NULL }
};
enum
@@ -2670,7 +2671,8 @@ enum
ePropertyUseFastStepping,
ePropertyLoadScriptFromSymbolFile,
ePropertyMemoryModuleLoadLevel,
- ePropertyDisplayExpressionsInCrashlogs
+ ePropertyDisplayExpressionsInCrashlogs,
+ ePropertyTrapHandlerNames
};
@@ -3077,7 +3079,19 @@ TargetProperties::GetMemoryModuleLoadLevel() const
return (MemoryModuleLoadLevel)m_collection_sp->GetPropertyAtIndexAsEnumeration(NULL, idx, g_properties[idx].default_uint_value);
}
+bool
+TargetProperties::GetUserSpecifiedTrapHandlerNames (Args &args) const
+{
+ const uint32_t idx = ePropertyTrapHandlerNames;
+ return m_collection_sp->GetPropertyAtIndexAsArgs (NULL, idx, args);
+}
+void
+TargetProperties::SetUserSpecifiedTrapHandlerNames (const Args &args)
+{
+ const uint32_t idx = ePropertyTrapHandlerNames;
+ m_collection_sp->SetPropertyAtIndexFromArgs (NULL, idx, args);
+}
//----------------------------------------------------------------------
// Target::TargetEventData
OpenPOWER on IntegriCloud