Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36277
b: refs/heads/master
c: 56e8d7b
h: refs/heads/master
i:
  36275: 84d18a3
v: v3
  • Loading branch information
Paul Mundt committed Sep 27, 2006
1 parent cea14d9 commit aae02fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2549b3222f588c188674aed0b9a0ef78bbba5c6c
refs/heads/master: 56e8d7b5786dc2f7d1f701500f8914fd2c52b111
33 changes: 5 additions & 28 deletions trunk/arch/sh/kernel/kgdb_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,17 @@
#include <linux/linkage.h>
#include <linux/init.h>

#ifdef CONFIG_SH_KGDB_CONSOLE
#include <linux/console.h>
#endif

#include <asm/system.h>
#include <asm/current.h>
#include <asm/signal.h>
#include <asm/pgtable.h>
#include <asm/ptrace.h>
#include <asm/kgdb.h>

#ifdef CONFIG_SH_KGDB_CONSOLE
#include <linux/console.h>
#endif
#include <asm/io.h>

/* Function pointers for linkage */
kgdb_debug_hook_t *kgdb_debug_hook;
Expand Down Expand Up @@ -240,7 +241,6 @@ static jmp_buf rem_com_env;
/* Misc static */
static int stepped_address;
static short stepped_opcode;
static const char hexchars[] = "0123456789abcdef";
static char in_buffer[BUFMAX];
static char out_buffer[OUTBUFMAX];

Expand All @@ -253,29 +253,6 @@ typedef unsigned char threadref[8];
#define BUF_THREAD_ID_SIZE 16
#endif

/* Return addr as a real volatile address */
static inline unsigned int ctrl_inl(const unsigned long addr)
{
return *(volatile unsigned long *) addr;
}

/* Correctly set *addr using volatile */
static inline void ctrl_outl(const unsigned int b, unsigned long addr)
{
*(volatile unsigned long *) addr = b;
}

/* Get high hex bits */
static char highhex(const int x)
{
return hexchars[(x >> 4) & 0xf];
}

/* Get low hex bits */
static char lowhex(const int x)
{
return hexchars[x & 0xf];
}

/* Convert ch to hex */
static int hex(const char ch)
Expand Down
15 changes: 15 additions & 0 deletions trunk/include/asm-sh/kgdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,19 @@ extern int setjmp(jmp_buf __jmpb);
#define KGDB_ASSERT(condition, message)
#endif

/* Taken from sh-stub.c of GDB 4.18 */
static const char hexchars[] = "0123456789abcdef";

/* Get high hex bits */
static inline char highhex(const int x)
{
return hexchars[(x >> 4) & 0xf];
}

/* Get low hex bits */
static inline char lowhex(const int x)
{
return hexchars[x & 0xf];
}

#endif

0 comments on commit aae02fc

Please sign in to comment.