Using matplotlib in iphone lldb (obj-c)

家住魔仙堡 提交于 2020-01-06 07:09:01

问题


I am trying to find a way to display the values in arrays in my ojective-C based iphone program, as described in my other question here

I am able to get the contents of an array in my program into the python interpreter while the iphone program is stopped at a break point inside a function (to be specific, the function is the render callback function for audio)

However, when I tried to plot the contents of the array (availabe as SBValueList in the Python interpreter) using matplotlib, the debug session simply crashed without any error messages

To try a simple example, once the program stopped at the breakpoint, I tried issuing a very simple matplotlib command as follows:

import matplotlib.pyplot as plt
plt.plot([1,2,3,4])  

but the debug session suddenly crashes and exits at plt.plot([1,2,3,4])

Is it possible to display contents of array in lldb using matplotlib? Is there any other way to display the contents of my array a graph while debugging my iphone program?


回答1:


I'd consider taking a step back. If you can render your objective-c array as a plot on UIView or UIImage you could view it while standing on a breakpoint with chisel:
https://github.com/facebook/chisel



来源:https://stackoverflow.com/questions/53367537/using-matplotlib-in-iphone-lldb-obj-c

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