TESTPG02_TARGET = dwarftest
TESTPG_DIR = testpg
+TESTDATA_DIR = testdata
+
+TOOL_COREOUT_TARGET = coreout
+TOOLPG_DIR = toolpg
+
TEST_TARGET = drdrv1
TEST_OBJS = drdrv1.o
TEST_LIBS = $(LIBDRD64_TARGET) $(LIBBROWNIE_TARGET) $(LIBGOBLIN)
$(TEST_OBJS): drdrv1.c
gcc -c -o $(TEST_OBJS) $(FLAGS_DEBUG) drdrv1.c
+setup_testdata:
+ mkdir $(TESTDATA_DIR)
+ cp drd64_skel.c $(TESTDATA_DIR)/drd64_srctext.c
+ cp drd64_skel.h $(TESTDATA_DIR)/drd64_srctext.h
+ cp $(LIBINTEL64ASM_DIR)/x8664db.csv $(TESTDATA_DIR)/x8664db.csv
+
clean:
rm -f *.o
--- /dev/null
+##DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+#
+# D r . D e a m o n 6 4
+# for INTEL64(R), AMD64(R)
+#
+# Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+##DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+
+## File Info -----------------------------------------------------------
+# File: Makefile
+# Function:
+# Comment:
+##----------------------------------------------------------------------
+
+# Section 1 : Setting Build Command ####################################
+MAKE = make
+
+TESTDATA_FILES = drd64_skel.c drd64_skel.h
+LIBINTEL64ASM_DIR = libintel64asm
+
+TESTPG01_DIR = ../testpg/testpg01
+TESTPG01_TARGET = count
+
+TESTPG02_DIR = ../testpg/testpg02
+TESTPG02_TARGET = dwarftest
+TESTPG02_OBJ = dwarftest dwarfnodbg dwarfnodbg.dbg libsotest.so libsonodbg.so libsonodbg.dbg
+
+all: setup coreout.core $(TESTPG01_TARGET) $(TESTPG02_TARGET)
+
+setup:
+ cp ../drd64_skel.c .
+ cp ../drd64_skel.h .
+ cp ../$(LIBINTEL64ASM_DIR)/x8664db.csv .
+
+coreout.core:
+ $(MAKE) -C ../toolpg/coreout coreout clean
+ -./coreout
+
+$(TESTPG01_TARGET):
+ $(MAKE) -C $(TESTPG01_DIR) all clean
+
+$(TESTPG02_TARGET):
+ $(MAKE) -C $(TESTPG02_DIR) all clean
+
+clean:
+ rm -f *.c
+ rm -f *.h
+ rm -f *.csv
+ rm -f *.core
+ rm -f coreout
+ rm -f $(TESTPG01_TARGET)
+ rm -f $(TESTPG02_OBJ)
+
# Section 1 : Setting Build Command ####################################
MAKE = make
-CC = gcc
+CC = cc
FLAGS_DEBUG = -g
$(TESTPG01_TARGET): count.c
$(CC) -o $(TESTPG01_TARGET) $(FLAGS_DEBUG) count.c
- cp $(TESTPG01_TARGET) ../..
+ cp $(TESTPG01_TARGET) ../../testdata
clean:
rm -f *.o
$(TESTPG02_SOLIB_FULL): libsotest.c
$(CC) -o $(TESTPG02_SOLIB_FULL) -shared -fPIC $(FLAGS_DEBUG) libsotest.c
- cp $(TESTPG02_SOLIB_FULL) ../..
+ cp $(TESTPG02_SOLIB_FULL) ../../testdata
$(TESTPG02_SOLIB_NODBG): $(TESTPG02_SOLIB_FULL)
cp $(TESTPG02_SOLIB_FULL) $(TESTPG02_SOLIB_NODBG)
objcopy --only-keep-debug $(TESTPG02_SOLIB_NODBG) $(TESTPG02_SOLIB_DBGFILE)
objcopy --strip-debug $(TESTPG02_SOLIB_NODBG)
objcopy --add-gnu-debuglink=$(TESTPG02_SOLIB_DBGFILE) $(TESTPG02_SOLIB_NODBG)
- cp $(TESTPG02_SOLIB_NODBG) ../..
- cp $(TESTPG02_SOLIB_DBGFILE) ../..
+ cp $(TESTPG02_SOLIB_NODBG) ../../testdata
+ cp $(TESTPG02_SOLIB_DBGFILE) ../../testdata
$(TESTPG02_TARGET_FULL): dwarftest.c datatype.c ctrltest.c calcfloat.c dwarftest.h $(TESTPG02_SOLIB_FULL)
$(CC) -o ctrltest.o $(FLAGS_DEBUG) -c ctrltest.c
$(CC) -o calcfloat.o $(FLAGS_DEBUG) -c calcfloat.c
$(CC) -o $(TESTPG02_TARGET_FULL) $(FLAGS_DEBUG) $(TESTPG02_OBJ) -I. $(FLAGS_LINKER) -lsotest
- cp $(TESTPG02_TARGET_FULL) ../..
+ cp $(TESTPG02_TARGET_FULL) ../../testdata
$(TESTPG02_TARGET_NODBG): $(TESTPG02_OBJ) $(TESTPG02_SOLIB_NODBG)
$(CC) -o $(TESTPG02_TARGET_NODBG) $(FLAGS_DEBUG) $(TESTPG02_OBJ) -I. $(FLAGS_LINKER) -lsonodbg
objcopy --only-keep-debug $(TESTPG02_TARGET_NODBG) $(TESTPG02_DBGFILE)
objcopy --strip-debug $(TESTPG02_TARGET_NODBG)
objcopy --add-gnu-debuglink=$(TESTPG02_DBGFILE) $(TESTPG02_TARGET_NODBG)
- cp $(TESTPG02_DBGFILE) ../..
- cp $(TESTPG02_TARGET_NODBG) ../..
+ cp $(TESTPG02_DBGFILE) ../../testdata
+ cp $(TESTPG02_TARGET_NODBG) ../../testdata
clean:
rm -f *.o
--- /dev/null
+##DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+#
+# D r . D e a m o n 6 4
+# for INTEL64(R), AMD64(R)
+#
+# Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+##DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+
+## File Info -----------------------------------------------------------
+# File: Makefile
+# Function:
+# Comment:
+##----------------------------------------------------------------------
+
+# Section 1 : Setting Build Command ####################################
+MAKE = make
+
+#
+#
+
+COREOUT_DIR = coreout
+COREOUT_TARGET = coreout
+
+all: $(COREOUT_TARGET)
+
+$(COREOUT_TARGET):
+ $(MAKE) -C $(COREOUT_DIR) $(COREOUT_TARGET)
+
+clean:
+ $(MAKE) -C $(COREOUT_DIR) clean
--- /dev/null
+##DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+#
+# D r . D e a m o n 6 4
+# for INTEL64(R), AMD64(R)
+#
+# Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+##DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+
+## File Info -----------------------------------------------------------
+# File: Makefile
+# Function:
+# Comment:
+##----------------------------------------------------------------------
+
+# Section 1 : Setting Build Command ####################################
+MAKE = make
+CC = cc
+
+FLAGS_DEBUG = -g
+
+#
+#
+
+COREOUT_TARGET = coreout
+
+all: $(COREOUT_TARGET)
+
+$(COREOUT_TARGET): coreout.c
+ $(CC) -o $(COREOUT_TARGET) $(FLAGS_DEBUG) coreout.c
+ cp $(COREOUT_TARGET) ../../testdata
+
+clean:
+ rm -f *.o
+ rm -f *.core
+ rm -f coreout
+
--- /dev/null
+
+int main( int argc, char *argv[] ) {
+ void (* corefunc)(void);
+
+ corefunc = 0x00;
+
+ corefunc();
+
+ return 0x00;
+}
+