Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Commit

Permalink
limit symbol basename-ification to Swift/C/C++/ObjC++ or unknown lang…
Browse files Browse the repository at this point in the history
…uage

This change allows commands like:
    breakpoint set -n main.main
and
    breakpoint set -n main.init

to work in Go if either:
(1) a -L language specifier is given (i.e. appending "-L go" to the
    above lines), or
(2) setting the default language via:
    (lldb) settings set target.language go

This addresses some usability issues around investigating:
https://bugs.swift.org/browse/SR-527
  • Loading branch information
tfiala committed Jan 13, 2016
1 parent 393d8db commit 4e87051
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions source/Core/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1780,9 +1780,15 @@ Module::PrepareForFunctionNameLookup (const ConstString &name,
CPlusPlusLanguage::MethodName cpp_method (name);
SwiftLanguageRuntime::MethodName swift_method (name, true);

if (swift_method.IsValid())
if ((language == eLanguageTypeUnknown ||
language == eLanguageTypeSwift) &&
swift_method.IsValid())
basename = swift_method.GetBasename();
else if (cpp_method.IsValid())
else if ((language == eLanguageTypeUnknown ||
Language::LanguageIsCPlusPlus(language) ||
Language::LanguageIsC(language) ||
language == eLanguageTypeObjC_plus_plus) &&
cpp_method.IsValid())
basename = cpp_method.GetBasename();

if (basename.empty())
Expand Down

0 comments on commit 4e87051

Please sign in to comment.