aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlexandre Iooss <erdnaxe@crans.org>2021-07-09 15:30:00 +0100
committerAlex Bennée <alex.bennee@linaro.org>2021-07-14 15:54:13 +0100
commit307ce0aaeb5799d05f63b76a91135466f6b15302 (patch)
treead969559218721b3421ae72a336c7e8de22a18f2 /docs
parent3d7caf145e69b61d17f7cada8713f37af2aaebf1 (diff)
downloadqemu-307ce0aaeb5799d05f63b76a91135466f6b15302.zip
qemu-307ce0aaeb5799d05f63b76a91135466f6b15302.tar.gz
qemu-307ce0aaeb5799d05f63b76a91135466f6b15302.tar.bz2
docs/devel: tcg-plugins: add execlog plugin description
This adds description of the execlog TCG plugin with an example. Signed-off-by: Alexandre Iooss <erdnaxe@crans.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210702081307.1653644-3-erdnaxe@crans.org> Message-Id: <20210709143005.1554-36-alex.bennee@linaro.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/tcg-plugins.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index 0cd77c7..179867e 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -320,3 +320,27 @@ the user to see what hardware is accessed how often. It has a number of options:
off:0000001c, 1, 2
off:00000020, 1, 2
...
+
+- contrib/plugins/execlog.c
+
+The execlog tool traces executed instructions with memory access. It can be used
+for debugging and security analysis purposes.
+Please be aware that this will generate a lot of output.
+
+The plugin takes no argument::
+
+ qemu-system-arm $(QEMU_ARGS) \
+ -plugin ./contrib/plugins/libexeclog.so -d plugin
+
+which will output an execution trace following this structure::
+
+ # vCPU, vAddr, opcode, disassembly[, load/store, memory addr, device]...
+ 0, 0xa12, 0xf8012400, "movs r4, #0"
+ 0, 0xa14, 0xf87f42b4, "cmp r4, r6"
+ 0, 0xa16, 0xd206, "bhs #0xa26"
+ 0, 0xa18, 0xfff94803, "ldr r0, [pc, #0xc]", load, 0x00010a28, RAM
+ 0, 0xa1a, 0xf989f000, "bl #0xd30"
+ 0, 0xd30, 0xfff9b510, "push {r4, lr}", store, 0x20003ee0, RAM, store, 0x20003ee4, RAM
+ 0, 0xd32, 0xf9893014, "adds r0, #0x14"
+ 0, 0xd34, 0xf9c8f000, "bl #0x10c8"
+ 0, 0x10c8, 0xfff96c43, "ldr r3, [r0, #0x44]", load, 0x200000e4, RAM