diff options
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/kgdb.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h index 1653ffb75fbe..7b26f53fe343 100644 --- a/include/asm-sh/kgdb.h +++ b/include/asm-sh/kgdb.h | |||
@@ -128,4 +128,19 @@ extern int setjmp(jmp_buf __jmpb); | |||
128 | #define KGDB_ASSERT(condition, message) | 128 | #define KGDB_ASSERT(condition, message) |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | /* Taken from sh-stub.c of GDB 4.18 */ | ||
132 | static const char hexchars[] = "0123456789abcdef"; | ||
133 | |||
134 | /* Get high hex bits */ | ||
135 | static inline char highhex(const int x) | ||
136 | { | ||
137 | return hexchars[(x >> 4) & 0xf]; | ||
138 | } | ||
139 | |||
140 | /* Get low hex bits */ | ||
141 | static inline char lowhex(const int x) | ||
142 | { | ||
143 | return hexchars[x & 0xf]; | ||
144 | } | ||
145 | |||
131 | #endif | 146 | #endif |