From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27567 invoked by alias); 27 Nov 2013 12:47:42 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 27537 invoked by uid 48); 27 Nov 2013 12:47:41 -0000 From: "js at sig21 dot net" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/16263] New: breakpoints on BL instruction in Thumb broken Date: Wed, 27 Nov 2013 12:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: js at sig21 dot net X-Bugzilla-Status: NEW 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 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q4/txt/msg00449.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16263 Bug ID: 16263 Summary: breakpoints on BL instruction in Thumb broken Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: breakpoints Assignee: unassigned at sourceware dot org Reporter: js at sig21 dot net For the ARM target, commit 177321bd85d5a3d4ca05d320696d8af43bc0fc05 (Daniel Jacobowitz, Mon Feb 1 16:13:17 2010), which added Thumb2 breakpoint support, broke breakpoints set on the BL instruction in Thumb mode (and thus single stepping through Thumb code). arm_breakpoint_from_pc() inserts tdep->thumb2_breakpoint instead of tdep->thumb_breakpoint because the length of the BL instruction is 32bit (two 16bit instructions). The code has this: + /* If we have a separate 32-bit breakpoint instruction for Thumb-2, + check whether we are replacing a 32-bit instruction. */ + if (tdep->thumb2_breakpoint != NULL) but tdep->thumb2_breakpoint is set unconditionally in arm_linux_init_abi(). I confirmed that commenting out // tdep->thumb2_breakpoint = arm_linux_thumb2_le_breakpoint; works around the issue. It seems the assignment should be made depending on whether the target actually has Thumb2 support. -- You are receiving this mail because: You are on the CC list for the bug.