Skip to content
  • David Johnson's avatar
    Extend the QMP hack to "skip past" asynchronous messages. · f98aece5
    David Johnson authored
    I needed %gs and %crX, so I pull those from QEMU's QMP via
    the 'info registers' command.  But rather than actually parsing
    the JSON responses, I just look for a few specific strings to grab
    the register values.  Well, I neglected to account for asynchronous
    notifications, and those were causing the register reads to "fail".
    So, now we just keep reading until we see what we expect.  Still
    could be racy cause we read to a fixed buffer, but it's really
    unlikely.  Still no time to write a JSON message parser.
    f98aece5