From: Mikko Rasa Date: Sat, 25 Aug 2012 18:25:16 +0000 (+0300) Subject: Fix limit query in Inspector/GlState X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7cc7ebcdb800bd4d88e4fccff8459003599e71d7;p=gldbg.git Fix limit query in Inspector/GlState An inconsistency between some process state checks caused the breakpoint to not be sent. Also clear the breakpoint after the state query has been sent. --- diff --git a/flavors/gl/source/inspector.cpp b/flavors/gl/source/inspector.cpp index 6ff3f70..b641b05 100644 --- a/flavors/gl/source/inspector.cpp +++ b/flavors/gl/source/inspector.cpp @@ -82,6 +82,7 @@ void Inspector::process_stopped(int reason) GlPacket *pkt = packet_begin(FUNC_GLDQUERYLIMITS); gldbg.send(pkt); query_state = 0; + gldbg.clear_breakpoint(FUNC_GLXMAKECURRENT, BREAK_RETURN, this); gldbg.resume_from_break(this); } } diff --git a/source/gldbg.cpp b/source/gldbg.cpp index c13d5cc..9da31ea 100644 --- a/source/gldbg.cpp +++ b/source/gldbg.cpp @@ -134,7 +134,7 @@ void GlDbg::set_breakpoint(unsigned short func, unsigned char flag, Tool *owner) breakpoints.back().add_owner(owner); } - if(process.get_state()>=Process::RUNNING) + if(process.get_state()!=Process::INACTIVE) send_breakpoint(func, flag, 0); } } @@ -158,7 +158,7 @@ void GlDbg::clear_breakpoint(unsigned short func, unsigned char flag, Tool *owne break; } - if(process.get_state()>=Process::RUNNING) + if(process.get_state()!=Process::INACTIVE) send_breakpoint(func, 0, flag); } }