I compiled&installed gdb(7.1.1) from the source code by doing CC=gcc-6 ./configure --with-python=python3 && make then sudo make install. Then I invoked gdb from bash as usual. But when I tried to load my python script within gdb by doing source…
How do I look up overloaded methods in GDB using the python interface?
I have a class which has several methods called 'el', one of which takes two ints. GDB is stopped at a breakpoint, with a member variable called _Dr in scope in the inferior…
I have C++ classes in following format (copying just important parts):
class my_stringimpl {
public:
static sample_string* create(const char* str, int len) {
my_stringimpl* sample = static_cast(malloc(sizeof(my_stringimpl) +…
the main structure is
struct my_struct
{
int x;
void* md_template;
void* md_capture_buff;
....
};
When i am doing
(gdb) p ((struct my_struct *)dev_base->next->priv)
The output is like this
$1 = {
x= 15 '\017'
md_template = ,
…
I have a function dump() which, when invoked on an object of type X, prints out something useful to stderr.
I'm trying to write a GDB pretty-print script that utilizes the output of some command to return a string describing a value, something along…
how to extract all the global variables , data structures and sub-structures (with address, type and values) from core dump,using gdb-python, generated after crashing of a C code.?
How to do it for a c code..? Is it possible..? I read this post. I also want to do similar things but i am not able to use the given updated script at link
GDB-Python scripting: any samples iterating through C/C++ struct fields
I followed the…
With GDB and Python I tried to get the char* value on x1 register
python
a= gdb.execute("x/s $x1", to_string=True)
print(a)
end
But I got
0xbb4aaa: "SomeString"
I want to get only the SomeString without the address
How can I do that directly…
I am writing some GDB extension using GDB Python API to be used for C++ applications.
I need to write some index over detected types in debugged process/coredump.
gdb.Type class has __eq__ defined but is not hashable thus can not be used as a key in…
I have some program, the essence of which is to analyze crashes, it works with GDB.
An example of how it works: I run an application in GDB which I want to analyze for crashes, then I load my program into GDB using "source", write "run" to make the…
Code is working it is importing my files and exporting into .glb format
but issue when i open glb file it dose not contain texture image it shows grey...
here is my code
import bpy
import os
dir_path =…
As an example lets say I have a linked list implemented in C. Can I use the GDB python API to implement a custom array access operator so that I can get a value from the list like myList[0] while debugging?
Have tried reading through the docs but…
I need a c++ script to automate GDB debugging another c++ program. the c++ script has to be able to run gdb commands and get the results from it and use it inside the script to save variable values for later usage, my main questions are:
is there a…
OS: QNX 11.1
Python: 3.10
Host OS: Windows
SDP: qnx710
I'm trying to debug my application which will be running on QNX. When I execute the below python program, it doesn't execute os.system('file {}'.format(binpath)). It just stopped at gdb…
I have written a small python script that adds new commands to gdb and for others to use it, they can just source the python file in their ~/.gdbinit, but I would now like to add some useful aliases to those commands.
Right now I've added a README…