在Mac OS X上,如何获取用于源代码级调试的System / LibC调试版本? [英] On Mac OS X, how can you get a debug build of System/LibC for source level debugging?

查看:108
本文介绍了在Mac OS X上,如何获取用于源代码级调试的System / LibC调试版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从opensource.apple.com下载了LibC源代码,但是由于它是一个整体库/usr/lib/libSystem.B.dylib的一部分,我必须以某种方式重建整个库吗?

I downloaded LibC source from opensource.apple.com, but since it's part of one monolithic library /usr/lib/libSystem.B.dylib would I have to somehow rebuild the entire thing?

我有一个从Linux移植的BSD命令行程序。我希望能够在LibC函数中设置断点并逐步执行。我试图解决程序中似乎是堆损坏的问题(在Linux上不会发生-我已经移植回Linux并在其中运行memcheck。)

I have a BSD command line program, ported from Linux. I want to be able to set breakpoints in LibC functions and step through. I'm trying to close in on what seems to be heap corruption in my program (which doesn't occur on Linux - I've already ported back to Linux and run memcheck there.)

推荐答案

您可以自己构建Valgrind-使用10.5发行的最新版本,或在bug跟踪器上查找Snow Leopard支持bug(具有补丁程序)。

You can build Valgrind yourself - either use the last version released on 10.5, or look on the bug tracker for the Snow Leopard support bug, which has a patch.

或者,尝试使用malloc(3)中的内存调试工具手册

Alternately, try the memory debugging tools in the malloc(3) manual.

这篇关于在Mac OS X上,如何获取用于源代码级调试的System / LibC调试版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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