Could Not Resolve Type during swift Foundation debugging

Hi guys, i am trying to debug swift-corelibs-foundatin with lldb in Linux. However, it keeps giving me "" when I try to access a variable. Here is my testing example:

import Foundation
let c1 = NSDateComponents()
let c2 = NSDateComponents()
c2.calendar = c1.calendar
let c1a = c1.calendar as Any
let c2a = c2.calendar as Any

I have set breakpoint at c2.calendar = c1.calendar. When i step in, it reaches NSCalendar.swift under Foundation as follows:

(lldb) s
Process 9448 stopped
* thread #1, name = 'simCalendarCopy', stop reason = step in
    frame #0: 0x000003fffd6eff9e`NSDateComponents.calendar.setter(newValue=<unavailable>, self=<unavailable>) at NSCalendar.swift:1428
   1425             return _calendar
   1426         }
   1427         set {
-> 1428             if let val = newValue {
   1429                 _calendar = val
   1430             } else {
   1431                 _calendar = nil
Target 0: (simCalendarCopy) stopped.

Then when i tried to fr v val, the debugger would show me could not resolve type. It looks like lldb won't print any variables when it gets into the Foundation code. Any ideas how to fix this?

@dcci @Jim_Ingham @Adrian_Prantl @Frederic_Riss

It looks like the foundation module isn't imported. Can you file a SR?

SR filed at [SR-9092] Could Not Resolve Type during swift Foundation debugging · Issue #3603 · apple/swift-corelibs-foundation · GitHub

1 Like

Thanks, I'll try to take a look as time permits.

1 Like