小编J. *_*ute的帖子

How to call a C function from within gdb-python method

I want to create a python pretty printer within gdb. I have a hidden data-type xyzHandle in the program I'm trying to debug. I can pull out some information from that handle with a C function; which I can call within the gdb debugger. For example:

xyzHandle object1 = api_get_first_object();

(gdb) print (char *)xyz_get_string(1, object1)
Run Code Online (Sandbox Code Playgroud)

I know I can create a gdb command like 'pn' and use that; but I want to use the build-in python of (gdb) to create …

python debugging gdb

7
推荐指数
1
解决办法
1450
查看次数

标签 统计

debugging ×1

gdb ×1

python ×1