Har
Har

Reputation: 3908

Python: Listing members of a structure using pyelftools

I have a structure in C with several members and an ELF file.

For instance I have the following

typedef struct my_struct {
    int a;
    int c;
    char d;
} MYSTRUCT_T;

MYSTRUCT_T hello;

How am I able to print out the members of hello? Or obtain an object of hello, with members of hello.a, hello.c and hello.d

Is there already a library which does this such as pyelftools?

Upvotes: 1

Views: 301

Answers (0)

Related Questions