X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgldbg.cpp;h=34e616f4ac37caa5d30da1708892206bc3dea597;hb=2f49929fc383eab718b5fb64d966535b753e7024;hp=c91e00a79ec8171dd6672fbc8a1b9333209fa7e4;hpb=0be9f22fa27bfca77f494489fce0e62b66882e5b;p=gldbg.git diff --git a/source/gldbg.cpp b/source/gldbg.cpp index c91e00a..34e616f 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) { @@ -44,6 +45,8 @@ int GlDbg::main() IO::print("Type \"help\" for a list of commands\n"); Application::main(); + + return 0; } void GlDbg::launch() @@ -63,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); } @@ -131,6 +134,7 @@ void GlDbg::read_stream() if(size<0) break; tracer.decode(data, len); + glstate.decode(data, len); buf_offset += size; } if(buf_offset>8192)