[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 2/9] qemugdb: allow adding support for other archite
From: |
Paolo Bonzini |
Subject: |
[Qemu-block] [PATCH 2/9] qemugdb: allow adding support for other architectures |
Date: |
Sat, 4 May 2019 06:05:20 -0600 |
$sp and $pc are standard register names that are available
on most machines, use them instead of $rsp and $rip so that
other architectures can use qemu_coroutine_sp and
qemu_coroutine_pc.
Signed-off-by: Paolo Bonzini <address@hidden>
---
scripts/qemugdb/coroutine.py | 4 ++--
scripts/qemugdb/coroutine_ucontext.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/qemugdb/coroutine.py b/scripts/qemugdb/coroutine.py
index db2753d949..076f6808ab 100644
--- a/scripts/qemugdb/coroutine.py
+++ b/scripts/qemugdb/coroutine.py
@@ -62,11 +62,11 @@ class CoroutineSPFunction(gdb.Function):
gdb.Function.__init__(self, 'qemu_coroutine_sp')
def invoke(self, addr):
- return
coroutine_backend().get_coroutine_regs(addr)['rsp'].cast(VOID_PTR)
+ return
coroutine_backend().get_coroutine_regs(addr)['sp'].cast(VOID_PTR)
class CoroutinePCFunction(gdb.Function):
def __init__(self):
gdb.Function.__init__(self, 'qemu_coroutine_pc')
def invoke(self, addr):
- return
coroutine_backend().get_coroutine_regs(addr)['rip'].cast(VOID_PTR)
+ return
coroutine_backend().get_coroutine_regs(addr)['pc'].cast(VOID_PTR)
diff --git a/scripts/qemugdb/coroutine_ucontext.py
b/scripts/qemugdb/coroutine_ucontext.py
index a2f8c1dbbf..eed095be22 100644
--- a/scripts/qemugdb/coroutine_ucontext.py
+++ b/scripts/qemugdb/coroutine_ucontext.py
@@ -57,12 +57,12 @@ def get_jmpbuf_regs(jmpbuf):
pointer_guard = get_glibc_pointer_guard()
return {'rbx': jmpbuf[JB_RBX],
'rbp': glibc_ptr_demangle(jmpbuf[JB_RBP], pointer_guard),
- 'rsp': glibc_ptr_demangle(jmpbuf[JB_RSP], pointer_guard),
+ 'sp': glibc_ptr_demangle(jmpbuf[JB_RSP], pointer_guard),
'r12': jmpbuf[JB_R12],
'r13': jmpbuf[JB_R13],
'r14': jmpbuf[JB_R14],
'r15': jmpbuf[JB_R15],
- 'rip': glibc_ptr_demangle(jmpbuf[JB_PC], pointer_guard) }
+ 'pc': glibc_ptr_demangle(jmpbuf[JB_PC], pointer_guard) }
def get_coroutine_regs(addr):
co = addr.cast(gdb.lookup_type('CoroutineUContext').pointer())
--
2.21.0
- [Qemu-block] [PATCH 0/9] Assembly coroutine backend and x86 CET support, Paolo Bonzini, 2019/05/04
- [Qemu-block] [PATCH 1/9] qemugdb: allow adding support for other coroutine backends, Paolo Bonzini, 2019/05/04
- [Qemu-block] [PATCH 2/9] qemugdb: allow adding support for other architectures,
Paolo Bonzini <=
- [Qemu-block] [PATCH 4/9] coroutine: add host specific coroutine backend for 64-bit ARM, Paolo Bonzini, 2019/05/04
- [Qemu-block] [PATCH 3/9] coroutine: add host specific coroutine backend for 64-bit x86, Paolo Bonzini, 2019/05/04
- [Qemu-block] [PATCH 5/9] coroutine: add host specific coroutine backend for 64-bit s390, Paolo Bonzini, 2019/05/04
- [Qemu-block] [PATCH 6/9] configure: add control-flow protection support, Paolo Bonzini, 2019/05/04
- [Qemu-block] [PATCH 7/9] tcg: add tcg_out_start, Paolo Bonzini, 2019/05/04
- [Qemu-block] [PATCH 8/9] tcg/i386: add support for IBT, Paolo Bonzini, 2019/05/04