Skip to content
Snippets Groups Projects
  1. Dec 15, 2020
    • Peter Maydell's avatar
      gdbstub: Correct misparsing of vCont C/S requests · 3ddd9036
      Peter Maydell authored
      In the vCont packet, two of the command actions (C and S) take an
      argument specifying the signal to be sent to the process/thread, which is
      sent as an ASCII string of two hex digits which immediately follow the
      'C' or 'S' character.
      
      Our code for parsing this packet accidentally skipped the first of the
      two bytes of the signal value, because it started parsing the hex string
      at 'p + 1' when the preceding code had already moved past the 'C' or
      'S' with "cur_action = *p++".
      
      This meant that we would only do the right thing for signals below
      10, and would misinterpret the rest.  For instance, when the debugger
      wants to send the process a SIGPROF (27 on x86-64) we mangle this into
      a SIGSEGV (11).
      
      Remove the accidental double increment.
      
      Fixes: https://bugs.launchpad.net/qemu/+bug/1773743
      
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-id: 20201121210342.10089-1-peter.maydell@linaro.org
      3ddd9036
  2. Oct 06, 2020
    • Pavel Dovgalyuk's avatar
      replay: create temporary snapshot at debugger connection · 56357d80
      Pavel Dovgalyuk authored
      
      When record/replay does not uses overlays for storing the snapshots,
      user is not capable of issuing reverse debugging commands.
      This patch adds creation of the VM snapshot on the temporary
      overlay image, when the debugger connects to QEMU.
      Therefore the execution can be rewind to the moment
      of the debugger connection while debugging the virtual machine.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
      
      --
      
      v6:
       - dropped unused error processing (suggested by Philippe Mathieu-Daudé)
      Message-Id: <160174524096.12451.11651270339216758643.stgit@pasha-ThinkPad-X280>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      56357d80
    • Pavel Dovgaluk's avatar
      gdbstub: add reverse continue support in replay mode · cda38259
      Pavel Dovgaluk authored
      
      This patch adds support of the reverse continue operation for gdbstub.
      Reverse continue finds the last breakpoint that would happen in normal
      execution from the beginning to the current moment.
      Implementation of the reverse continue replays the execution twice:
      to find the breakpoints that were hit and to seek to the last breakpoint.
      Reverse continue loads the previous snapshot and tries to find the breakpoint
      since that moment. If there are no such breakpoints, it proceeds to
      the earlier snapshot, and so on. When no breakpoints or watchpoints were
      hit at all, execution stops at the beginning of the replay log.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
      Message-Id: <160174522930.12451.6994758004725016836.stgit@pasha-ThinkPad-X280>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cda38259
    • Pavel Dovgaluk's avatar
      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
  3. Aug 21, 2020
    • Paolo Bonzini's avatar
      trace: switch position of headers to what Meson requires · 243af022
      Paolo Bonzini authored
      
      Meson doesn't enjoy the same flexibility we have with Make in choosing
      the include path.  In particular the tracing headers are using
      $(build_root)/$(<D).
      
      In order to keep the include directives unchanged,
      the simplest solution is to generate headers with patterns like
      "trace/trace-audio.h" and place forwarding headers in the source tree
      such that for example "audio/trace.h" includes "trace/trace-audio.h".
      
      This patch is too ugly to be applied to the Makefiles now.  It's only
      a way to separate the changes to the tracing header files from the
      Meson rewrite of the tracing logic.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      243af022
  4. Jul 21, 2020
  5. May 06, 2020
  6. Apr 07, 2020
  7. Mar 17, 2020
  8. Mar 06, 2020
    • Kevin Wolf's avatar
      hmp: Fail gracefully if chardev is already in use · 8e9119a8
      Kevin Wolf authored
      
      Trying to attach a HMP monitor to a chardev that is already in use
      results in a crash because monitor_init_hmp() passes &error_abort to
      qemu_chr_fe_init():
      
      $ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo --mon foo
      QEMU 4.2.50 monitor - type 'help' for more information
      (qemu) Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220:
      qemu-system-x86_64: --mon foo: Device 'foo' is in use
      Abgebrochen (Speicherabzug geschrieben)
      
      Fix this by allowing monitor_init_hmp() to return an error and passing
      any error in qemu_chr_fe_init() to its caller instead of aborting.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-19-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8e9119a8
  9. Jan 08, 2020
  10. Aug 28, 2019
  11. Aug 16, 2019
    • Markus Armbruster's avatar
      sysemu: Split sysemu/runstate.h off sysemu/sysemu.h · 54d31236
      Markus Armbruster authored
      
      sysemu/sysemu.h is a rather unfocused dumping ground for stuff related
      to the system-emulator.  Evidence:
      
      * It's included widely: in my "build everything" tree, changing
        sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600
        objects (not counting tests and objects that don't depend on
        qemu/osdep.h, down from 5400 due to the previous two commits).
      
      * It pulls in more than a dozen additional headers.
      
      Split stuff related to run state management into its own header
      sysemu/runstate.h.
      
      Touching sysemu/sysemu.h now recompiles some 850 objects.  qemu/uuid.h
      also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400
      to 4200.  Touching new sysemu/runstate.h recompiles some 500 objects.
      
      Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also
      add qemu/main-loop.h.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-30-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      [Unbreak OS-X build]
      54d31236
  12. Jul 10, 2019
  13. Jul 05, 2019
  14. Jun 18, 2019
  15. Jun 12, 2019
Loading