static plcrash_greg_t plcrash_async_thread_state_get_reg_64()

in Source/PLCrashAsyncThread_x86.c [344:418]


static plcrash_greg_t plcrash_async_thread_state_get_reg_64 (const plcrash_async_thread_state_t *thread_state, plcrash_regnum_t regnum) {
    const plcrash_async_thread_state_t *ts = thread_state;

    switch (regnum) {
        case PLCRASH_X86_64_RAX:
            RETGEN(rax, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RBX:
            RETGEN(rbx, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RCX:
            RETGEN(rcx, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RDX:
            RETGEN(rdx, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RDI:
            RETGEN(rdi, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RSI:
            RETGEN(rsi, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RBP:
            RETGEN(rbp, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RSP:
            RETGEN(rsp, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R8:
            RETGEN(r8, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R9:
            RETGEN(r9, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R10:
            RETGEN(r10, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R11:
            RETGEN(r11, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R12:
            RETGEN(r12, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R13:
            RETGEN(r13, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R14:
            RETGEN(r14, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_R15:
            RETGEN(r15, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RIP:
            RETGEN(rip, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_RFLAGS:
            RETGEN(rflags, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_CS:
            RETGEN(cs, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_FS:
            RETGEN(fs, thread.uts.ts64, ts);
            
        case PLCRASH_X86_64_GS:
            RETGEN(gs, thread.uts.ts64, ts);
            
        default:
            // Unsupported register
            __builtin_trap();
    }

    /* Should not be reachable */
    return 0;
}