Skip to content

Instantly share code, notes, and snippets.

@inaz2
Created October 12, 2016 01:52
Show Gist options
  • Save inaz2/8a529f29f9c4d765e6263b701191fe1d to your computer and use it in GitHub Desktop.
Save inaz2/8a529f29f9c4d765e6263b701191fe1d to your computer and use it in GitHub Desktop.
using qemu-user-static for branch tracing
$ qemu-x86_64-static -d exec /bin/ls 2>&1 >/dev/null | head -n40
host mmap_min_addr=0x10000
Reserved 0x21c000 bytes of guest address space
Relocating guest address space from 0x0000000000400000 to 0x400000
guest_base 0x0
start end size prot
0000000000400000-000000000041a000 000000000001a000 r-x
0000000000619000-000000000061c000 0000000000003000 rw-
0000004000000000-0000004000001000 0000000000001000 ---
0000004000001000-0000004000801000 0000000000800000 rw-
0000004000801000-0000004000824000 0000000000023000 r-x
0000004000824000-0000004000a23000 00000000001ff000 ---
0000004000a23000-0000004000a26000 0000000000003000 rw-
start_brk 0x0000000000000000
end_code 0x0000000000419d44
start_code 0x0000000000400000
start_data 0x0000000000619df0
end_data 0x000000000061a5f4
start_stack 0x0000004000800c00
brk 0x000000000061b360
entry 0x00000040008022d0
Trace 0x605a4890 [00000040008022d0]
Trace 0x605a48f0 [0000004000805a40]
Trace 0x605a4ac0 [0000004000805a95]
Trace 0x605a4b90 [0000004000805aef]
Trace 0x605a4c30 [0000004000805ad8]
Trace 0x605a4b90 [0000004000805aef]
Trace 0x605a4d00 [0000004000805af5]
Trace 0x605a4db0 [0000004000805d00]
Trace 0x605a4e60 [0000004000805d28]
Trace 0x605a4f10 [0000004000805e98]
Trace 0x605a4fc0 [0000004000805ea8]
Trace 0x605a5040 [0000004000805ae3]
Trace 0x605a4b90 [0000004000805aef]
Trace 0x605a50f0 [0000004000805b05]
Trace 0x605a4b90 [0000004000805aef]
Trace 0x605a51d0 [0000004000805b22]
Trace 0x605a5260 [0000004000805b2b]
Trace 0x605a5300 [0000004000805b37]
Trace 0x605a53c0 [0000004000805b47]
Trace 0x605a5480 [0000004000805b57]
$ qemu-x86_64-static -d exec /bin/ls 2>&1 >/dev/null | wc -l
13066
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment