Ejemplo n.º 1
0
int
main(int argc, char *argv[])
{
    int i;
#ifdef USE_DYNAMO
    dynamorio_app_init();
    dynamorio_app_start();
#endif
    INIT();

    /* set up SEH */
    __asm {
        push eax
        mov eax, offset vcex
        mov dword ptr fs:[0], eax
        pop eax
    }

    print("ret-SEH test starting\n");
    for (i=0; i<NUM_SCOPE_ENTRIES; i++) {
        /* levels start at -1 */
        ret_SEH(i-1);
    }
    print("ret-SEH test stopping\n");

#ifdef USE_DYNAMO
    dynamorio_app_stop();
    dynamorio_app_exit();
#endif
    return 0;
}
Ejemplo n.º 2
0
int
main(int argc, char *argv[])
{
    int i;
    INIT();

    /* set up SEH */
    __asm {
        push eax
        mov eax, offset vcex
        mov dword ptr fs:[0], eax
        pop eax
    }

    print("ret-SEH test starting\n");
    for (i=0; i<NUM_SCOPE_ENTRIES; i++) {
        /* levels start at -1 */
        ret_SEH(i-1);
    }
    print("ret-SEH test stopping\n");
    return 0;
}