Skip to content

Kgdb doesn't work with THUMB2 kernel #133

@fhgwright

Description

@fhgwright

When the kernel is built with KGDB support and in the default THUMB2 mode, then attempting to enter kgdb (via SysRq) results in an error of the form:

  SysRq : DEBUG
  Internal error: Oops - undefined instruction: 0 [#1] SMP THUMB2

This is due to missing support for 16-bit breakpoint instructions.

I found an old unmerged patch on a mailing list that corrects this. Although it no longer applied verbatim, I updated it for the 3.8 kernel, and it now works. It also appears to apply cleanly to 4.4 and 4.9, though I haven't actually tested it with those kernels.

The fix really belongs in mainline, but getting it into this repo is better than nothing.

I submitted a pull request for the 3.8 version of the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions