ia64/xen-unstable

changeset 9172:085f0ad9018a

Fix build with some gcc versions.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Mar 06 18:05:09 2006 +0100 (2006-03-06)
parents e8fb817c4c15
children e9daf5307296
files tools/libxc/xc_ptrace.c tools/libxc/xc_ptrace.h
line diff
     1.1 --- a/tools/libxc/xc_ptrace.c	Mon Mar 06 15:39:48 2006 +0100
     1.2 +++ b/tools/libxc/xc_ptrace.c	Mon Mar 06 18:05:09 2006 +0100
     1.3 @@ -1,6 +1,5 @@
     1.4  #define XC_PTRACE_PRIVATE
     1.5  
     1.6 -
     1.7  #include <sys/ptrace.h>
     1.8  #include <sys/wait.h>
     1.9  #include <time.h>
    1.10 @@ -9,6 +8,36 @@
    1.11  #include "xg_private.h"
    1.12  #include "xc_ptrace.h"
    1.13  
    1.14 +#ifdef DEBUG
    1.15 +const char const * ptrace_names[] = {
    1.16 +    "PTRACE_TRACEME",
    1.17 +    "PTRACE_PEEKTEXT",
    1.18 +    "PTRACE_PEEKDATA",
    1.19 +    "PTRACE_PEEKUSER",
    1.20 +    "PTRACE_POKETEXT",
    1.21 +    "PTRACE_POKEDATA",
    1.22 +    "PTRACE_POKEUSER",
    1.23 +    "PTRACE_CONT",
    1.24 +    "PTRACE_KILL",
    1.25 +    "PTRACE_SINGLESTEP",
    1.26 +    "PTRACE_INVALID",
    1.27 +    "PTRACE_INVALID",
    1.28 +    "PTRACE_GETREGS",
    1.29 +    "PTRACE_SETREGS",
    1.30 +    "PTRACE_GETFPREGS",
    1.31 +    "PTRACE_SETFPREGS",
    1.32 +    "PTRACE_ATTACH",
    1.33 +    "PTRACE_DETACH",
    1.34 +    "PTRACE_GETFPXREGS",
    1.35 +    "PTRACE_SETFPXREGS",
    1.36 +    "PTRACE_INVALID",
    1.37 +    "PTRACE_INVALID",
    1.38 +    "PTRACE_INVALID",
    1.39 +    "PTRACE_INVALID",
    1.40 +    "PTRACE_SYSCALL",
    1.41 +};
    1.42 +#endif
    1.43 +
    1.44  /* XXX application state */
    1.45  static long                     nr_pages = 0;
    1.46  static unsigned long           *page_array = NULL;
     2.1 --- a/tools/libxc/xc_ptrace.h	Mon Mar 06 15:39:48 2006 +0100
     2.2 +++ b/tools/libxc/xc_ptrace.h	Mon Mar 06 18:05:09 2006 +0100
     2.3 @@ -10,8 +10,6 @@
     2.4  #define PDRSHIFT        22
     2.5  #define PSL_T  0x00000100 /* trace enable bit */
     2.6  
     2.7 -extern const char const * ptrace_names[];
     2.8 -
     2.9  struct gdb_regs {
    2.10      long ebx; /* 0 */
    2.11      long ecx; /* 4 */