Skip to content

Commit 00fd9c5

Browse files
committed
Document tracing
1 parent f88cb26 commit 00fd9c5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ cd build
2222
make
2323
```
2424

25+
## Tracing a binary
26+
27+
The plugin takes two required arguments:
28+
29+
`bin_path`: The path to the binary emulated. Due to a [QEMU bug](https://gitlab.com/qemu-project/qemu/-/issues/3014) this cannot be inferred.
30+
`out`: The output file to save the trace into.
31+
32+
```bash
33+
./qemu-sparc64 -plugin file=./contrib/plugins/bap-tracing/libbap_tracing.so,bin_path=<bin_path>,out=<output-file> -d plugin <bin_path>
34+
ls <output-file>
35+
```
36+
2537
## Trace format
2638

2739
The generated trace consists of three parts: the header,

contrib/plugins/bap-tracing/frame_buffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ static size_t mval_type_to_int(enum qemu_plugin_mem_value_type type) {
271271
default:
272272
g_assert(false);
273273
}
274+
return 0;
274275
}
275276

276277
static void mval_to_buf(qemu_plugin_mem_value *val, uint8_t *buf) {

0 commit comments

Comments
 (0)