こんなソフト無いです ..
[2ch|▼Menu]
552:login:Penguin
07/09/10 22:48:15 5JM4Hlqf
>> 546
再コンパイルなら以下。再コンパイルしたくないならしらん。
--- preload.c ---
#include <stdio.h>

void __attribute__((no_instrument_function)) __cyg_profile_func_enter(void *this, void *callsite)
{
printf("+ [%p]\n", this);
}

void __attribute__((no_instrument_function)) __cyg_profile_func_exit(void *this, void *callsite)
{
printf("- [%p]\n", this);
}
--------------
(1) LD_PRELOAD用の共有ファイル作る。
$ gcc -shared -fPIC -Wall -o libpreload.so preload.c
(2)トレースしたいバイナリを-finstrument-functionsつきでコンパイルしとく。
(3)トレースとる。
$ LD_PRELOAD=./preload.so target_binary


次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5156日前に更新/225 KB
担当:undef