From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C79083858D39; Mon, 12 Feb 2024 11:27:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C79083858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707737238; bh=6FVUW0K07zyYKwsxysRgoChmv0LafTsuWYOLixFMlXM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BV6+GG9uJSlEm0QLhsCIovAWr3eU6wUoQ5v72e/hh5ZaYPz3Lw/WWSkFKQ+njXmk9 OrSlQQxanX6m43WWK3Jpv2Fby8PeBd/J/08q9AThynm6fEPsfr7xwiT8yNOCx9jcbg Zm4aKFXkGPe6LAtkCSMZgBMqCIHSFPTzmJdfdMAI= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/31278] [gdb/tdep, thumb2] GDB on arm-linux-gnueabihf fails gdb.reverse/func-map-to-same-line.exp Date: Mon, 12 Feb 2024 11:27:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: UNCONFIRMED 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31278 --- Comment #10 from Tom de Vries --- (In reply to Luis Machado from comment #9) > I'm guessing this is probably LDR (immediate) T4 encoding Post Indexed, w= ith > a write-back that is not being accounted for in gdb. >=20 Thanks, it is indeed, this helped me find the encoding documentation. > The write-back bit seems to be bit 8. Does it show up as 1 for your case? >=20 Yes. > It was probably an oversight, as we can that being handled in > thumb_stack_frame_destroyed_p: >=20 > else if (insn =3D=3D 0xf85d /* ldr.w , [sp], #4 */ > && (insn2 & 0x0fff) =3D=3D 0x0b04) > found_stack_adjust =3D 1; OK, so how about this: ... diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 861d50a6a3b..081e934cf86 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -14184,6 +14184,14 @@ thumb2_record_ld_word (arm_insn_decode_record *thumb2_insn_r) record_buf[1] =3D ARM_PS_REGNUM; thumb2_insn_r->reg_rec_count =3D 2; + if ((thumb2_insn_r->arm_insn & 0xfff00900) =3D=3D 0xf8500900) + { + /* Detected LDR(immediate), T4, with write-back bit set. Record Rn + update. */ + record_buf[2] =3D bits (thumb2_insn_r->arm_insn, 16, 19); + thumb2_insn_r->reg_rec_count++; + } + REG_ALLOC (thumb2_insn_r->arm_regs, thumb2_insn_r->reg_rec_count, record_buf); return ARM_RECORD_SUCCESS; ... --=20 You are receiving this mail because: You are on the CC list for the bug.=