GDB在iPhone OS App之后推出

时间:2010-02-15 18:17:33

标签: iphone xcode gdb

现在发生在我身上的最奇怪的事情是:GDB似乎是在应用程序启动之后启动的。

xcode终端窗口中的输出如下所示:

[Session started at 2010-02-15 18:57:31 +0100.]
2010-02-15 18:57:35.822 CPPlayer[2890:207] CPLanguageManager.m:26 Initializing LanguageManager
2010-02-15 18:57:35.825 CPPlayer[2890:207] CPLanguageManager.m:51 Done initializing LanguageManager
2010-02-15 18:57:35.833 CPPlayer[2890:207] CPTicketProcessor.m:84 Loading tickets
2010-02-15 18:57:35.835 CPPlayer[2890:207] CPTicket.m:66 Initiating with path: /Users/nick/Library/Application Support/iPhone Simulator/User/Applications/F6F161E5-7765-4EC8-9F53-BABD664A6805/Documents/tickets/trip-language-arabic-ticket.plist

[Session started at 2010-02-15 18:57:35 +0100.]
GNU gdb 6.3.50-20050815 (Apple version gdb-967) (Tue Jul 14 02:11:58 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 2890.
kill
quit

The Debugger has exited with status 0.(gdb)

正如你所看到的,Xcode认为会话开始两次,但这是,我100%肯定,一次点击“Build and Run”的结果,到目前为止我从未失败过。

(我是)/(Xcode)做错了什么?

PS。我注意到在“可执行信息”屏幕的调试选项卡中有一个设置“在GDB启动后启动可执行文件”,但是检查了(顺便改变了一切,这种行为突然开始)。

PPS。 在杀死来自xcode的应用程序之前杀死了iPhone模拟器,通常给我一个“终止对交换机的回复...”现在它说这个(完整会话输出):

[Session started at 2010-02-15 19:17:54 +0100.]
2010-02-15 19:17:59.180 CPPlayer[2963:207] CPLanguageManager.m:26 Initializing LanguageManager
2010-02-15 19:17:59.182 CPPlayer[2963:207] CPLanguageManager.m:51 Done initializing LanguageManager
2010-02-15 19:17:59.184 CPPlayer[2963:207] CPTicketProcessor.m:84 Loading tickets
2010-02-15 19:17:59.189 CPPlayer[2963:207] CPTicket.m:66 Initiating with path: /Users/nick/Library/Application Support/iPhone Simulator/User/Applications/54C79C7B-5D77-4734-A1AF-E11FD92D4EF9/Documents/tickets/trip-language-arabic-ticket.plist

[Session started at 2010-02-15 19:17:59 +0100.]
GNU gdb 6.3.50-20050815 (Apple version gdb-967) (Tue Jul 14 02:11:58 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 2963.
kill
error while killing target (killing anyway): warning: error on line 1987 of "/SourceCache/gdb/gdb-967/src/gdb/macosx/macosx-nat-inferior.c" in function "macosx_kill_inferior_safe": (os/kern) failure (0x5x)
quit

The Debugger has exited with status 0.(gdb) 

1 个答案:

答案 0 :(得分:1)

这是调试适用于iPhone应用程序的方式,包括设备和模拟器。请注意这两部分:

2010-02-15 18:57:35.822 CPPlayer[2890:207] CPLanguageManager.m:26 Initializing LanguageManager

“2980”是正在运行的应用程序的进程ID(pid)。

Attaching to process 2890.

这是已经推出的应用程序附加的gdb。