X-Git-Url: http://git.tdb.fi/?p=gldbg.git;a=blobdiff_plain;f=source%2Fglwrap.c;h=c121e22709c819eb3e9040245818e419023bd49e;hp=c70b308384b339888dc4ab4527fc7a86df4fa4dc;hb=6d297b506314c07bff3d77c2853a5f59380cfcb0;hpb=8ddb049bf9cb06c377857ab46b7af23c140f12a7 diff --git a/source/glwrap.c b/source/glwrap.c index c70b308..c121e22 100644 --- a/source/glwrap.c +++ b/source/glwrap.c @@ -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;