]> git.tdb.fi Git - gldbg.git/commitdiff
Fix limit query in Inspector/GlState
authorMikko Rasa <tdb@tdb.fi>
Sat, 25 Aug 2012 18:25:16 +0000 (21:25 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 25 Aug 2012 18:25:16 +0000 (21:25 +0300)
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.

flavors/gl/source/inspector.cpp
source/gldbg.cpp

index 6ff3f7033fa86180b2317f85f2e2d6a443f5800b..b641b05d0381a19a10afe4c4b853cab86a5a39a0 100644 (file)
@@ -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);
        }
 }
index c13d5cc2fa6bbafb1b42c87b38139cf78fd58c10..9da31ea85917f76731126188690ee1727b0058dc 100644 (file)
@@ -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);
                }
        }