示例#1
0
void print(maxint_t x, int64_t y, int64_t z, int64_t c, double alpha, int threads)
{
  if (print_status())
  {
    cout << "x = " << x << endl;
    cout << "y = " << y << endl;
    cout << "z = " << z << endl;
    cout << "c = " << c << endl;
    cout << "alpha = " << fixed << setprecision(3) << alpha << endl;
    print_threads(threads);
  }
}
示例#2
0
void print(maxint_t x, int64_t y, int threads)
{
  if (print_variables())
  {
    maxint_t z = x / y;
    cout << "x = " << x << endl;
    cout << "y = " << y << endl;
    cout << "z = " << z << endl;
    cout << "alpha = " << fixed << setprecision(3) << get_alpha(x, y) << endl;
    print_threads(threads);
    cout << endl;
  }
}
示例#3
0
void Summary::print()
{
    print_versions();
    print_memory();
    print_cpu();
    print_threads();
    print_pools();

#   ifndef XMRIG_NO_API
    print_api();
#   endif

    print_commands();
}
示例#4
0
/**
 * panic_backlog
 */
void panic_backlog(uint32_t stackptr)
{
#ifndef __LP64__
    thread_t currthr = current_thread();

    /*
     * Make sure the crash is after we set the first thread. 
     */
    if (!currthr) {
        kprintf("panicked thread: %p, backtrace: 0x%08x\n", currthr, stackptr);
        panic_arm_thread_backtrace(stackptr, 32, NULL, FALSE, NULL, TRUE, "");
        return;
    }

    task_t task = currthr->task;
    /*
     * If the task is null, return... 
     */
    if (!task) {
        kprintf("panicked thread: %p, backtrace: 0x%08x\n", currthr, stackptr);
        panic_arm_thread_backtrace(stackptr, 32, NULL, FALSE, NULL, TRUE, "");
        return;
    }

    char *name;

    if (task->bsd_info && (name = proc_name_address(task->bsd_info))) {
        /*
         */
    } else {
        name = (char *) "unknown task";
    }

    kext_dump_panic_lists(&kdb_printf);

    kdb_printf("\nPanicked task %p: %d pages, %d threads: pid %d: %s\n"
               "panicked thread: %p, backtrace: 0x%08x\n", task,
               task->all_image_info_size, task->thread_count,
               (task->bsd_info != NULL) ? proc_pid(task->bsd_info) : 0, name,
               currthr, stackptr);
    panic_arm_thread_backtrace(stackptr, 32, NULL, FALSE, NULL, TRUE, "");

    if ((currthr->machine.uss == &currthr->machine.user_regs)
        && currthr->machine.uss->pc) {
        kdb_printf("%s\tuser state:\n", "");
        kdb_printf("%s\t  r0: 0x%08x  r1: 0x%08x  r2: 0x%08x  r3: 0x%08x\n"
                   "%s\t  r4: 0x%08x  r5: 0x%08x  r6: 0x%08x  r7: 0x%08x\n"
                   "%s\t  r8: 0x%08x  r9: 0x%08x r10: 0x%08x r11: 0x%08x\n"
                   "%s\t r12: 0x%08x  sp: 0x%08x  lr: 0x%08x  pc: 0x%08x\n"
                   "%s\tcpsr: 0x%08x fsr: 0x%08x far: 0x%08x\n",
                   "", currthr->machine.uss->r[0], currthr->machine.uss->r[1],
                   currthr->machine.uss->r[2], currthr->machine.uss->r[3], "",
                   currthr->machine.uss->r[4], currthr->machine.uss->r[5],
                   currthr->machine.uss->r[6], currthr->machine.uss->r[7], "",
                   currthr->machine.uss->r[8], currthr->machine.uss->r[9],
                   currthr->machine.uss->r[10], currthr->machine.uss->r[11], "",
                   currthr->machine.uss->r[12], currthr->machine.uss->sp,
                   currthr->machine.uss->lr, currthr->machine.uss->pc, "",
                   currthr->machine.uss->cpsr, 0, 0);
    }

    if (panicDebugging) {
        print_threads(stackptr);
    } else {
        kdb_printf("\n");

        queue_head_t *task_list = &tasks;
        task_t task = TASK_NULL;

        queue_iterate(task_list, task, task_t, tasks) {
            char *name;

            if (task->bsd_info && (name = proc_name_address(task->bsd_info))) {
                /*
                 */
            } else {
                name = (char *) "unknown task";
            }

            if (task == currthr->task)
                continue;

            kdb_printf("Task 0x%x: %d pages, %d threads: pid %d: %s\n", task,
                       task->all_image_info_size, task->thread_count,
                       (task->bsd_info != NULL) ? proc_pid(task->bsd_info) : 0,
                       name);
        }
    }