From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0B0483858C62; Tue, 26 Jul 2022 13:36:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B0483858C62 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/29409] [gdb, tdep/aarch64] FAIL: gdb.opt/inline-small-func.exp: info breakpoints Date: Tue, 26 Jul 2022 13:36:29 +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: 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: 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: Tue, 26 Jul 2022 13:36:30 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29409 --- Comment #9 from Tom de Vries --- (In reply to Tom de Vries from comment #7) > Interestingly, that alone was not enough, and I also needed this bit: > ... > @@ -302,6 +303,8 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, > regs[i] =3D pv_register (i, 0); > pv_area stack (AARCH64_SP_REGNUM, gdbarch_addr_bit (gdbarch)); >=20=20 > + CORE_ADDR orig_start =3D start; > + > for (; start < limit; start +=3D 4) > { > uint32_t insn; > @@ -544,7 +547,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, > } >=20=20 > if (cache =3D=3D NULL) > - return start; > + return seen_stack_set ? start : orig_start; >=20=20 > if (pv_is_register (regs[AARCH64_FP_REGNUM], AARCH64_SP_REGNUM)) > { > @@ -583,7 +586,7 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, > cache->saved_regs[i + regnum + AARCH64_D0_REGNUM].set_addr (offse= t); > } >=20=20 > - return start; > + return seen_stack_set ? start : orig_start; > } >=20=20 > static CORE_ADDR > ... > which is roughly equivalent with this bit for amd64: > ... > if (cache.frameless_p) > return start_pc; > ... Hmm, this seems to break (in test-case gdb.base/call-rt-st.exp) returning 0x4008e0 for: ... 00000000004008dc :=20 4008dc: d10043ff sub sp, sp, #0x10 4008e0: b9000fff str wzr, [sp, #12] 4008e4: 14000004 b 4008f4 ... and this fixes it: ... @@ -336,7 +339,8 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch, }=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /* Did we move SP to FP? */=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 - if (rn =3D=3D AARCH64_SP_REGNUM && rd =3D=3D AARCH64_FP_REGNUM)= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 + if (rn =3D=3D AARCH64_SP_REGNUM=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 + && (rd =3D=3D AARCH64_FP_REGNUM || rd =3D=3D AARCH64_SP_REGNU= M))=20=20=20=20=20=20=20=20=20=20 seen_stack_set =3D true;=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 }=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 else if (inst.opcode->iclass =3D=3D pcreladdr=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ... but I'm not sure about this. Maybe !frameless_p and seen_stack_set are different concepts and need to be tracked separately? --=20 You are receiving this mail because: You are on the CC list for the bug.=