From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 65AA53858C78; Sun, 6 Mar 2022 21:00:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65AA53858C78 From: "andrew.lamarra at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/28609] GDB does not recognize the movn mips instruction Date: Sun, 06 Mar 2022 21:00:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: andrew.lamarra at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2022 21:00:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28609 --- Comment #6 from Andrew Lamarra --- So I made a really small test file: int main() { __asm__("movn $s0,$v0,$a0"); return 0; } And compiled with: $ mips-linux-gnu-gcc -static test.c -o test Now I noticed that when disassembling that binary with gdb-multiarch, it sh= ows the instruction: $ gdb-multiarch -nx -q test Reading symbols from test... (No debugging symbols found in test) (gdb) show architecture=20 The target architecture is set automatically (currently mips:isa32r2) (gdb) disassemble main Dump of assembler code for function main: 0x00400790 <+0>: addiu sp,sp,-8 0x00400794 <+4>: sw s8,4(sp) 0x00400798 <+8>: move s8,sp 0x0040079c <+12>: movn s0,v0,a0 0x004007a0 <+16>: move v0,zero 0x004007a4 <+20>: move sp,s8 0x004007a8 <+24>: lw s8,4(sp) 0x004007ac <+28>: addiu sp,sp,8 0x004007b0 <+32>: jr ra 0x004007b4 <+36>: nop End of assembler dump. However, when I do remote debugging via qemu or gdbserver, it doesn't displ= ay. So I start it with: $ qemu-mips-static -g 1234 test Then attach to it & disassemble: $ ./gdb/gdb -q -nx --data-directory=3D./gdb/data-directory/ \ -ex "set architecture mips" \ -ex "file /home/andrew/test" \ -ex "target remote 127.1:1234" \ -ex "disas main" The target architecture is set to "mips". Reading symbols from /home/andrew/test... (No debugging symbols found in /home/andrew/test) Remote debugging using 127.1:1234 0x00400590 in __start () Dump of assembler code for function main: 0x00400790 <+0>: addiu sp,sp,-8 0x00400794 <+4>: sw s8,4(sp) 0x00400798 <+8>: move s8,sp 0x0040079c <+12>: 0x44800b 0x004007a0 <+16>: move v0,zero 0x004007a4 <+20>: move sp,s8 0x004007a8 <+24>: lw s8,4(sp) 0x004007ac <+28>: addiu sp,sp,8 0x004007b0 <+32>: jr ra 0x004007b4 <+36>: nop End of assembler dump. Same results when I put the binary on a mips machine and start a session via gdbserver. --=20 You are receiving this mail because: You are on the CC list for the bug.=