Bug 17038 - gdb doesn't recognize s390 instruction CIT
Summary: gdb doesn't recognize s390 instruction CIT
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: tdep (show other bugs)
Version: 7.3
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 17037 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-07 02:51 UTC by Flame Doge
Modified: 2015-06-29 08:03 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flame Doge 2014-06-07 02:51:17 UTC
on zLinux, s390 instruction CIT is assembled into [.long 0xEC'R'0 'IIII' 'M'027] where R is target reg [0-F], I is immediate [0-2^4), and M is mask. However, layout asm mode parses this instruction as 4 byte long when it is 6 byte. All subsequent instructions are therefore parsed incorrectly.

example

0x400656 .long 0xEC100000
0x40065a sth %r7,2418(%r2,%r11)  //bogus, should parse from 0x40065c

(gdb) p/x *0x40065a
$1 = 0x4072b972   //0x4072 is from .long
Comment 1 Flame Doge 2014-06-07 02:52:58 UTC
*** Bug 17037 has been marked as a duplicate of this bug. ***
Comment 2 Andreas Krebbel 2015-06-29 08:03:19 UTC
cit is a zarch instruction. It wasn't recognized because binutils disassembly defaulted to ESA mode for 31 bit binaries. We changed that recently so it should be fixed by now:
https://sourceware.org/ml/binutils/2013-10/msg00382.html