![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
echo_hello1
这个作者很懒,什么都没留下…
展开
-
使用GDB,进行在Pyhon 级别的调试(python使用ctype引用动态库文件)
我在使用python运行一个程序,它引用ctypes调用了动态库,现在需要进行调试,那么可以使用GDB调试python程序。 gdb --args python main.py 进入gdb就可以设置断点了 b func_name run stackoverflow上有这个问题,出自How to debug python script in C level using GDB. Give me a simple example for this - Stack Overflow ...翻译 2022-04-03 11:23:49 · 295 阅读 · 0 评论 -
python 3.6中的字符串转c_type_p的报错问题
官方在这个版本中将 python的字符串类型对应到了字节类型,所以要传字符串时要把字符串转成字节类型,例如: test.argtype = [c_char_p] ...... test("param") 这样会报错,需要修改成test(b"param")原创 2022-03-21 11:25:20 · 1093 阅读 · 0 评论