IPhone simulator xcode GDB find unlocated program crash

Source: Internet
Author: User

I believe most iPhone developers know that nszombieenable is set in executable to displayProgramCrash location and specific information, but many times when the program crashes, there are some prompts that are unknown to us.

For example:

Freed (ID): Message release sent to freed object = 0x1154a90 and other information. We probably know what it means, but we cannot locate it. This is equivalent to no prompt information.

 

Inadvertently this week I found another prompt on the Internet that the command can clearly define the problem ---------- In

Your project ---> executable --> (double-click to open) arguments, add mallocstacklogging, and set Yes ----> then you can get some useful crash information about GDB when the program crashes.

 

For example

Freed (ID): Message release sent to freed object = 0x1154a90

This information

Shell malloc_history <ID> <address>

Now we can print shell malloc_history 947 0x1154a90 in GDB to locate a specific method.

 

Of course, you can also run the above shell commands in the terminal, such as malloc_history <ID> <address>.

 

Simple configuration and display

1,

2,

3,

 

In this way, we can locate the data release issue of [testviewctr shownewpersoncontroller] so that we can modify it.

 

 

4,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.