explicit aspect activation

ag++ is now called with a list of currently active aspect headers
(ag++ -a aspect1.ah -a aspect2.ah ...).  This resolves several problems at
once:
 -  Build directories may be positioned arbitrarily now, they need not be
    a subdirectory of the project anymore.
 -  Multiple build directories can coexist within the project tree.  Before
    this commit, the generated instantiate-*.ah aspect headers disturbed
    neighboring build trees.
 -  Due to this, the regression test should be runnable much more easily
    now.
 -  The build time was reduced by an average of about 10%.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1753 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-10-17 15:22:23 +00:00
parent 773ad1367d
commit a29ad39f5e
47 changed files with 131 additions and 201 deletions

View File

@ -1,13 +1,9 @@
#ifndef __BOCHS_LISTENER_AH__
#define __BOCHS_LISTENER_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_BREAKPOINTS)
#include <cassert>
#include "bochs.h"
#include "BochsListener.hpp"
/*
@ -51,5 +47,4 @@ aspect BochsListener {
};
};
#endif // BUILD_BOCHS && CONFIG_EVENT_BREAKPOINTS
#endif // __BOCHS_LISTENER_AH__

View File

@ -1,11 +1,6 @@
#ifndef __BOCHS_NO_ABORT_AH__
#define __BOCHS_NO_ABORT_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_BOCHS_NO_ABORT)
#include "bochs.h"
aspect BochsNoAbort {
@ -37,5 +32,4 @@ aspect BochsNoAbort {
}
};
#endif // CONFIG_BOCHS_NO_ABORT
#endif // __BOCHS_NO_ABORT_AH__

View File

@ -1,11 +1,6 @@
#ifndef __BOCHS_NON_VERBOSE_AH__
#define __BOCHS_NON_VERBOSE_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_BOCHS_NON_VERBOSE)
#include "bochs.h"
/*
@ -57,5 +52,4 @@ aspect BochsNonVerbose {
: around () { }
};
#endif // CONFIG_BOCHS_NON_VERBOSE
#endif // __BOCHS_NON_VERBOSE_AH__

View File

@ -1,11 +1,6 @@
#ifndef __BREAKPOINTS_AH__
#define __BREAKPOINTS_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_BREAKPOINTS)
#include "bochs.h"
#include "cpu/cpu.h"
@ -29,5 +24,4 @@ aspect Breakpoints {
}
};
#endif // CONFIG_EVENT_BREAKPOINTS
#endif // __BREAKPOINTS_AH__

View File

@ -1,14 +1,11 @@
#ifndef __CREDITS_AH__
#define __CREDITS_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#ifdef BUILD_BOCHS
#include <string.h>
#include <stdio.h>
#include "config/FailConfig.hpp"
aspect Credits {
bool first;
Credits() : first(true) {}
@ -31,5 +28,4 @@ aspect Credits {
}
};
#endif // BUILD_BOCHS
#endif // __CREDITS_AH__

View File

@ -1,11 +1,6 @@
#ifndef __DISABLE_KEYBOARD_INTERRUPT_AH__
#define __DISABLE_KEYBOARD_INTERRUPT_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_DISABLE_KEYB_INTERRUPTS)
#include "iodev/iodev.h"
#include "iodev/keyboard.h"
@ -22,5 +17,4 @@ aspect DisableKeyboardInterrupt {
}
};
#endif // CONFIG_DISABLE_KEYB_INTERRUPTS
#endif // __DISABLE_KEYBOARD_INTERRUPT_AH__

View File

@ -1,10 +1,6 @@
#ifndef __DISABLE_ADD_REMOVE_LOGFN_AH__
#define __DISABLE_ADD_REMOVE_LOGFN_AH__
#include "config/VariantConfig.hpp"
#ifdef BUILD_BOCHS
/* Hack to prevent Bochs' logfunctions list (bochs.h) to overflow if the
* experiment restores simulator state more than ~1000 times.
*
@ -20,5 +16,4 @@ aspect DisableLogFunctions {
advice execution (add_remove_logfn()) : around () { }
};
#endif // BUILD_BOCHS
#endif // __DISABLE_ADD_REMOVE_LOGFN_AH__

View File

@ -1,10 +1,6 @@
#ifndef __FAIL_BOCHS_INIT_AH__
#define __FAIL_BOCHS_INIT_AH__
#include "config/VariantConfig.hpp"
#ifdef BUILD_BOCHS
#include "../SALInst.hpp"
aspect FailBochsInit {
@ -14,5 +10,4 @@ aspect FailBochsInit {
}
};
#endif
#endif // __FAIL_BOCHS_INIT_AH__

View File

@ -1,14 +1,10 @@
#ifndef __FIREINTERRUPT_AH__
#define __FIREINTERRUPT_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_FIRE_INTERRUPTS)
#include "bochs.h"
#include "cpu/cpu.h"
#include "iodev/iodev.h"
#include "../SALInst.hpp"
aspect FireInterrupt {
@ -41,5 +37,4 @@ aspect InterruptDone {
}
};
#endif // CONFIG_FIRE_INTERRUPTS
#endif // __FIREINTERRUPT_AH__

View File

@ -1,11 +1,6 @@
#ifndef __GUEST_SYS_COM_AH__
#define __GUEST_SYS_COM_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_GUESTSYS)
#include "bochs.h"
#include "cpu/cpu.h"
@ -29,5 +24,4 @@ aspect GuestSysCom {
}
};
#endif // CONFIG_EVENT_GUESTSYS
#endif // __GUEST_SYS_COM_AH__

View File

@ -1,16 +1,10 @@
#ifndef __IOPORT_COM_AH__
#define __IOPORT_COM_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_IOPORT)
#include "bochs.h"
#include "cpu/cpu.h"
#include "../SALInst.hpp"
#include "BochsHelpers.hpp"
// TODO: ATM only capturing bytewise output (most common, I suppose)
@ -35,5 +29,4 @@ aspect IOPortCom {
}
};
#endif // CONFIG_EVENT_IOPORT
#endif // __IOPORT_COM_AH__

View File

@ -1,11 +1,6 @@
#ifndef __INTERRUPT_AH__
#define __INTERRUPT_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_INTERRUPT)
#include "bochs.h"
#include "cpu/cpu.h"
@ -35,5 +30,4 @@ aspect Interrupt {
}
};
#endif // CONFIG_EVENT_INTERRUPT
#endif // __INTERRUPT_AH__

View File

@ -1,11 +1,6 @@
#ifndef __INTERRUPT_SUPPRESSION_AH__
#define __INTERRUPT_SUPPRESSION_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_SUPPRESS_INTERRUPTS)
#include "bochs.h"
#include "cpu/cpu.h"
@ -23,5 +18,4 @@ aspect InterruptSuppression {
}
};
#endif // CONFIG_SUPPRESS_INTERRUPTS
#endif // __INTERRUPT_SUPPRESSION_AH__

View File

@ -1,16 +1,10 @@
#ifndef __JUMP_AH__
#define __JUMP_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_JUMP)
#include <iostream>
#include <cstdlib>
#include <string>
#include <ctime>
#include "bochs.h"
#include "../SALInst.hpp"
@ -135,5 +129,4 @@ aspect Jump {
}
};
#endif // CONFIG_EVENT_JUMP
#endif // __JUMP_AH__

View File

@ -1,12 +1,8 @@
#ifndef __MEM_ACCESS_AH__
#define __MEM_ACCESS_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#ifdef BUILD_BOCHS
#if defined(CONFIG_EVENT_MEMREAD) || defined(CONFIG_EVENT_MEMWRITE)
#include <iostream>
#include "bochs.h"
@ -157,6 +153,4 @@ aspect MemAccess {
#endif
};
#endif // CONFIG_EVENT_MEMACCESS
#endif // BUILD_BOCHS
#endif // __MEM_ACCESS_AH__

View File

@ -1,11 +1,6 @@
#ifndef __REBOOT_AH__
#define __REBOOT_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_SR_REBOOT)
#include "bochs.h"
#include "../SALInst.hpp"
@ -25,5 +20,4 @@ aspect Reboot {
}
};
#endif // CONFIG_SR_REBOOT
#endif // __REBOOT_AH__

View File

@ -1,13 +1,7 @@
#ifndef __RESTORE_STATE_AH__
#define __RESTORE_STATE_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_SR_RESTORE)
#include <iostream>
#include "bochs.h"
#include "../SALInst.hpp"
@ -23,5 +17,4 @@ aspect RestoreState {
}
};
#endif // CONFIG_SR_RESTORE
#endif // __RESTORE_STATE_AH__

View File

@ -1,11 +1,6 @@
#ifndef _SAVE_STATE_AH__
#define _SAVE_STATE_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_SR_SAVE)
#include "bochs.h"
#include "../SALInst.hpp"
@ -29,5 +24,4 @@ aspect SaveState {
}
};
#endif // CONFIG_SR_SAVE
#endif // _SAVE_STATE_AH__

View File

@ -1,11 +1,6 @@
#ifndef __TRAP_AH__
#define __TRAP_AH__
#include "config/VariantConfig.hpp"
#include "config/FailConfig.hpp"
#if defined(BUILD_BOCHS) && defined(CONFIG_EVENT_TRAP)
#include "bochs.h"
#include "cpu/cpu.h"
@ -22,5 +17,4 @@ aspect Trap {
}
};
#endif // CONFIG_EVENT_TRAP
#endif // __TRAP_AH__