模拟时调试器下的堆栈/堆栈损坏?

编程入门 行业动态 更新时间:2024-10-09 14:27:28
本文介绍了模拟时调试器下的堆栈/堆栈损坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用Xcode 6.3.1。我试图在应用程序中跟踪一个奇怪的问题,现在我看到局部变量似乎被错误地初始化了。当我在同一时间定义和初始化一个局部变量的行中点一个断点时,它实际上显示为一个现有的局部变量,但是具有一个破坏的值:

有没有人看到这个?在另一个运行中,变量实际上在变量视图中显示为NSDate !!!

解决方案

断点实际上在线出现在;该行尚未执行。因此,您在这个变量上看起来太早了。在 之后之前过去初始化的行之前,它没有意义的价值。您仍然在该行之前,所以它的值是随机垃圾。

I'm using Xcode 6.3.1. I'm trying to track a weird issue in an app and now I'm seeing that local variables seem to be incorrectly initialised. When I hit a breakpoint at the line where a local variable is defined and initialised at the same time, it is actually shown as an existing local variable, but with a corrupt value:

Has anyone else seen this? In another run the variable was actually showing in the variable view as being an NSDate !!!

解决方案

A breakpoint is actually before the line it appears on; that line has not yet executed. You are thus looking too soon at this variable. It has no meaningful value until after you step past the line where it is initialized. You are still before that line so its value is random garbage.

更多推荐

模拟时调试器下的堆栈/堆栈损坏?

本文发布于:2023-11-23 22:15:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623008.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:堆栈   时调   试器下

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!