Mac 上进程的内存快照?
我想拍摄 mac 上正在运行的进程的内存快照。我不知道该怎么做。
我有 Mac 版 IDA-PRO。可以用吗?如何?
谁能建议我一种方法来做到这一点? (一些文档或示例)。 可能可以使用大学的一些技术,但我也不知道。
我不想终止该进程,因为我想看看执行指令/命令后发生了什么变化。
I want to take a snapshot of memory of process in action on mac. I have no idea how to do it.
I have IDA-PRO for mac with me. Can it be used? How?
Can anyone suggest me a way to do this? (some documentation or example).
May be some techniques from uni can be used but I am also not aware of that.
I dont want to kill the process as I want to see whats changing after execution of instructions/commands.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以向正在运行的进程发送信号,将核心转储到文件中,稍后可以与 gdb 一起使用该文件进行事后分析。
看来您必须配置系统才能启用核心转储。请参阅 http://developer.apple.com/library/mac/# technotes/tn2124/_index.html 了解详细信息。
更新:
嗯,上面的链接介绍了
gcore
的第三方实现,这是一个用于对正在运行的进程进行核心转储的命令行工具:http://www.osxbook.com/book/bonus/chapter8/core/
您可能只想获取源代码并尝试:
http://www.osxbook.com/book/bonus /chapter8/core/download/gcore-1.3.tar.gz
要制作与 ppc/i386/x86_64 一起使用的单个 FAT 二进制文件,只需修改 Makefile 中的以下行:
作为:
You can send a signal to a running process to dump core into a file, which can be used with gdb later for postmortem analysis.
It seems that you must configure your system to enable core dump. See http://developer.apple.com/library/mac/#technotes/tn2124/_index.html for details.
UPDATE:
Well, above link introduces a third party implementation of
gcore
, a command line tool to make a core dump of running processes:http://www.osxbook.com/book/bonus/chapter8/core/
You may just want to grab the source and try:
http://www.osxbook.com/book/bonus/chapter8/core/download/gcore-1.3.tar.gz
To make a single FAT binary to use with ppc/i386/x86_64, just modify following lines from Makefile:
as: