Common Log Format

The "Common Log Format" is an emulator log format agreed on by (some) emulator writers to ease debugging by comparison. It sets rules about how instructions, registers and memory transactions are logged. The format is being worked on.

List of Emulators that support (or have WIP to support) this logging format

WIP: Bochs, and maybe DosBOX (or some fork)

Instructions

Specification:

The format is like this (everything is spaced by a single space)

<segment>:<offset><opcode byte x N><mnemonic><source><destination>

Example:

f000:0000004e B4 40 mov ah,40

Memory addressing operands

When an operand is a memory address we print it as follows:

<segment>:[offset]

Example

cs:[di+03]

Notes:

  • Mnemonics for which source or destination size is not known will use size specifier. Like this: mov dword ds:[00000000],eax.
  • All numbers are in HEX
  • Everything is small case except for opcode bytes
  • All addresses are padded to their respective sizes with 0
Registers

Specification

<general registers>
<index registers>
<segment registers>
<ip><flags>
<cr registers> (for 386+)
<dr registers> (for 386+)
<gdtr><idtr> (for 286+)

Example (386)

Registers:
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000084
ESP: 00000000 EBP: 00000000 ESI: 00000000 EDI: 00000000
CS: f000 DS: 0000 ES: 0000 FS: 0000 GS: 0000 SS: 0000 TR: 0000 LDTR: 0000
EIP: 0000004c EFLAGS: 00000002
CR0: 00000000 CR2: 00000000 CR3: 00000000
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: 00000000 DR7: 00000000
GDTR: 000000000000ffff IDTR: 00000000000003ff
FLAGSINFO: 00000000000000vr0n00oditsz0a0p1c 

Notes

  • Display all registers for a given architecture (and only those ones)
  • Everything is 0 extended to the full size
  • Everything is small caps

Memory transactions



Full Log Example (386)

f000:00000054 B4 40 mov ah,40
Registers:
EAX: 00000100 EBX: 00000000 ECX: 00000000 EDX: 00000084
ESP: 00000000 EBP: 00000000 ESI: 00000000 EDI: 00000000
CS: f000 DS: 0000 ES: 0000 FS: 0000 GS: 0000 SS: 0000 TR: 0000 LDTR: 0000
EIP: 00000054 EFLAGS: 00000003
CR0: 00000000 CR2: 00000000 CR3: 00000000
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: 00000000 DR7: 00000000
GDTR: 000000000000ffff IDTR: 00000000000003ff
FLAGSINFO: 00000000000000vr0n00oditsz0a0p1C


Comments