-
Notifications
You must be signed in to change notification settings - Fork 344
Print a hint about using frame variable when self cannot be reconstru… #4157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print a hint about using frame variable when self cannot be reconstru… #4157
Conversation
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, |
There was a problem hiding this 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.
You are right! But's that's a silly restriction:
Could |
Yes, it should be able to, though it's not quite as simple as just flipping the switch. po needs to get the string return from the object description call, and top-level expressions
don't gather a "result" the same way a regular expression does, so the top-level code needs to be reworked a bit to be used for this purpose, or we need to add a "context-free"
wrapper to the context's we produce in the regular user-expression code and use that in this case. I wasn't sure which was better, but anyway, that's where I got to
when I ran out of time last time I was looking at this.
Jim
… On Mar 31, 2022, at 6:13 PM, adrian-prantl ***@***.***> wrote:
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?
—
Reply to this email directly, view it on GitHub <#4157 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADUPVWYKT3K3V4K67ZCDS5DVCZEUJANCNFSM5SHA2XYA>.
You are receiving this because your review was requested.
|
I'm still trying to make |
@swift-ci test |
@swift-ci test |
…cted.