]> git.tdb.fi Git - gldbg.git/blobdiff - source/glwrap.c
Track owners of breakpoints
[gldbg.git] / source / glwrap.c
index c70b308384b339888dc4ab4527fc7a86df4fa4dc..c121e22709c819eb3e9040245818e419023bd49e 100644 (file)
@@ -171,15 +171,22 @@ static void receive(void)
 
 void tracepoint(unsigned short func, int flag)
 {
+       int breakpoint;
+
        receive();
 
-       if((breakpoints[func]|break_any)&flag)
+       breakpoint = (breakpoints[func]|break_any)&flag;
+       if(breakpoint || hold)
        {
                GlPacket *pkt;
 
-               pkt = packet_begin(FUNC_GLDBREAK);
-               packet_write_short(pkt, func);
-               packet_send(pkt, get_out_fd());
+               if(breakpoint)
+               {
+                       pkt = packet_begin(FUNC_GLDBREAK);
+                       packet_write_short(pkt, func);
+                       packet_write_char(pkt, flag);
+                       packet_send(pkt, get_out_fd());
+               }
 
                break_any = 0;