You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's assume I want to break on some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int: Swift.Int, float: Swift.Float, closure: (Swift.Int, Swift.Float) -> A) -> A only (and not the other one). And let's also assume I don't want to do this using file/line.
The only way I know is to do break set -n functionIWantToBreakOnAnnoyinglyOverloaded which sets breakpoints on all such functions (can be many if the name is say write or something common). After setting all these breakpoints, I can do break disable 1.1 etc to disable some instances.
LLDB shows
(lldb) break list
Current breakpoints:
1: name = 'functionIWantToBreakOnAnnoyinglyOverloaded', locations = 2, resolved = 2, hit count = 1
1.1: where = some`some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int: Swift.Int, float: Swift.Float, closure: (Swift.Int, Swift.Float) -> A) -> A, address = 0x0000000100001730, resolved, hit count = 0
1.2: where = some`some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int: Swift.Int, string: Swift.String, closure: (Swift.Int, Swift.String) -> A) -> A, address = 0x00000001000016e0, resolved, hit count = 1
I tried the following and they all don't work:
(lldb) break set -n 'some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int: Swift.Int, float: Swift.Float, closure: (Swift.Int, Swift.Float) -> A) -> A'
Breakpoint 2: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) break set -n 'some`some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int: Swift.Int, float: Swift.Float, closure: (Swift.Int, Swift.Float) -> A) -> A'
Breakpoint 3: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) break set -n some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int:float:closure)
Breakpoint 4: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) break set -n 'some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int:float:closure)'
Breakpoint 5: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
The text was updated successfully, but these errors were encountered:
There are two separate issues here. The first is that lldb doesn't have a fuzzy matcher against the full demangled name. Once you start providing arguments lldb just matches against the demangled name in toto. We need to add a fuzzy argument name matcher. Note, that's a problem for C++ as well as for Swift. Parts of this job are easy (removing extra spaces, etc) but it's also annoying to figure out everything that needs to be provided. For instance, the demangled name of:
func doSomething() {
}
is:
module_name.doSomething() -> ()
It would seem weird to have to type the return type, since you didn't specify it when you made the function... But figuring out what to consider optional in this matching makes the process a little harder.
The second issue is that the mangled name doesn't actually record what the user typed for the Generic slot name. Note that Johannes typed "T" as the generic name, but the completer called them "A". That makes matching against the result of the demangler more difficult. This is made trickier by the fact that we compute the actual slot name when we read the debug info for the function, and replace the "A" with "T" in what we print. We probably need to have a matcher that ignores what you happen to have called your generic slots, and matches anything against them.
Additional Detail from JIRA
md5: 7101e4cbe897e3bf3e5cafdd8dcae660
Issue Description:
Let's take the following (silly) example program
Let's assume I want to break on
some.Foo.functionIWantToBreakOnAnnoyinglyOverloaded(int: Swift.Int, float: Swift.Float, closure: (Swift.Int, Swift.Float) -> A) -> A
only (and not the other one). And let's also assume I don't want to do this using file/line.The only way I know is to do
break set -n functionIWantToBreakOnAnnoyinglyOverloaded
which sets breakpoints on all such functions (can be many if the name is saywrite
or something common). After setting all these breakpoints, I can dobreak disable 1.1
etc to disable some instances.LLDB shows
I tried the following and they all don't work:
The text was updated successfully, but these errors were encountered: