MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / FixTraceFlags_helper

Function FixTraceFlags_helper

dbug/dbug.c:779–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777 0 : (uint)TRACE_ON)
778
779void FixTraceFlags_helper(CODE_STATE *cs, const char *func,
780 struct _db_stack_frame_ *framep)
781{
782 if (framep->prev)
783 FixTraceFlags_helper(cs, framep->func, framep->prev);
784
785 cs->func= func;
786 cs->level= framep->level & ~TRACE_ON;
787 framep->level= cs->level | framep_trace_flag(cs, framep->prev);
788 /*
789 we don't set cs->framep correctly, even though DoTrace uses it.
790 It's ok, because cs->framep may only affect DO_TRACE/DONT_TRACE return
791 values, but we ignore them here anyway
792 */
793 switch(DoTrace(cs)) {
794 case ENABLE_TRACE:
795 framep->level|= TRACE_ON;
796 break;
797 case DISABLE_TRACE:
798 framep->level&= ~TRACE_ON;
799 break;
800 }
801}
802
803#define fflags(cs) cs->stack->out_file ? ListFlags(cs->stack->functions) : TRACE_ON;
804

Callers 1

FixTraceFlagsFunction · 0.85

Calls 1

DoTraceFunction · 0.85

Tested by

no test coverage detected