Objective C: Where to find <process id> in gdb?

假如想象 提交于 2019-12-11 02:29:57

问题


I am trying to debug my program using NSZombie. The debugger did return me the address of the instance with the issue, however I am not sure where to obtain the pid which is required to run the command 'shell malloc_history

Can anyone advise me on what is the correct pid to use in this case? I tried 3298 and 3298:707 and they both didnt work. Appreciate any help here.

Zhen Hoe

2011-05-19 16:57:05.779 CarParkDemon[3298:707] in table view cellforRow Method3
2011-05-19 16:57:05.781 CarParkDemon[3298:707] *** -[CFString retain]: message sent to deallocated instance 0x5d82930
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
(gdb) shell malloc_history 3298:707 0x5d82930
malloc_history cannot examine process 3298 because the process does not exist.

回答1:


malloc_history works only in simulator. Your logs say that you are doing it on device.



来源:https://stackoverflow.com/questions/6066699/objective-c-where-to-find-process-id-in-gdb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!