diff options
Diffstat (limited to 'lldb/source/Target')
-rw-r--r-- | lldb/source/Target/LanguageRuntime.cpp | 52 | ||||
-rw-r--r-- | lldb/source/Target/Target.cpp | 25 |
2 files changed, 73 insertions, 4 deletions
diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp index b6a9a5793b4..3891d81d167 100644 --- a/lldb/source/Target/LanguageRuntime.cpp +++ b/lldb/source/Target/LanguageRuntime.cpp @@ -69,7 +69,7 @@ LanguageRuntime::ExceptionBreakpointResolver::ExceptionBreakpointResolver (Break LanguageType language, bool catch_bp, bool throw_bp) : - BreakpointResolver (bkpt, ExceptionResolver), + BreakpointResolver (bkpt, BreakpointResolver::ExceptionResolver), m_language (language), m_catch_bp (catch_bp), m_throw_bp (throw_bp) @@ -80,7 +80,7 @@ LanguageRuntime::ExceptionBreakpointResolver::ExceptionBreakpointResolver (Break void LanguageRuntime::ExceptionBreakpointResolver::GetDescription (Stream *s) { - s->Printf ("Exception breakpoint (catch: %s throw: %s) using: ", + s->Printf ("Exception breakpoint (catch: %s throw: %s)", m_catch_bp ? "on" : "off", m_throw_bp ? "on" : "off"); @@ -91,7 +91,7 @@ LanguageRuntime::ExceptionBreakpointResolver::GetDescription (Stream *s) m_actual_resolver_sp->GetDescription (s); } else - s->Printf ("."); + s->Printf (" the correct runtime exception handler will be determined when you run"); } bool @@ -162,3 +162,49 @@ LanguageRuntime::ExceptionBreakpointResolver::GetDepth () return m_actual_resolver_sp->GetDepth(); } +static const char *language_names[] = +{ + "unknown", + "c89", + "c", + "ada83", + "c++", + "cobol74", + "cobol85", + "fortran77", + "fortran90", + "pascal83", + "modula2", + "java", + "c99", + "ada95", + "fortran95", + "pli", + "objective-c", + "objective-c++", + "upc", + "d", + "python" +}; +static uint32_t num_languages = sizeof(language_names) / sizeof (char *); + +LanguageType +LanguageRuntime::GetLanguageTypeFromString (const char *string) +{ + for (uint32_t i = 0; i < num_languages; i++) + { + if (strcmp (language_names[i], string) == 0) + return (LanguageType) i; + } + return eLanguageTypeUnknown; +} + +const char * +LanguageRuntime::GetNameForLanguageType (LanguageType language) +{ + if (language < num_languages) + return language_names[language]; + else + return language_names[eLanguageTypeUnknown]; +} + diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index f3b8a7832ab..ae69e5d3b6a 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -287,6 +287,29 @@ Target::CreateBreakpoint (const FileSpecList *containingModules, return bp_sp; } +lldb::BreakpointSP +Target::CreateBreakpoint (const FileSpecList *containingModules, + const FileSpecList *containingSourceFiles, + std::vector<std::string> func_names, + uint32_t func_name_type_mask, + bool internal, + LazyBool skip_prologue) +{ + BreakpointSP bp_sp; + size_t num_names = func_names.size(); + if (num_names > 0) + { + SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, containingSourceFiles)); + + BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, + func_names, + func_name_type_mask, + skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue)); + bp_sp = CreateBreakpoint (filter_sp, resolver_sp, internal); + } + return bp_sp; +} + BreakpointSP Target::CreateBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, @@ -304,7 +327,7 @@ Target::CreateBreakpoint (const FileSpecList *containingModules, BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, func_names, num_names, - func_name_type_mask, + func_name_type_mask, skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue)); bp_sp = CreateBreakpoint (filter_sp, resolver_sp, internal); } |