I am using Jdebug system call using python and trying to automate the process of "bt" command as shown below.
It consists of two steps.
jdebug core-tarball.0.tgz
Response received:
Using '/tmp' as temporary location
jdebug version: 5.0.0
[File is…
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 t o obtain this value ?
I am writing a GDB pretty printer in Python for this linked list data structure:
struct listNode {
void *data; /* node's data */
struct listNode *next; /* next node in list …
I'm trying to develop a GDB python extension that defines a command that launches a new thread, in which the user can inspect an arbitrary type of variables. The skeleton of my python extension is this:
import gdb
import threading
def…
I'm using python2.6's gdb module while debugging a C program, and would like to convert a gdb.Value instance into a python numeral object (variable) based off the instance's '.Type'.
E.g. turn my C program's SomeStruct->some_float_val = 1./6; to a…
I am trying to script GDB with python. I have a GDB's native script file which sources a python script file. In the .gdb file I am declaring some breakpoints on different functions. I am able to perform next/step/continue over these breakpoints…
i am trying to access kernel linked list, the structure is
struct my_struct {
struct my_hardware_context ahw;
struct net_device *netdev;
struct pci_dev *pdev;
struct list_head mac_list;
struct list_head wait_list;
....
....
};
using gdb, i am able…
I am using RHEL 5.3 OS, gdb 7.5 and python 2.7.
I am writing a script in Python to automate some gdb debugging steps.
Can we store the output of the following command ("name1") into a variable?
(gdb) p *(ptr->name)
$13 = "name1"
I want to do this…
Suppose I have a class:
class RawMessage(NamedTuple):
data: Dict
timestamp: float
...
The keys and values in this dictionary are probably all integers, but I don't want to state that with certainty.
I additionally hvae a core dump file…
I want to put a breakpoint in a Linux share library in specific offset ( in libTest.so in function 0x1234 ) while I debugging with GEF GDB. But I want to put it with gdb script.
If I run vmmap libTest.so I got
[ Legend: Code | Heap | Stack…
Suppose I have the following C++:
template int bar(int i) {
++i;
label1:
return I * i;
}
int main(int argc, char **) { return bar<2>(argc); }
Is it possible to set a gdb breakpoint on label1 for all instantiations of bar? In the above,…
Per the documentation here, gdb states:
Function: gdb.set_convenience_variable (name, value)
[...] If value is None, then the convenience variable is removed.
but when I execute
gdb.set_convenience_variable('foo',…
I'm trying to write a pretty-printer for a class containing a std::set of objects for which I'm also supplying my own pretty printer. Very basically, this is how my C++ code looks like:
#include
#include
#include
class…