[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] gdbstub: Fix the build and make a few cleanups.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1250149239 -3600
# Node ID da620c4549166a436424fecf922d14f35d2522b7
# Parent  8a9f81672c76c93891a2af0bbc2659c83493a440
gdbstub: Fix the build and make a few cleanups.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/gdbstub.c      |   15 +++++++--------
 xen/include/xen/gdbstub.h |    6 ------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff -r 8a9f81672c76 -r da620c454916 xen/common/gdbstub.c
--- a/xen/common/gdbstub.c      Wed Aug 12 14:27:52 2009 +0100
+++ b/xen/common/gdbstub.c      Thu Aug 13 08:40:39 2009 +0100
@@ -71,15 +71,14 @@ static void gdbstub_console_puts(const c
 static void gdbstub_console_puts(const char *str);
 
 /* value <-> char (de)serialzers */
-char
+static char
 hex2char(unsigned long x)
 {
     const char array[] = "0123456789abcdef";
-
     return array[x & 15];
 }
 
-int
+static unsigned int
 char2hex(unsigned char c)
 {
     if ( (c >= '0') && (c <= '9') )
@@ -93,13 +92,13 @@ char2hex(unsigned char c)
     return -1;
 }
 
-char
+static unsigned char
 str2hex(const char *str)
 {
     return (char2hex(str[0]) << 4) | char2hex(str[1]);
 }
 
-unsigned long
+static unsigned long
 str2ulong(const char *str, unsigned long bytes)
 {
     unsigned long x = 0;
@@ -116,7 +115,7 @@ str2ulong(const char *str, unsigned long
     return x;
 }
 
-unsigned long
+static unsigned long
 str_to_native_ulong(const char *str)
 {
     unsigned long x = 0, i = 0;
@@ -125,9 +124,9 @@ str_to_native_ulong(const char *str)
     {
 #ifdef __BIG_ENDIAN
         x <<= 8;
-        x += str2hex(*str);
+        x += str2hex(str);
 #elif defined(__LITTLE_ENDIAN)
-        x += (unsigned long)str2hex(*str) << (i*8);
+        x += (unsigned long)str2hex(str) << (i*8);
 #else
 # error unknown endian
 #endif
diff -r 8a9f81672c76 -r da620c454916 xen/include/xen/gdbstub.h
--- a/xen/include/xen/gdbstub.h Wed Aug 12 14:27:52 2009 +0100
+++ b/xen/include/xen/gdbstub.h Thu Aug 13 08:40:39 2009 +0100
@@ -25,12 +25,6 @@
 #include <asm/page.h>
 
 #ifdef CRASH_DEBUG
-
-/* value <-> char (de)serialzers for arch specific gdb backends */
-char hex2char(unsigned long x);
-int char2hex(unsigned char c);
-char str2hex(const char *str);
-unsigned long str2ulong(const char *str, unsigned long bytes);
 
 struct gdb_context {
     int                 serhnd;           /* handle on our serial line */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.