#navi_header|C言語系| VC++では "/Oy" オプションによりフレームポインタを省略("FPO" : Frame Pointer Omission)する最適化を利用できます。 ちなみに、"FPO"の最後の"O"は省略(Omission)を表します。ですので、「最適化」まで付けると FPOO : Frame Pointer Omission Optimization になっちゃいます。かわいいですね。 この最適化なんですが、Windows開発チームはXP(SP2)以降は無効にしているようです。 FPOを有効にすると、PDBファイルのシンボル情報が無いとスタックトレース情報を復元できず、アセンブラレベルでのデバッグに支障が出る恐れがあります。 またマシンスペック向上のおかげで、FPOの有無は殆ど速度に影響を与えないそうです。 "Responder"という逆解析ソフトを使うとFPO有効な関数でもスタック上のデータを解析できるようなので、逆解析を難しくするという効果も低くなります。 以上のような事情で、少なくとも最近のWindows開発においては、FPOによる最適化はあまり人気が無いようです。 参考: - Consider not using the Frame Pointer Optimization when building your software - Yves Dolce - Site Home - MSDN Blogs -- http://blogs.msdn.com/b/yvesdolc/archive/2009/09/15/consider-not-using-the-frame-pointer-optimization-when-building-your-software.aspx - FPO フレーム - Web/DB プログラミング徹底解説 -- http://keicode.com/debug/dbg215.php - Responder is better than IDA Pro for analyzing malware | HBGary -- https://www.hbgary.com/martinblog/responder-is-better-than-ida-pro-for-analyzing-malware/ Advanced Windows Debugging, Chapter 2, p74: This section (and the remainder of the book), ignores frame pointer omission (FPO) optimization, simply because it is not used in Windows XP SP2 and later operating system. Since FPO optimization makes debugging nearly impossible without symbols, the current recommendation is to avoid it completely. #navi_footer|C言語系|