Skip to content

Conversation

@adrian-prantl
Copy link

…cted.

@jimingham
Copy link

I didn't find time to fix the object description function to not require the current context. So I'm pretty sure if we can't realize self, vo will also fail.

Copy link

@jimingham jimingham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the hint seems fine to me, but unless I'm wrong about the need for self to construct the stringPrintForDebugger call, vo will fail when we can't reconstruct self as well. If that's true then you shouldn't mention vo in the hint.

@adrian-prantl
Copy link
Author

You are right! But's that's a silly restriction:

extension $__lldb_context {
  @LLDBDebuggerFunction @available(macOS 12.3.0, *)
  mutating func $__lldb_wrapped_expr_0(_ $__lldb_arg : UnsafeMutablePointer<Any>) {
    
do {
/*__LLDB_USER_START__*/
#sourceLocation(file: "/var/folders/62/q_3t1jv50970jnggfy6j01xr0000gn/T/expr1-093681..swift", line: 1)
Swift._DebuggerSupport.stringForPrintObject(Swift.UnsafePointer<Generic.S<Builder.Private>>(bitPattern: 0x1001da000)!.pointee)

/*__LLDB_USER_END__*/
} catch (let __lldb_tmp_error) {
  var $__lldb_error_result = __lldb_tmp_error
}

  }
}
@LLDBDebuggerFunction @available(macOS 12.3.0, *)
func $__lldb_expr(_ $__lldb_arg : UnsafeMutablePointer<Any>) {
  do {
    $__lldb_injected_self.$__lldb_wrapped_expr_0(
      $__lldb_arg
    )
  }
}

Could frame variable run the -O expression with --top-level?

@jimingham
Copy link

jimingham commented Apr 4, 2022 via email

@adrian-prantl
Copy link
Author

I'm still trying to make vo work, but this is taking longer. Let's not have the perfect be the enemy of the good — here's the patch with an updated error message.

@adrian-prantl
Copy link
Author

@swift-ci test

2 similar comments
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 522a7a6 into swiftlang:stable/20211026 Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants