The last in-tree user of the xc_ptrace functionality was removed in
changeset: 21732:eb34666befcc
user: Ian Jackson <Ian.Jackson@eu.citrix.com>
date: Fri Jul 02 17:46:01 2010 +0100
files: [...]
description:
tools/debugger/gdb: Remove gdb
This code is not maintained, does not work properly, and no-one is
using it. Delete it, following discussion on xen-devel.
and has now been replaced with gdbsx.
We are having trouble tracking down all of the contributors to the
ptrace code in libxc (as part of the effort to relicense libxc under the
LGPL, see [0] or [1]) and if this functionality is no longer required it
would be simplest to remove it. I will follow up shortly with a patch to
disable the build by default and the code will be removed shortly unless
anyone objects. If you have an out-of-tree project which is using this
functionality (specifically the functions xc_register_event_handler()
xc_ptrace() and xc_waitdomain()) then please tell us ASAP.
Ian.
[0]
http://blog.xen.org/index.php/2010/07/26/xen-org-source-code-license-change-request/
[1] http://lists.xensource.com/archives/html/xen-devel/2010-07/msg01378.html
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Ian Campbell
2010-Aug-13 12:53 UTC
[Xen-devel] [PATCH] libxc: disable xc_ptrace on x86 Linux
# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1281703976 -3600
# Node ID 38b000b7f5e41d92d7e46c2cb637ff216ffbf596
# Parent 1f00eaccf6ec579b63db199f764b229097b3c5cf
libxc: disable xc_ptrace on x86 Linux
It has been unused since 21732:eb34666befcc.
Removing the include of sys/ptrace.h and threaddb.h exposed a few
places which were using time(2) or gettimeofday(2) without including
time.h or sys/time.h respectively and were relying on an include.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/console/daemon/io.c Fri Aug 13 13:52:56 2010 +0100
@@ -34,7 +34,7 @@
#include <termios.h>
#include <stdarg.h>
#include <sys/mman.h>
-#include <sys/time.h>
+#include <time.h>
#include <assert.h>
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <util.h>
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/libxc/Makefile
--- a/tools/libxc/Makefile Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/libxc/Makefile Fri Aug 13 13:52:56 2010 +0100
@@ -32,7 +32,7 @@ CTRL_SRCS-y += xtl_logger_stdio.c
CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
-CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
+#CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
CTRL_SRCS-$(CONFIG_MiniOS) += xc_minios.c
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/libxc/xc_ptrace.h
--- a/tools/libxc/xc_ptrace.h Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/libxc/xc_ptrace.h Fri Aug 13 13:52:56 2010 +0100
@@ -1,3 +1,5 @@
+#error xc_ptrace is disabled.
+
#ifndef XC_PTRACE_
#define XC_PTRACE_
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/libxc/xenctrl.h Fri Aug 13 13:52:56 2010 +0100
@@ -150,7 +150,7 @@ typedef struct xc_core_header {
#define XC_CORE_MAGIC 0xF00FEBED
#define XC_CORE_MAGIC_HVM 0xF00FEBEE
-#ifdef __linux__
+#if 0 /*def __linux__*/
#include <sys/ptrace.h>
#include <thread_db.h>
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/libxl/libxl.c Fri Aug 13 13:52:56 2010 +0100
@@ -25,6 +25,7 @@
#include <sys/select.h>
#include <sys/mman.h>
#include <sys/wait.h>
+#include <sys/time.h>
#include <signal.h>
#include <unistd.h> /* for write, unlink and close */
#include <stdint.h>
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/libxl/xl.c
--- a/tools/libxl/xl.c Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/libxl/xl.c Fri Aug 13 13:52:56 2010 +0100
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/time.h> /* for time */
+#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c Fri Aug 13 13:52:56 2010 +0100
@@ -21,10 +21,11 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/time.h> /* for time */
+#include <time.h>
#include <getopt.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/socket.h>
diff -r 1f00eaccf6ec -r 38b000b7f5e4
tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
--- a/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c Fri Aug 13 13:22:21
2010 +0100
+++ b/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c Fri Aug 13 13:52:56
2010 +0100
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
+#include <sys/time.h>
#include <signal.h>
#include <sys/stat.h>
#include <unistd.h>
diff -r 1f00eaccf6ec -r 38b000b7f5e4 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c Fri Aug 13 13:22:21 2010 +0100
+++ b/tools/xenpaging/xenpaging.c Fri Aug 13 13:52:56 2010 +0100
@@ -23,6 +23,7 @@
#include <inttypes.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <time.h>
#include <xc_private.h>
#include <xen/mem_event.h>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel