From df0e55ce401ff3b971be691a0e3f662da5ba5652 Mon Sep 17 00:00:00 2001 From: patryk4815 Date: Wed, 16 Apr 2025 18:10:41 +0200 Subject: [PATCH] fix capstone merge collision with s390x (#2881) * fix capstone regression --- pwndbg/aglib/disasm/__init__.py | 2 +- pwndbg/aglib/disasm/instruction.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pwndbg/aglib/disasm/__init__.py b/pwndbg/aglib/disasm/__init__.py index 0e30d1f83..0aeeae518 100644 --- a/pwndbg/aglib/disasm/__init__.py +++ b/pwndbg/aglib/disasm/__init__.py @@ -46,7 +46,7 @@ CapstoneArch = { "sparc": CS_ARCH_SPARC, "rv32": CS_ARCH_RISCV, "rv64": CS_ARCH_RISCV, - "s390x": CS_ARCH_SYSZ, + "s390x": CS_ARCH_SYSTEMZ, } CapstoneEndian = { diff --git a/pwndbg/aglib/disasm/instruction.py b/pwndbg/aglib/disasm/instruction.py index 9d0235e40..8f74537b0 100644 --- a/pwndbg/aglib/disasm/instruction.py +++ b/pwndbg/aglib/disasm/instruction.py @@ -40,9 +40,9 @@ from capstone.riscv import RISCV_INS_JAL from capstone.riscv import RISCV_INS_JALR from capstone.sparc import SPARC_INS_JMP from capstone.sparc import SPARC_INS_JMPL -from capstone.systemz import SYSZ_INS_B -from capstone.systemz import SYSZ_INS_BAL -from capstone.systemz import SYSZ_INS_BALR +from capstone.systemz import SYSTEMZ_INS_B +from capstone.systemz import SYSTEMZ_INS_BAL +from capstone.systemz import SYSTEMZ_INS_BALR from capstone.x86 import X86_INS_JMP from capstone.x86 import X86Op from typing_extensions import override @@ -81,7 +81,7 @@ UNCONDITIONAL_JUMP_INSTRUCTIONS: Dict[int, Set[int]] = { RISCV_INS_C_JR, }, CS_ARCH_PPC: {PPC_INS_B, PPC_INS_BA, PPC_INS_BL, PPC_INS_BLA}, - CS_ARCH_SYSZ: {SYSZ_INS_B, SYSZ_INS_BAL, SYSZ_INS_BALR}, + CS_ARCH_SYSTEMZ: {SYSTEMZ_INS_B, SYSTEMZ_INS_BAL, SYSTEMZ_INS_BALR}, } # See: https://github.com/capstone-engine/capstone/issues/2448