Subversion Repositories HelenOS

Rev

Rev 296 | Rev 299 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 296 Rev 297
Line 38... Line 38...
38
#include <arch.h>
38
#include <arch.h>
39
#include <symtab.h>
39
#include <symtab.h>
40
#include <arch/asm.h>
40
#include <arch/asm.h>
41
 
41
 
42
 
42
 
-
 
43
 
-
 
44
static void messy_stack_trace(__native *stack)
-
 
45
{
-
 
46
    __native *upper_limit = (__native *)(((__native)THREAD->kstack) + STACK_SIZE);
-
 
47
    char *symbol;
-
 
48
 
-
 
49
    printf("Stack contents: ");
-
 
50
    while (stack < upper_limit) {
-
 
51
        symbol = get_symtab_entry((__address)*stack);
-
 
52
        if (symbol)
-
 
53
            printf("%s, ", symbol);
-
 
54
        stack++;
-
 
55
    }
-
 
56
    printf("\n");
-
 
57
}
-
 
58
 
43
static void print_info_errcode(__u8 n, __native x[])
59
static void print_info_errcode(__u8 n, __native x[])
44
{
60
{
45
    char *symbol;
61
    char *symbol;
46
 
62
 
47
    if (!(symbol=get_symtab_entry(x[1])))
63
    if (!(symbol=get_symtab_entry(x[1])))
Line 62... Line 78...
62
    printf("       %Q, %Q, %Q\n", x[11], x[12], x[13]);
78
    printf("       %Q, %Q, %Q\n", x[11], x[12], x[13]);
63
    printf("       %Q, %Q, %Q\n", x[14], x[15], x[16]);
79
    printf("       %Q, %Q, %Q\n", x[14], x[15], x[16]);
64
    printf("       %Q, %Q, %Q\n", x[17], x[18], x[19]);
80
    printf("       %Q, %Q, %Q\n", x[17], x[18], x[19]);
65
    printf("       %Q, %Q, %Q\n", x[20], x[21], x[22]);
81
    printf("       %Q, %Q, %Q\n", x[20], x[21], x[22]);
66
    printf("       %Q, %Q, %Q\n", x[23], x[24], x[25]);
82
    printf("       %Q, %Q, %Q\n", x[23], x[24], x[25]);
-
 
83
    messy_stack_trace(&x[5]);
67
}
84
}
68
 
85
 
69
/*
86
/*
70
 * Interrupt and exception dispatching.
87
 * Interrupt and exception dispatching.
71
 */
88
 */