From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA52A3858C98; Mon, 11 Mar 2024 13:00:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA52A3858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710162052; bh=HLz1M9jNV6QeHP84kB/2U6pFt6srExmXsQh7vUdXlKg=; h=From:To:Subject:Date:From; b=AOC1c+EOKQHRTlMXmy9GZ8jtbVSrRIV+gcAkC6YVbwUz7lC7yxGhlqPeOnfNdNHLH 1zzFFwyoY5fx83y9irSnQ/YoR6AYsUq0c03Azo+tZOjQNvNGEdVveONcnq9XYXK5yM g8hkirlut1AdLLrjX9DjiZ2jkvYFHVDIoOVa4Goo= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/31471] New: [gdb/tdep, arm] FAIL: gdb.arch/thumb2-it.exp: it_3, stepi 3 Date: Mon, 11 Mar 2024 13:00:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31471 Bug ID: 31471 Summary: [gdb/tdep, arm] FAIL: gdb.arch/thumb2-it.exp: it_3, stepi 3 Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: tdep Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- On pinebook pro (aarch64 manjaro linux, 32-bit debian chroot) I run into: ... (gdb) PASS: gdb.arch/thumb2-it.exp: it_2, continue break *it_3^M Breakpoint 4 at 0x40051e: file /home/vries/gdb/src/gdb/testsuite/gdb.arch/thumb2-it.S, line 67.^M (gdb) call (int) it_3()^M ^M Breakpoint 4, it_3 () at /home/vries/gdb/src/gdb/testsuite/gdb.arch/thumb2-it.S:67^M 67 mov r0, #0 @ Setup^M The program being debugged stopped while in a function called from GDB.^M Evaluation of the expression containing the function^M (it_3) will be abandoned.^M When the function is done executing, GDB will silently stop.^M (gdb) PASS: gdb.arch/thumb2-it.exp: it_3, call stepi^M 68 cmp r0, #0 @ Setup^M (gdb) PASS: gdb.arch/thumb2-it.exp: it_3, stepi 0 stepi^M 69 itete ge @ IT instruction, Expected =3D=3D 2^M (gdb) PASS: gdb.arch/thumb2-it.exp: it_3, stepi 1 stepi^M 70 addge r0, #1 @ Reached^M (gdb) PASS: gdb.arch/thumb2-it.exp: it_3, stepi 2 stepi^M 71 addlt r0, #2 @ Not reached^M (gdb) FAIL: gdb.arch/thumb2-it.exp: it_3, stepi 3 continue^M ... objdump output: ... 0000051e : 51e: f04f 0000 mov.w r0, #0 522: 2800 cmp r0, #0 524: bfab itete ge 526: 3001 addge r0, #1 528: 3002 addlt r0, #2 52a: 3004 addge r0, #4 52c: 3008 addlt r0, #8 52e: 4770 bx lr ... The following happens: while stopped at 0x526, thumb_get_next_pcs_raw is ca= lled to determine where to set breakpoints. In thumb_get_next_pcs_raw, it lands in the "There are conditional instructi= ons after this one" case, and returns the pcs for insns at 0x528 and 0x52a. Both breakpoints are set, and then the breakpoint at 0x528 is hit.=20 Nevertheless the instruction is not executed, because the flags do not allow the insn to run.=20 The next stepi hits instruction 0x52a, which is indeed executed. The test-case expects stepi to skip over the insn at 0x528. I think it's possible do so, AFAIU the logic for determining whether we're stopped at a a disabled IT sub-insn is present in thumb_get_next_pcs_raw. --=20 You are receiving this mail because: You are on the CC list for the bug.=