blob: 6ab58c2088764f84e0238e632ea4170337f4c0bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
dwarf-extract-struct
====================
Simple utility to extract struct as header file from binary
debug informations
Usage
=====
There's a trivial Makefile for now, just run `make` and run the program.
Once built, `dwarf-extract-struct` takes for arguments:
- path to the binary you want to extract debug informations from
(must be built with -g and not stripped, alternatively it can be a
'.debug' file)
- the name of the struct you want to mimic
- the name of the fields you want to extract
For example, on itself:
```
$ ./dwarf-extract-struct dwarf-extract-struct _IO_FILE _markers _IO_buf_base
struct _IO_FILE {
union {
char whole_struct[216];
struct {
char padding0[56];
char *_IO_buf_base;
};
struct {
char padding1[96];
struct _IO_marker *_markers;
};
};
};
```
This is work in progress, interface will likely change.
|