Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96965
b: refs/heads/master
c: bfd3c7a
h: refs/heads/master
i:
  96963: e273d91
v: v3
  • Loading branch information
Harvey Harrison authored and Paul Mundt committed May 16, 2008
1 parent 31f6b83 commit 12265e7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 25 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: 65b83427c6e5814556855c42bf9b4edeafd66623
refs/heads/master: bfd3c7a728fbe642f79f99482a6c01158c675545
11 changes: 5 additions & 6 deletions trunk/arch/sh/kernel/kgdb_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,7 @@ static char *mem_to_hex(const char *mem, char *buf, const int count)
}
for (i = 0; i < count; i++) {
ch = *mem++;
*buf++ = highhex(ch);
*buf++ = lowhex(ch);
buf = pack_hex_byte(buf, ch);
}
*buf = 0;
return (buf);
Expand Down Expand Up @@ -427,8 +426,8 @@ static void put_packet(char *buffer)

/* '#' Separator, put high and low components of checksum */
put_debug_char('#');
put_debug_char(highhex(checksum));
put_debug_char(lowhex(checksum));
put_debug_char(hex_asc_hi(checksum));
put_debug_char(hex_asc_lo(checksum));
}
while ((get_debug_char()) != '+'); /* While no ack */
}
Expand Down Expand Up @@ -650,8 +649,8 @@ static void undo_single_step(void)
static void send_signal_msg(const int signum)
{
out_buffer[0] = 'S';
out_buffer[1] = highhex(signum);
out_buffer[2] = lowhex(signum);
out_buffer[1] = hex_asc_hi(signum);
out_buffer[2] = hex_asc_lo(signum);
out_buffer[3] = 0;
put_packet(out_buffer);
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ static void put_string(struct sci_port *sci_port, const char *buffer, int count)
int h, l;

c = *p++;
h = highhex(c);
l = lowhex(c);
h = hex_asc_hi(c);
l = hex_asc_lo(c);
put_char(port, h);
put_char(port, l);
checksum += h + l;
}
put_char(port, '#');
put_char(port, highhex(checksum));
put_char(port, lowhex(checksum));
put_char(port, hex_asc_hi(checksum));
put_char(port, hex_asc_lo(checksum));
} while (get_char(port) != '+');
} else
#endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */
Expand Down
14 changes: 0 additions & 14 deletions trunk/include/asm-sh/kgdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,4 @@ extern int setjmp(jmp_buf __jmpb);
/* Forced breakpoint */
#define breakpoint() __asm__ __volatile__("trapa #0x3c")

/* 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 12265e7

Please sign in to comment.