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't seem to get this done...
I created a gdbinit and…
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 some scripting of gdb.
I would like to write some kind…
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 complain saying
RuntimeError: Value is not callable (not…
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 .gdbinit I have:
source ~/.config/gdb/libpython.py
For…
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 are unrelated to my code. Example:
(gdb) cy print…
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 the exact line in the coroutine where the process is…
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 is annoying.
gdb text ui is shown below:
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 return. If there is such a situation, I want to stop…
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.
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) will not get me close enough.
Can I achieve the…
I have a script to work out how much free stack space there is in each FreeRTOS task. GDB’s language is set to auto. The script works fine when the current language is c, but fails when the current language is ada.
I have, in the class Stacks,
tcb_t…
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 prints all the existing children as well, so you…
I'm writing a pretty printer in python for gdb, and am slowly getting the hang of the methodology. Trying to find actual documentation as to how this system works with examples of what is expected coming out of the methods is like pulling teeth. …
I'd like to pass some command line arguments to a python script run via gdb command, but importing the gdb module in python removes the argv attribute from sys. How do I access arg1 and arg2 within my python script shown in my example?
Command line…
I am writing a python script to automate debugging core dump from gdb. i am trying to print data structure which includes kernel data structures and lists(e.g. struct list_head). For example the structure is something like this:
struct my_struct {
…