public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-31471-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=31471 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 == 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 <it_3>: 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 called to determine where to set breakpoints. In thumb_get_next_pcs_raw, it lands in the "There are conditional instructions 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. Nevertheless the instruction is not executed, because the flags do not allow the insn to run. 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. -- You are receiving this mail because: You are on the CC list for the bug.
reply other threads:[~2024-03-11 13:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31471-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).