0

I am just starting out with gdb so I got a CrackMe application I am trying to debug. So I ran the application, fired up gdb in terminal and attached it to CrackMe's PID and it crashed the application.

(gdb) attach 6040
Attaching to program: `/Users/***/Desktop/CrackMe.app/Contents/MacOS/CrackMe', process 6040.
Reading symbols for shared libraries + done
Re-enabling shared library breakpoint 1
Re-enabling shared library breakpoint 2
0x00007fff8428767a in mach_msg_trap ()

And after this, the program becomes unresponsive. Is there so other argument that I need to pass to attach that I am missing? Thanks

4

1 に答える 1

1

デバッガーでアタッチすると、プログラムが自動的に停止します。その為、無反応です。続行するには、「cont」(または「continue」) と入力します。

また、停止したスタックのトップ フレームも表示されます。この場合は mach_msg_trap() です。これは非常に一般的なケースです。アイドル状態のアプリは、ウィンドウ サーバーからのイベントを待機しているときに、その機能でブロックされることが多いためです。

于 2012-04-04T14:59:30.600 に答える