require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_KGDB_H_)) {
    eval 'sub _SYS_KGDB_H_ () {1;}' unless defined(&_SYS_KGDB_H_);
    require 'machine/db_machdep.ph';
    eval 'sub KGDB_MEM_R () {ord(\'m\');}' unless defined(&KGDB_MEM_R);
    eval 'sub KGDB_MEM_W () {ord(\'M\');}' unless defined(&KGDB_MEM_W);
    eval 'sub KGDB_REG_R () {ord(\'g\');}' unless defined(&KGDB_REG_R);
    eval 'sub KGDB_REG_W () {ord(\'G\');}' unless defined(&KGDB_REG_W);
    eval 'sub KGDB_CONT () {ord(\'c\');}' unless defined(&KGDB_CONT);
    eval 'sub KGDB_STEP () {ord(\'s\');}' unless defined(&KGDB_STEP);
    eval 'sub KGDB_KILL () {ord(\'k\');}' unless defined(&KGDB_KILL);
    eval 'sub KGDB_SIGNAL () {ord(\'?\');}' unless defined(&KGDB_SIGNAL);
    eval 'sub KGDB_DEBUG () {ord(\'d\');}' unless defined(&KGDB_DEBUG);
    eval 'sub KGDB_DETACH () {ord(\'D\');}' unless defined(&KGDB_DETACH);
    eval 'sub KGDB_START () {ord(\'$\');}' unless defined(&KGDB_START);
    eval 'sub KGDB_END () {ord(\'#\');}' unless defined(&KGDB_END);
    eval 'sub KGDB_GOODP () {ord(\'+\');}' unless defined(&KGDB_GOODP);
    eval 'sub KGDB_BADP () {ord(\'-\');}' unless defined(&KGDB_BADP);
    if(defined(&_KERNEL)) {
	require 'ddb/db_run.ph';
	require 'ddb/db_access.ph';
	unless(defined(&KGDB_PREPARE)) {
	    eval 'sub KGDB_PREPARE () {1;}' unless defined(&KGDB_PREPARE);
	}
	unless(defined(&KGDB_ENTER)) {
	    eval 'sub KGDB_ENTER () {1;}' unless defined(&KGDB_ENTER);
	}
    }
}
1;
