public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/16263] New: breakpoints on BL instruction in Thumb broken
@ 2013-11-27 12:47 js at sig21 dot net
  0 siblings, 0 replies; only message in thread
From: js at sig21 dot net @ 2013-11-27 12:47 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-27 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 12:47 [Bug breakpoints/16263] New: breakpoints on BL instruction in Thumb broken js at sig21 dot net

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).