Skip to content

Commit 8f26af2

Browse files
anthony-kolesovvineetgarc
authored andcommitted
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 <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 11263d3 commit 8f26af2

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

arch/arc/include/asm/kgdb.h

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* register API yet */
2020
#undef DBG_MAX_REG_NUM
2121

22-
#define GDB_MAX_REGS 39
22+
#define GDB_MAX_REGS 87
2323

2424
#define BREAK_INSTR_SIZE 2
2525
#define CACHE_FLUSH_IS_SAFE 1
@@ -33,23 +33,27 @@ static inline void arch_kgdb_breakpoint(void)
3333

3434
extern void kgdb_trap(struct pt_regs *regs);
3535

36-
enum 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. */
40+
enum arc_linux_regnums {
3741
_R0 = 0,
3842
_R1, _R2, _R3, _R4, _R5, _R6, _R7, _R8, _R9, _R10, _R11, _R12, _R13,
3943
_R14, _R15, _R16, _R17, _R18, _R19, _R20, _R21, _R22, _R23, _R24,
4044
_R25, _R26,
41-
_BTA = 27,
42-
_LP_START = 28,
43-
_LP_END = 29,
44-
_LP_COUNT = 30,
45-
_STATUS32 = 31,
46-
_BLINK = 32,
47-
_FP = 33,
48-
__SP = 34,
49-
_EFA = 35,
50-
_RET = 36,
51-
_ORIG_R8 = 37,
52-
_STOP_PC = 38
45+
_FP = 27,
46+
__SP = 28,
47+
_R30 = 30,
48+
_BLINK = 31,
49+
_LP_COUNT = 60,
50+
_STOP_PC = 64,
51+
_RET = 64,
52+
_LP_START = 65,
53+
_LP_END = 66,
54+
_STATUS32 = 67,
55+
_ECR = 76,
56+
_BTA = 82,
5357
};
5458

5559
#else

0 commit comments

Comments
 (0)