static void read_debug_flags()

in rts/RtsFlags.c [1834:1895]


static void read_debug_flags(const char* arg)
{
    // Already parsed "-D"
    const char *c;
    for (c  = arg + 2; *c != '\0'; c++) {
        switch (*c) {
        case 's':
            RtsFlags.DebugFlags.scheduler = true;
            break;
        case 'i':
            RtsFlags.DebugFlags.interpreter = true;
            break;
        case 'w':
            RtsFlags.DebugFlags.weak = true;
            break;
        case 'G':
            RtsFlags.DebugFlags.gccafs = true;
            break;
        case 'g':
            RtsFlags.DebugFlags.gc = true;
            break;
        case 'b':
            RtsFlags.DebugFlags.block_alloc = true;
            break;
        case 'S':
            RtsFlags.DebugFlags.sanity = true;
            break;
        case 't':
            RtsFlags.DebugFlags.stable = true;
            break;
        case 'p':
            RtsFlags.DebugFlags.prof = true;
            break;
        case 'l':
            RtsFlags.DebugFlags.linker = true;
            break;
        case 'a':
            RtsFlags.DebugFlags.apply = true;
            break;
        case 'm':
            RtsFlags.DebugFlags.stm = true;
            break;
        case 'z':
            RtsFlags.DebugFlags.squeeze = true;
            break;
        case 'c':
            RtsFlags.DebugFlags.hpc = true;
            break;
        case 'r':
            RtsFlags.DebugFlags.sparks = true;
            break;
        case 'C':
            RtsFlags.DebugFlags.compact = true;
            break;
        default:
            bad_option( arg );
        }
    }
    // -Dx also turns on -v.  Use -l to direct trace
    // events to the .eventlog file instead.
    RtsFlags.TraceFlags.tracing = TRACE_STDERR;
}