How to generate the main file for a broken application in Xcode + gdb?

Having illustrated the elusive error that crashes my application (more precisely, it works in the iOS simulator), I want to generate the main file for verification later. On Linux, I would run the core-core file from gdb, but this command is not available on Mac OS X version of gdb.

So how can I generate the main file from gdb? There are ways to set the OS for the main dump of the broken application, but I'm afraid that the application will change some of its states by then. What is the best way to do this?

Thanks!

+2
source share
1 answer

Unfortunately, there is no gcore command in mac osx gdb, but there is a good article on how to generate a kernel dump in osx

http://osxbook.com/book/bonus/chapter8/core/

This article has downloadable source code for generating a core dump, which I have used many times.

+5
source

All Articles