Revision 2a29ca73

b/tests/testsig.c
67 67
int main(int argc, char **argv)
68 68
{
69 69
    struct sigaction act;
70
    int val;
70
    volatile int val;
71 71
    
72 72
    act.sa_sigaction = sig_handler;
73 73
    sigemptyset(&act.sa_mask);
......
75 75
    sigaction(SIGFPE, &act, NULL);
76 76
    sigaction(SIGILL, &act, NULL);
77 77
    sigaction(SIGSEGV, &act, NULL);
78
    sigaction(SIGTRAP, &act, NULL);
78 79

  
79 80
    /* test division by zero reporting */
80 81
    if (setjmp(jmp_env) == 0) {
......
112 113
        asm volatile ("int $0xfd");
113 114
    }
114 115

  
116
    printf("INT3 exception:\n");
117
    if (setjmp(jmp_env) == 0) {
118
        asm volatile ("int3");
119
    }
120

  
115 121
    printf("CLI exception:\n");
116 122
    if (setjmp(jmp_env) == 0) {
117 123
        asm volatile ("cli");
......
158 164

  
159 165
    printf("HLT exception:\n");
160 166
    if (setjmp(jmp_env) == 0) {
161
        asm volatile ("hlt" : : "d" (0x4321), "D" (tab), "c" (1));
167
        asm volatile ("hlt");
162 168
    }
163 169

  
164
#if 0
170
    printf("single step exception:\n");
171
    val = 0;
172
    if (setjmp(jmp_env) == 0) {
173
        asm volatile ("pushf\n"
174
                      "orl $0x00100, (%%esp)\n"
175
                      "popf\n"
176
                      "movl $0xabcd, %0\n" : "=m" (val) : : "cc", "memory");
177
    }
178
    printf("val=0x%x\n", val);
179
    
180
#if 1
165 181
    {
166 182
        int i;
167 183
        act.sa_handler = alarm_handler;

Also available in: Unified diff