Skip to content
Snippets Groups Projects
  • Pekka Enberg's avatar
    ca52fa23
    x64: Register dump on GP fault · ca52fa23
    Pekka Enberg authored
    
    Dump registers on general protection fault for debugging purposes.  Even
    if you have gdb available, getting to the exception frame is not always
    possible after OSv has crashed.
    
    Example output looks as follows:
    
    registers:
    RIP: 0x0000100000b7e913  RFL: 0x0000000000010202  CS:  0x0000000000000008  SS:  0x0000000000000010
    RAX: 0xffffc000418ed278  RBX: 0xffffc00041b2c050  RCX: 0x0000000000000004  RDX: 0x0000000000000000
    RSI: 0x0000000000000001  RDI: 0x43e0000000000000  RBP: 0x0000200008548d10  R8:  0xffffc000426e3010
    R9:  0x0000000000000004  R10: 0x43e0000000000000  R11: 0xffffc00041b2c050  R12: 0xffffc000418ed1e8
    R13: 0x0000000000000004  R14: 0x43e0000000000000  R15: 0xffffc00041b2c050  RSP: 0x0000200008548aa0
    general protection fault
    
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
    ca52fa23
    History
    x64: Register dump on GP fault
    Pekka Enberg authored
    
    Dump registers on general protection fault for debugging purposes.  Even
    if you have gdb available, getting to the exception frame is not always
    possible after OSv has crashed.
    
    Example output looks as follows:
    
    registers:
    RIP: 0x0000100000b7e913  RFL: 0x0000000000010202  CS:  0x0000000000000008  SS:  0x0000000000000010
    RAX: 0xffffc000418ed278  RBX: 0xffffc00041b2c050  RCX: 0x0000000000000004  RDX: 0x0000000000000000
    RSI: 0x0000000000000001  RDI: 0x43e0000000000000  RBP: 0x0000200008548d10  R8:  0xffffc000426e3010
    R9:  0x0000000000000004  R10: 0x43e0000000000000  R11: 0xffffc00041b2c050  R12: 0xffffc000418ed1e8
    R13: 0x0000000000000004  R14: 0x43e0000000000000  R15: 0xffffc00041b2c050  RSP: 0x0000200008548aa0
    general protection fault
    
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
build.mk 23.71 KiB