How to find a variable if I have its address in memory?

in my application, I get an exception: MyApp(38431,0xa004ffa0) malloc: *** error for object 0xa08be760: pointer being freed was not allocated

Is there any way for Xcode to show me where this pointer is? How can I find where the problem is?

I know that I can print the info line * [address] and it can show me where the line is. But now it does not work for me.

How can I get the number of rows or the name of the variable in which the exception is thrown?

Thanks in advance, Ilya

+3
source share
3 answers

free() malloc(). . (gdb), "bt" "backtrace", .

+5

gdb try

bt

, . , gdb + xcode , , .

+3

a malloc_error, , .

, :

+2
source

Source: https://habr.com/ru/post/1705935/


All Articles