kgdb,arm: remove unused GDB_BREAKINST definition

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net
kgdb,arm: use macro in arch_kgdb_breakpoint

Replace hardcoded hexadecimal breakpoint value in arch_kgdb_breakpoint() by the
KGDB_COMPILED_BREAK macro, stringified.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net
kgdb,arm: use macro in arch_kgdb_ops

Use byteorder macros to deal with endianness while declaring breakpoint
instruction in arch_kgdb_ops. Use the KGDB_BREAKINST macro instead of
hardcoding the breakpoint instruction in hexadecimal.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net
kgdb,arm: compute mask from breakpoint size macro

Compute breakpoint instructions masks from the BREAK_INSTR_SIZE macro instead
of hardcoding the mask hex value.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net
kgdb,arm: use macro for pc increment

Advance pc of BREAK_INSTR_SIZE in case of compiled breakpoint instead of
hardcoded 4 bytes value.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net
Debug! undef instr

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
kgdb,arm: add support for thumb2 kernel (first part)

Add 16b breakpoint instructions for thumb2 kernel. This repairs the following
error:

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

...and allows to enter kdb properly under thumb2 kernel for example.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net

Changes in v2:
- Move mask in separate patch.

TODO:
- 32b breaks, too
- "Fold" as many of the if thumb2/else in "preparation" patches