aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2023-11-29 21:44:34 +0100
committerNick Clifton <nickc@redhat.com>2023-12-04 17:13:33 +0000
commitc5306fed7d40717d9866524fb346ac2599f9769d (patch)
tree7ccf62c167807ced69a27aae18df57e1408b7610 /binutils
parent86b775c51597816dcab29dd37522b505d043dc51 (diff)
downloadgdb-c5306fed7d40717d9866524fb346ac2599f9769d.zip
gdb-c5306fed7d40717d9866524fb346ac2599f9769d.tar.gz
gdb-c5306fed7d40717d9866524fb346ac2599f9769d.tar.bz2
s390: Support for jump visualization in disassembly
Add support for jump visualization for the s390 architecture in disassembly: objdump -d --visualize-jumps ... Annotate the (conditional) jump and branch relative instructions with information required for jump visualization: - jump: Unconditional jump / branch relative. - condjump: Conditional jump / branch relative. - jumpsr: Jump / branch relative to subroutine. Unconditional jump and branch relative instructions are annotated as jump. Conditional jump and branch relative instructions, jump / branch relative on count/index, and compare and jump / branch relative instructions are annotated as condjump. Jump and save (jas, jasl) and branch relative and save (bras, brasl) instructions are annotated as jumpsr (jump to subroutine). Provide instruction information required for jump visualization during disassembly. The instruction type is provided after determining the opcode. For non-code it is set to dis_noninsn. Otherwise it defaults to dis_nonbranch. No annotation is done for data reference instructions (i.e. instruction types dis_dref and dis_dref2). Note that the instruction type needs to be provided before printing of the instruction, as it is used in print_address_func() to translate the argument value into an address if it is assumed to be a PC-relative offset. Note that this is never the case on s390, as print_address_func() is only called with addresses and never with offsets. The target of the (conditional) jump and branch relative instructions is provided during print, when the PC relative operand is decoded. include/ * opcode/s390.h: Define opcode flags to annotate instruction class information for jump visualization: S390_INSTR_FLAG_CLASS_BRANCH, S390_INSTR_FLAG_CLASS_RELATIVE, S390_INSTR_FLAG_CLASS_CONDITIONAL, and S390_INSTR_FLAG_CLASS_SUBROUTINE. Define opcode flags mask S390_INSTR_FLAG_CLASS_MASK for above instruction class information. Define helpers for common instruction class flag combinations: S390_INSTR_FLAGS_CLASS_JUMP, S390_INSTR_FLAGS_CLASS_CONDJUMP, and S390_INSTR_FLAGS_CLASS_JUMPSR. opcodes/ * s390-mkopc.c: Add opcode flags to annotate information for jump visualization: jump, condjump, and jumpsr. * s390-opc.txt: Annotate (conditional) jump and branch relative instructions with information for jump visualization. * s390-dis.c (print_insn_s390, s390_print_insn_with_opcode): Provide instruction information for jump visualization. Signed-off-by: Jens Remus <jremus@linux.ibm.com> Reviewed-by: Andreas Krebbel <krebbel@linux.ibm.com>
Diffstat (limited to 'binutils')
-rw-r--r--binutils/NEWS2
1 files changed, 2 insertions, 0 deletions
diff --git a/binutils/NEWS b/binutils/NEWS
index 3bf3b56..73df705 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -17,6 +17,8 @@
* objcopy --set-section-flags now supports "large" to set SHF_X86_64_LARGE
for ELF x86-64 objects.
+* objdump --visualize-jumps is now supported on s390 architecture.
+
Changes in 2.41:
* The MIPS port now supports the Sony Interactive Entertainment Allegrex