gdb-python Questions

4

Solved

In Python, I have a a variable var of type gdb.Value that corresponds to a C++ struct. The struct has a method void foo(). I can evaluate this expression var['foo']. But var['foo']\() will compl...
Chadwickchae asked 31/3, 2014 at 23:23

2

Solved

Is there a way by which I can get the address of a global symbol in my binary if I know its name with the GDB Python API ? Is python print(gdb.parse_and_eval('symbol').address) the correct method ...
Cliffhanger asked 7/1, 2019 at 7:23

1

There are lots of coroutines in my production code, which are stuck at unknown position while processing request. I attached gdb with Python support extension to the process, but it doesn't show th...
Manning asked 13/1, 2021 at 15:18

1

Solved

I'd like to inspect some global variables before a crash happens. The issue only reproduces on a certain stack trace and setting a breakpoint on the innermost function (or any other from the stack)...
Churchman asked 26/3, 2019 at 12:11

1

Solved

I'm trying to debug some Cython code with gdb that is wrapping C++ code to be called from Python. I followed the instructions in the documentation but I'm getting some errors while debugging that a...
Eichelberger asked 4/10, 2018 at 21:58

1

I'm running python 3.6.6-debug (installed via pyenv) and I've copied the associated libpython.py from cpython/Tools/gdb/libpython.py to ~/.config/gdb (with the v3.6.6 tag checked out). In my .gdbin...
Ar asked 31/10, 2018 at 13:16

1

In gdb, we can use layout src to get a pretty good debug text-UI. Does pdb(The Python Debugger) have something equivalent? In pdb, I can only see the next line that is going to be executed, which i...
Graecoroman asked 25/10, 2018 at 1:31

1

Solved

I am scripting GDB with Python 2.7. I am simply stepping instructions with gdb.execute("stepi"). If the debugged program is idling and waiting for user interaction, gdb.execute("stepi") doesn't re...
Dibs asked 30/8, 2018 at 13:17

2

Solved

How to debug python script in C level using GDB. Give me a simple example for this.My primary goal is to get the trace of libc function called from my python script.
Woodsum asked 26/7, 2018 at 11:40

4

Solved

I'm trying to create a little unit test with gdb, for a embedded mcu that is controlled by OpenOCD (that gives me control over my target via a gdb server). So I would like to automate this with s...
Journalize asked 30/10, 2010 at 20:34

1

I have a handy class that I use to allow me to easily add a set of "summariser" functions to a GDB pretty printer (for example, a Rect class could have an [Area] field, computed by Python). it then...
Hilar asked 20/10, 2014 at 18:3

5

Solved

I'm trying to add pretty printing for STL objects in eclipse cdt. I tried to follow the steps described here: http://sourceware.org/gdb/wiki/STLSupport I checked out the python folder, but I can'...
Uncle asked 13/2, 2011 at 16:42
1

© 2022 - 2024 — McMap. All rights reserved.