From 7cc7ebcdb800bd4d88e4fccff8459003599e71d7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 25 Aug 2012 21:25:16 +0300 Subject: [PATCH] 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. --- flavors/gl/source/inspector.cpp | 1 + source/gldbg.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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); } } -- 2.45.2