views:

1151

answers:

1

Hello, while i'm testing my app the console show:

GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 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 7356.
> (gdb)

And the simulator stop running.

Then...I write "bt" in the console and appear this:

> (gdb) bt
> #0  0x937f0688 in objc_msgSend ()
> #1  0x30201368 in CFRetain ()
> #2  0x30200e75 in CFArrayCreate ()
> #3  0x302440a3 in -[__NSPlaceholderArray initWithObjects:count:] ()
> #4  0x0036116d in -[CALayerArray copyWithZone:] ()
> #5  0x302386aa in -[NSObject copy] ()
> #6  0x3091cc24 in -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:]
> ()
> #7  0x30920a6a in -[UIView(Hierarchy) removeFromSuperview] ()
> #8  0x30926864 in -[UIScrollView removeFromSuperview] ()
> #9  0x30975313 in -[UIViewController setView:] ()
> #10 0x00005719 in -[VideosTableViewController loadView] (self=0xd47970, _cmd=0x93882dfc) at
> /Users/Miriam/Desktop/MyApp/Classes/VideosTableViewController.m:92
> #11 0x000039c7 in -[WelcomeViewController stopLoading] (self=0xd1cc50, _cmd=0x9388f10c) at
> /Users/Miriam/Desktop/MyApp/Classes/WelcomeViewController.m:156
> #12 0x0000ec82 in -[Connection connectionDidFinishLoading:]
> (self=0xdaa1e0, _cmd=0x9384e564,
> connection=0xda91a0) at
> /Users/Miriam/Desktop/MyApp/Classes/Connection.m:94
> #13 0x30561dc4 in -[NSURLConnection(NSURLConnectionReallyInternal)
> sendDidFinishLoading] ()
> #14 0x30561d33 in _NSURLConnectionDidFinishLoading ()
> #15 0x00791868 in URLConnectionClient::_clientDidFinishLoading
> ()
> #16 0x007910c8 in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload
> ()
> #17 0x00791d4c in URLConnectionClient::processEvents ()
> #18 0x0073fb29 in MultiplexerSource::perform ()
> #19 0x302452c1 in CFRunLoopRunSpecific ()
> #20 0x30244628 in CFRunLoopRunInMode ()
> #21 0x32044c31 in GSEventRunModal ()
> #22 0x32044cf6 in GSEventRun ()
> #23 0x309021ee in UIApplicationMain ()
> #24 0x0000252c in main (argc=1, argv=0xbfffef24) at
> /Users/Miriam/Desktop/MyApp/main.m:14

Thanks

+1  A: 

It's because the debugger is waiting for you to debug the code. GDB will normally start up your process then stop at main (if you start your process with the debugger). In your case, by attaching to an already-running process, the debugger stops it wherever it happens to be when you attach. Your program is now halted.

It's then up to you to inform the debugger that you want to keep running the code (continue) or single-step (s for step-into, n for step-over) or whatever else you want to do.

The bt command (backtrace) simply gives you the current stack dump at the time of attach.

paxdiablo
Thit means that if i test this app in a real device, i will no have any issues?I can just forget this message?Thanks
I try to continue executing the app, but is not possible. The simulator continue stop.
If i write s, n, or run in the console:(gdb) sSingle stepping until exit from function objc_msgSend, which has no line number information.Program received signal: “EXC_BAD_ACCESS”.(gdb) nSingle stepping until exit from function objc_msgSend, which has no line number information.Program received signal: “EXC_BAD_ACCESS”.(gdb) runStarting program: Not executing.killquitThe Debugger has exited with status 0.(gdb)
You'll only see that first message if and when you attach gdb to your proces. It's not your program printing it, but gdb itself. As to the EXC_BAD_ACCESS, that looks like a bug in your code to me although it *may* be a problem interacting with gdb. Does your program run okay without attaching gdb? My advice would be to run the process with gdb at the start rather than attaching and set breakpoints in your code for monitoring behavior.
paxdiablo