X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgldbg.cpp;h=d18ff51bba753b9c2ccbb97cb510d48169fa957a;hb=64592975a49e2bd26a561f36425071427f37d5fb;hp=5a4ad191f65c29a6c760deae5c329657b44b21b0;hpb=c6b2f7585d51164dc32f4dd2a05855913e464c58;p=gldbg.git diff --git a/source/gldbg.cpp b/source/gldbg.cpp index 5a4ad19..d18ff51 100644 --- a/source/gldbg.cpp +++ b/source/gldbg.cpp @@ -26,6 +26,7 @@ Application::RegApp GlDbg::reg; GlDbg::GlDbg(int argc, char **argv): cmd_interp(*this), process(vector(argv+1, argv+argc)), + buf_offset(0), flushing(false), got_sigchld(false) { @@ -39,7 +40,13 @@ int GlDbg::main() catch_signal(SIGCHLD); set_loop_mode(TICK_BUSY); + IO::print("GLdbg 0.0\n"); + IO::print("Copyright © 2009 Mikkosoft Productions\n"); + IO::print("Type \"help\" for a list of commands\n"); + Application::main(); + + return 0; } void GlDbg::launch() @@ -59,9 +66,9 @@ void GlDbg::launch() close(fds[1]); } -void GlDbg::quit() +void GlDbg::quit(bool force) { - if(process.get_state()!=Process::INACTIVE) + if(!force && process.get_state()!=Process::INACTIVE) throw InvalidState("Program is still running"); exit(0); } @@ -127,6 +134,8 @@ void GlDbg::read_stream() if(size<0) break; tracer.decode(data, len); + glstate.decode(data, len); + profiler.decode(data, len); buf_offset += size; } if(buf_offset>8192)