Skip to content
Snippets Groups Projects
  • Pavel Dovgaluk's avatar
    fda8458b
    gdbstub: add reverse step support in replay mode · fda8458b
    Pavel Dovgaluk authored
    
    GDB remote protocol supports two reverse debugging commands:
    reverse step and reverse continue.
    This patch adds support of the first one to the gdbstub.
    Reverse step is intended to step one instruction in the backwards
    direction. This is not possible in regular execution.
    But replayed execution is deterministic, therefore we can load one of
    the prior snapshots and proceed to the desired step. It is equivalent
    to stepping one instruction back.
    There should be at least one snapshot preceding the debugged part of
    the replay log.
    
    Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
    Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    
    --
    
    v4 changes:
     - inverted condition in cpu_handle_guest_debug (suggested by Alex Bennée)
    Message-Id: <160174522341.12451.1498758422543765253.stgit@pasha-ThinkPad-X280>
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    fda8458b
    History
    gdbstub: add reverse step support in replay mode
    Pavel Dovgaluk authored
    
    GDB remote protocol supports two reverse debugging commands:
    reverse step and reverse continue.
    This patch adds support of the first one to the gdbstub.
    Reverse step is intended to step one instruction in the backwards
    direction. This is not possible in regular execution.
    But replayed execution is deterministic, therefore we can load one of
    the prior snapshots and proceed to the desired step. It is equivalent
    to stepping one instruction back.
    There should be at least one snapshot preceding the debugged part of
    the replay log.
    
    Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
    Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    
    --
    
    v4 changes:
     - inverted condition in cpu_handle_guest_debug (suggested by Alex Bennée)
    Message-Id: <160174522341.12451.1498758422543765253.stgit@pasha-ThinkPad-X280>
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>