[PATCH v3 0/4] Fixes and improvements for scripts/qemugdb commands

Andrey Drobyshev posted 4 patches 1 week, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251204105019.455060-1-andrey.drobyshev@virtuozzo.com
scripts/qemugdb/coroutine.py | 257 +++++++++++++++++++++++++++++++++--
scripts/qemugdb/mtree.py     |   2 +-
scripts/qemugdb/timers.py    |  54 ++++++--
3 files changed, 289 insertions(+), 24 deletions(-)
[PATCH v3 0/4] Fixes and improvements for scripts/qemugdb commands
Posted by Andrey Drobyshev 1 week, 2 days ago
v2 -> v3:

  * Use atexit.register() instead of gdb.events.exited.connect() for
    registering a cleanup callback.  That way it's called upon both
    normal and abnormal exit;
  * Wrap code in invoke() methods in try-finally block, so that
    restore_regs() is called unconditionally even we caught an exception;
  * Restore registers in cleanup;
  * Set dirty flag early on in patch_regs() to make sure registers get
    restored if we failed while patching.

v1 -> v2:

  * Use pty module instead of script(1) for producing colored output;
  * Patch coredump file in place instead of full copy;
  * Save and restore original pt_regs values in a separate file;
  * Wrap this logic in a separate class.

v2: https://lore.kernel.org/qemu-devel/20251202163119.363969-1-andrey.drobyshev@virtuozzo.com/
v1: https://lore.kernel.org/qemu-devel/20251125142105.448289-1-andrey.drobyshev@virtuozzo.com/

Andrey Drobyshev (4):
  scripts/qemugdb: mtree: Fix OverflowError in mtree with 128-bit
    addresses
  scripts/qemugdb: timers: Fix KeyError in 'qemu timers' command
  scripts/qemugdb: timers: Improve 'qemu timers' command readability
  scripts/qemugdb: coroutine: Add option for obtaining detailed trace in
    coredump

 scripts/qemugdb/coroutine.py | 257 +++++++++++++++++++++++++++++++++--
 scripts/qemugdb/mtree.py     |   2 +-
 scripts/qemugdb/timers.py    |  54 ++++++--
 3 files changed, 289 insertions(+), 24 deletions(-)

-- 
2.43.5