iPhone崩溃日志中的内存地址表示什么? [英] What do the memory addresses in iPhone crash logs signify?

查看:103
本文介绍了iPhone崩溃日志中的内存地址表示什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在查看今天由iphone应用生成的崩溃日志:

I've been looking at crash logs generated by an iphone app today:

Thread 0 Crashed:
0   libobjc.A.dylib                 0x3002d7da 0x3002b000 + 10202
1   UIKit                           0x31ec4abc 0x31e4d000 + 490172
2   UIKit                           0x31ebd214 0x31e4d000 + 459284
3   UIKit                           0x31ebcfac 0x31e4d000 + 458668

谁能告诉我十六进制地址是什么意思? (内存地址,当然..)

Can anyone tell me what the hex addresses mean? (memory addresses, sure..)

我知道如何生成符号:

0   libobjc.A.dylib                 0x000027da objc_msgSend + 18
1   UIKit                           0x00077abc -[UINavigationController _startDeferredTransitionIfNeeded] + 176
2   UIKit                           0x00070214 -[UINavigationController pushViewController:transition:forceImmediate:] + 600
3   UIKit                           0x0006ffac -[UINavigationController pushViewController:animated:] + 28

并从那里调试崩溃但我很好奇;如果你采取

and debug the crash from there, but I'm curious; if you take

0x3002d7da 0x3002b000 + 10202

然后:0x3002d7da = 0x3002b000 +(十进制)10202

then: 0x3002d7da = 0x3002b000 + (decimal) 10202

这意味着什么?

我应该补充一下,我不是在寻找有关如何符号化的信息,谢谢!

I should add I'm not looking for info on how to symbolicate, thx!

编辑:对我来说也很奇怪的是,如果你比较前后符号版本,然后为我写的代码:

what is also strange to me is that if you compare pre and post symbolicated versions, then for code I wrote:

9   memleaktest                     0x00002ffe 0x1000 + 8190
becomes
9   memleaktest                     0x00002ffe -[memleaktestViewController buttonOne] (memleaktestViewController.m:24)

有意义,但是对于框架代码:

makes sense, but for framework code:

8   CoreFoundation                  0x307fe52c 0x307f8000 + 25900
becomes
8   CoreFoundation                  0x0000652c -[NSObject(NSObject) release] + 24

地址和偏移量有变化吗?为什么会这样?

the address and offset has changed? Why would this be?

推荐答案

扩展Olie对应用程序符号化版本的响应:调试信息从中删除应用程序的分发版本,使其更小,并保护开发人员的知识产权(所以你不能看到类和方法名称)。

Extending Olie's response on the "symbolicated version" of the app: The debugging information is stripped from the distribution version of the app to make it smaller and also to protect the developer's intellectual property (so you can't see class and method names).

为了解密日志,您需要将调试符号文件与创建崩溃日志的特定版本相关联。

In order to decrypt the log, you need to have the debugging symbols file associated with the specific build that created the crash log.

此文件(.dSYM扩展名)将出现在iPhone应用程序的二进制文件所在的构建文件夹中。请注意,您需要.dSYM文件用于在手机上编译应用程序的特定编译 - dSYM文件带有时间戳,因此如果您重新编译应用程序,即使您不更改,dSYM文件也会更改代码行。

This file (.dSYM extension) will be present in the build folder where the binary of the iPhone app is also located. Please note that you need the .dSYM file for the specific compilation that was used to compile the app on the phone - the dSYM file is timestamped, so if you recompile the app, the dSYM file will change even if you don't change a line of code.

在您的计算机上安装此文件后,将崩溃文件拖到xcode中(或从管理器中的附加设备查看日志),这将为您提供调用的方法的堆栈跟踪以及导致崩溃的特定代码行。

Once you have this file on your computer, drag the crash file into xcode (or view logs from attached devices in the Organiser), which will give you a stack trace of the methods called and the specific lines of code called which led to the crash.

这篇关于iPhone崩溃日志中的内存地址表示什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆