7

Mach-O LC_FUNCTION_STARTS コマンドが指すデータの形式を知っている人はいますか?

私が見つけることができるほとんどの情報は、loader.h ヘッダー ファイルにあります。

#define LC_FUNCTION_STARTS 0x26 /* compressed table of function start addresses */

dyldinfo ツールには、このデータを分析する -function_starts オプションがあり、ツールはオープン ソースですが、ツールの最新リリース バージョンにはサポートが含まれていません。

http://opensource.apple.com/source/ld64/ld64-97.2/src/other/dyldinfo.cpp

dyldinfo の最新バージョンのソースをどこで入手できるか、またはこのロード コマンドの詳細情報をどこで入手できるかを知っている人はいますか?

ありがとう!

4

2 に答える 2

11

It's used by tools that need to symbolicate addresses in crash logs, samples, spindumps, etc. to determine if a given address falls inside a function. It could also be useful to debuggers to help them more quickly find the bounds of the function that a given address is within.

The data within this section is formatted as a zero-terminated sequence of DWARF-style ULEB128 values. The first value is the offset from the start of the __TEXT segment to the start of the first function. The remaining values is the offset to the start of the next function.

于 2013-01-20T08:33:15.967 に答える
0

数日以内に追加の回答やコメントが得られなかったので、自分で回答したほうがよいと思いました。解決策は基本的に、上記のコメントに入れたものです。

dyldinfo の最新バージョンは次の場所にあります。

http://opensource.apple.com/source/ld64/ld64-127.2/src/other/dyldinfo.cpp

ただし、関数の開始が何に使用されるのかを正確に把握したことはまだありません。誰かがその情報を持っていれば、まだ感謝しています。

于 2012-03-13T13:34:28.523 に答える