|
|
1.1 ! root 1: #include "univ.h" ! 2: #include "process.pri" ! 3: #include "hostcore.h" ! 4: #include "master.pub" ! 5: #include "frame.pri" ! 6: #include "memory.pub" ! 7: #include "symtab.pub" ! 8: #include "symbol.h" ! 9: #include "srcdir.h" ! 10: #include "asm.pub" ! 11: #include "parse.h" ! 12: #include "expr.pub" ! 13: SRCFILE("kernproc.c") ! 14: ! 15: char *KernProcess::kbd(char *s) ! 16: { ! 17: Parse y(G_EXPR,0); ! 18: Expr *e; ! 19: Bls error; ! 20: ! 21: trace( "%d.kbd(%s)", this, s ); OK(0); ! 22: if( !(e = (Expr*)y.parse(s)) ) ! 23: return sf("%s: %s", y.error, s); ! 24: e->evaltext(globals, error); ! 25: if( e->evalerr ) ! 26: return sf("%s: %s", s, error.text); ! 27: ((KernCore*)core)->cs_fp = e->val.lng; ! 28: habeascorpus(PENDING,0); ! 29: return 0; ! 30: } ! 31: ! 32: char *KernProcess::help() ! 33: { ! 34: return "<expr> {start fp for callstack}"; ! 35: } ! 36: ! 37: void KernProcess::open() ! 38: { ! 39: Menu m; ! 40: char *error; ! 41: ! 42: trace("%d.open(%d)", this); VOK; ! 43: Process::openpad(); ! 44: if( core ) return; ! 45: insert(ERRORKEY, "Checking dump and symbol table..."); ! 46: core = (Core*) new KernCore(this, master); ! 47: if( error = core->open() ){ ! 48: delete core; ! 49: core = 0; ! 50: m.last("open system dump", (Action)&KernProcess::open, 0); ! 51: pad->menu( m ); ! 52: insert(ERRORKEY, error); ! 53: return; ! 54: } ! 55: insert(ERRORKEY, core->symtab()->warn()); ! 56: globals = new Globals(core); ! 57: _asm = core->newAsm(); ! 58: m.last( "src text", (Action)&KernProcess::srcfiles ); /* should check */ ! 59: m.last( "Globals", (Action)&KernProcess::openglobals ); ! 60: m.last( "RawMemory", (Action)&KernProcess::openmemory ); ! 61: m.last( "Assembler", (Action)&KernProcess::openasm ); ! 62: m.last( "User Types",(Action)&KernProcess::opentypes ); ! 63: pad->menu(m); ! 64: pad->makecurrent(); ! 65: docycle(); ! 66: } ! 67: ! 68: Index KernProcess::carte() ! 69: { ! 70: Menu m; ! 71: trace( "%d.carte(%d)", this ); OK(ZIndex); ! 72: m.last( "open system dump", (Action)&KernProcess::open, 0 ); ! 73: return m.index(); ! 74: } ! 75: ! 76: void KernProcess::userclose() ! 77: { ! 78: trace( "%d.userclose()", this ); VOK; ! 79: Process::userclose(); ! 80: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.