aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/kgdb.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 03:24:55 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 03:24:55 -0400
commit56e8d7b5786dc2f7d1f701500f8914fd2c52b111 (patch)
tree68654c185bdf5badbddd9698dd14bb0166b9270e /include/asm-sh/kgdb.h
parent2549b3222f588c188674aed0b9a0ef78bbba5c6c (diff)
sh: kgdb stub cleanups.
Some kgdb cleanup. Move hexchars/highhex/lowhex to the header, so it can be reused by sh-sci. Also drop silly ctrl_inl/outl() overloading being done by the kgdb stub. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/kgdb.h')
-rw-r--r--include/asm-sh/kgdb.h15
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 */
132static const char hexchars[] = "0123456789abcdef";
133
134/* Get high hex bits */
135static inline char highhex(const int x)
136{
137 return hexchars[(x >> 4) & 0xf];
138}
139
140/* Get low hex bits */
141static inline char lowhex(const int x)
142{
143 return hexchars[x & 0xf];
144}
145
131#endif 146#endif