aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2014-09-25 05:23:24 -0400
committerVineet Gupta <vgupta@synopsys.com>2014-10-13 05:16:20 -0400
commitebc0c74e76cec9c4dd860eb0ca1c0b39dc63c482 (patch)
tree13a7cc9c4d3c53a4a835ba9b9f6f00abd804309c
parentcdd4552686b5225047ce24b8449380e02c1481e1 (diff)
ARC: Update order of registers in KGDB to match GDB 7.5
Order of registers has changed in GDB moving from 6.8 to 7.5. This patch updates KGDB to work properly with GDB 7.5, though makes it incompatible with 6.8. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: <stable@vger.kernel.org> #3.10, 3.12, 3.14, 3.16
-rw-r--r--arch/arc/include/asm/kgdb.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/arch/arc/include/asm/kgdb.h b/arch/arc/include/asm/kgdb.h
index b65fca7ffeb5..fea931634136 100644
--- a/arch/arc/include/asm/kgdb.h
+++ b/arch/arc/include/asm/kgdb.h
@@ -19,7 +19,7 @@
19 * register API yet */ 19 * register API yet */
20#undef DBG_MAX_REG_NUM 20#undef DBG_MAX_REG_NUM
21 21
22#define GDB_MAX_REGS 39 22#define GDB_MAX_REGS 87
23 23
24#define BREAK_INSTR_SIZE 2 24#define BREAK_INSTR_SIZE 2
25#define CACHE_FLUSH_IS_SAFE 1 25#define CACHE_FLUSH_IS_SAFE 1
@@ -33,23 +33,27 @@ static inline void arch_kgdb_breakpoint(void)
33 33
34extern void kgdb_trap(struct pt_regs *regs); 34extern void kgdb_trap(struct pt_regs *regs);
35 35
36enum arc700_linux_regnums { 36/* This is the numbering of registers according to the GDB. See GDB's
37 * arc-tdep.h for details.
38 *
39 * Registers are ordered for GDB 7.5. It is incompatible with GDB 6.8. */
40enum arc_linux_regnums {
37 _R0 = 0, 41 _R0 = 0,
38 _R1, _R2, _R3, _R4, _R5, _R6, _R7, _R8, _R9, _R10, _R11, _R12, _R13, 42 _R1, _R2, _R3, _R4, _R5, _R6, _R7, _R8, _R9, _R10, _R11, _R12, _R13,
39 _R14, _R15, _R16, _R17, _R18, _R19, _R20, _R21, _R22, _R23, _R24, 43 _R14, _R15, _R16, _R17, _R18, _R19, _R20, _R21, _R22, _R23, _R24,
40 _R25, _R26, 44 _R25, _R26,
41 _BTA = 27, 45 _FP = 27,
42 _LP_START = 28, 46 __SP = 28,
43 _LP_END = 29, 47 _R30 = 30,
44 _LP_COUNT = 30, 48 _BLINK = 31,
45 _STATUS32 = 31, 49 _LP_COUNT = 60,
46 _BLINK = 32, 50 _STOP_PC = 64,
47 _FP = 33, 51 _RET = 64,
48 __SP = 34, 52 _LP_START = 65,
49 _EFA = 35, 53 _LP_END = 66,
50 _RET = 36, 54 _STATUS32 = 67,
51 _ORIG_R8 = 37, 55 _ECR = 76,
52 _STOP_PC = 38 56 _BTA = 82,
53}; 57};
54 58
55#else 59#else