mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Rationalise debugger stuff in the tree. Within Xen itself, remove PDB references and fold into domu_debug. When domu_debug hits a breakpoint, it pauses all vcpus of the domain and raises VIRQ_DEBUGGER (not VIRQ_PDB). The debugger in domain0 can either poll pause status or bind to VIRQ_DEBUGGER. Before debugging a breakpointed domain the debugger should issue PAUSEDOMAIN itself, or it is not guaranteed to see paused state of the domain! Outside Xen there's a new dir tools/debugger, containing gdb, pdb and a new library libxendebug (used by pdb). I also think the ptrace functions in libxc also ought to be moved out: either to libxendebug or to a new library libxenptrace. Signed-off-by: Keir Fraser <keir@xensource.com>
73 lines
1.8 KiB
Makefile
73 lines
1.8 KiB
Makefile
|
|
INSTALL = install
|
|
INSTALL_PROG = $(INSTALL) -m0755
|
|
INSTALL_DATA = $(INSTALL) -m0644
|
|
INSTALL_DIR = $(INSTALL) -d -m0755
|
|
|
|
MAJOR = 3.0
|
|
MINOR = 0
|
|
|
|
CC = gcc
|
|
|
|
XEN_ROOT = ../../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
SRCS := xendebug.c
|
|
|
|
CFLAGS += -Wall -Werror -O3 -fno-strict-aliasing
|
|
CFLAGS += $(INCLUDES) -I. -I$(XEN_ROOT)/tools/libxc
|
|
# Get gcc to generate the dependencies for us.
|
|
CFLAGS += -Wp,-MD,.$(@F).d
|
|
DEPS = .*.d
|
|
|
|
LDFLAGS += -L$(XEN_ROOT)/tools/libxc -lxc
|
|
|
|
LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
|
|
PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
|
|
|
|
LIB := libxendebug.a libxendebug.so
|
|
LIB += libxendebug.so.$(MAJOR) libxendebug.so.$(MAJOR).$(MINOR)
|
|
|
|
all: build
|
|
build:
|
|
$(MAKE) $(LIB)
|
|
|
|
install: build
|
|
[ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
|
|
[ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
|
|
$(INSTALL_PROG) libxendebug.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
|
|
$(INSTALL_DATA) libxendebug.a $(DESTDIR)/usr/$(LIBDIR)
|
|
ln -sf libxendebug.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxendebug.so.$(MAJOR)
|
|
ln -sf libxendebug.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxendebug.so
|
|
$(INSTALL_DATA) xendebug.h $(DESTDIR)/usr/include
|
|
|
|
.PHONY: TAGS clean rpm install all
|
|
|
|
TAGS:
|
|
etags -t $(SRCS) *.h
|
|
|
|
clean:
|
|
rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
|
|
|
|
rpm: build
|
|
rm -rf staging
|
|
mkdir staging
|
|
mkdir staging/i386
|
|
rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
|
|
--define "_rpmdir$$PWD/staging" -bb rpm.spec
|
|
mv staging/i386/*.rpm .
|
|
rm -rf staging
|
|
|
|
libxendebug.a: $(LIB_OBJS)
|
|
$(AR) rc $@ $^
|
|
|
|
libxendebug.so: libxendebug.so.$(MAJOR)
|
|
ln -sf $< $@
|
|
libxendebug.so.$(MAJOR): libxendebug.so.$(MAJOR).$(MINOR)
|
|
ln -sf $< $@
|
|
|
|
libxendebug.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxendebug.so.$(MAJOR) -shared -o $@ $^
|
|
|
|
-include $(DEPS)
|