PDA

View Full Version : gdb: "exited with status value:101"




steve1717
Jun 16, 2008, 02:31 AM
Attempting to debug an iPhone app and I keep having the program shut down randomly with an error message of:

Program exited with status value:101.

Does anyone know what exactly that means or where it is possible to lookup gdb exit codes?

Thanks!:confused:



MrStevieP
Jun 16, 2008, 02:58 AM
Attempting to debug an iPhone app and I keep having the program shut down randomly with an error message of:

Program exited with status value:101.

Does anyone know what exactly that means or where it is possible to lookup gdb exit codes?

Thanks!:confused:

You could always download the GDB source code for your version of GDB and look it up from there. A google for GDB source revealed this site http://sourceware.org/gdb/current/ which may help?!

steve1717
Jun 16, 2008, 10:34 AM
It seems weird that I'd have to do that. For as prevalent as gdb is, I'm amazed that these exit codes aren't posted somewhere online in a table. Has anyone else received exit code 101? This is causing an app to crash on the device but does not occur on the simulator. Many thanks...

yeroen
Jun 16, 2008, 10:55 AM
Are you saying gdb itself exited with an exit status of 101 taking your app with it or your app exited with a 101 and gdb caught the termination status.

Reading your post, it sounds as if we need to look into the latter scenario and not into gdb itself.

lee1210
Jun 16, 2008, 11:05 AM
I think that the program is exiting with 101, not gdb. As such, exit() is being called with 101 as its argument.

I don't know if you'll be able to set a breakpoint on exit and get a backtrace or not in this situation, but this is likely something going wrong in some cocoa functions since I'm guessing you didn't write code that called exit(101).

-Lee

steve1717
Jun 16, 2008, 11:11 AM
Hi guys -- yes, the program itself is exiting with 101 and at random times too. Its unpredictable. The error doesn't occur on the simulator, just the device. :confused:

yeroen
Jun 16, 2008, 11:21 AM
You could try registering an exit handler function in main() via atexit(3) or on_exit(3) and breaking in there and viewing the stack trace.

As lee pointed out above, this error code is probably not being thrown by any code you wrote, else you'd recognize it. Most likely, the choke is due to some library or framework you're linked into. If you have no idea where, one way to find out is to run your program under some tracing utility (on linux I use ltrace/strace for this all the time). On Darwin/OSX there's dtrace and dtruss at the command line, and the Instruments GUI in the /Developer/Tools tree.

ajv
Jul 7, 2008, 02:30 AM
I was having the same issue, but it seemed to go away when I rebooted the phone.

cg16
Jul 16, 2008, 07:13 AM
Confirmed.

I too had the same issue: "Program exited with status value:101."
I followed avj's advice and rebooted my phone.

no more error.

Thanks ajv.
:apple:

hnager
Sep 9, 2008, 02:48 PM
This same bug is haunting me. I've tried restarting the phone but I see that 101 error haphazardly when testing on the device. I couldn't find any documentation on this error - any thoughts on what it means?