From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9ED793858D20; Tue, 13 Feb 2024 08:10:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9ED793858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707811848; bh=C3RctapEg3YwmhrWPplCPTNtFUDAbGaYtxqDh90hqZ4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q42dVpphSle61dsi9V2MQpgOgdAxTZj8eiLEInr3TxyhUh91qWYeurqeGPd/KSYFB 3LOKG8DUXMqx9h/59ryKJ1OBtBfxTvsuyuSfHFBAA3g1iK8dABpuaDaDaO7ZUCs3uv l95z+uXAETsnJmC1NIUjL3/Yuus7XHWLqbkweUFU= From: "cvs-commit 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: Tue, 13 Feb 2024 08:10:47 +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: cvs-commit 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 #13 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D7e4208a3f5d6= 0f43b4a8f02e583fa950b599cd00 commit 7e4208a3f5d60f43b4a8f02e583fa950b599cd00 Author: Tom de Vries Date: Tue Feb 13 09:10:54 2024 +0100 [gdb/tdep] Fix reverse execution of LDR(immediate) T4 When running test-case gdb.reverse/func-map-to-same-line.exp on arm-lin= ux with target board unix/-mthumb, we run into: ... (gdb) reverse-step func2 () at func-map-to-same-line.c:26 26 { (gdb) FAIL: gdb.reverse/func-map-to-same-line.exp: \ column_info_flag=3Dcolumn-info: step-test: reverse-step into func2 ... The FAIL is caused by incorrect recording of this insn: ... 4f6: f85d 7b04 ldr.w r7, [sp], #4 ... The insn updates the sp, but we don't record this: ... $ gdb -q -batch func-map-to-same-line \ -ex "b *func2+8" \ -ex run \ -ex record \ -ex "set debug record 2" \ -ex stepi Breakpoint 1 at 0x4f6: file func-map-to-same-line.c, line 27. Breakpoint 1, 0xaaaaa4f6 in func2 () at func-map-to-same-line.c:27 27 } /* END FUNC2 */ Process record: arm_process_record addr =3D 0xaaaaa4f6 Process record: add register num =3D 15 to record list. Process record: record_full_arch_list_add 0xabc6c460. Process record: add register num =3D 7 to record list. Process record: record_full_arch_list_add 0xabc3b868. Process record: add register num =3D 25 to record list. ... [ Note that sp is r13, and we see here only r15 (pc), r7, and r25 (ps).= ] The problem is that the specific insn, an LDR(immediate) T4, is not han= dled in thumb2_record_ld_word. Fix this by detecting the insn in thumb2_record_ld_word, and recording = the updated base register. Tested on arm-linux. Reported-By: Thiago Jung Bauermann Approved-By: Luis Machado PR tdep/31278 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31278 --=20 You are receiving this mail because: You are on the CC list for the bug.=