Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 257ceb1 in mainline for kernel/generic/include/stacktrace.h


Ignore:
Timestamp:
2010-07-16T09:06:56Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
63bdde6
Parents:
f77e591
Message:

Introduce the stack trace context which is passed to the individual stack
tracing hooks and which can carry some additional information.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/stacktrace.h

    rf77e591 r257ceb1  
    4242
    4343typedef struct {
    44         bool (* frame_pointer_validate)(uintptr_t);
    45         bool (* frame_pointer_prev)(uintptr_t, uintptr_t *);
    46         bool (* return_address_get)(uintptr_t, uintptr_t *);
     44        uintptr_t fp;
     45        uintptr_t pc;
     46        struct istate *istate;
     47} stack_trace_context_t;
     48
     49typedef struct {
     50        bool (* stack_trace_context_validate)(stack_trace_context_t *);
     51        bool (* frame_pointer_prev)(stack_trace_context_t *, uintptr_t *);
     52        bool (* return_address_get)(stack_trace_context_t *, uintptr_t *);
    4753        bool (* symbol_resolve)(uintptr_t, const char **, uintptr_t *);
    4854} stack_trace_ops_t;
     
    5359extern void stack_trace(void);
    5460extern void stack_trace_istate(struct istate *);
    55 extern void stack_trace_fp_pc(stack_trace_ops_t *, uintptr_t, uintptr_t);
     61extern void stack_trace_ctx(stack_trace_ops_t *, stack_trace_context_t *);
    5662
    5763/*
     
    6167extern uintptr_t program_counter_get(void);
    6268
    63 extern bool kernel_frame_pointer_validate(uintptr_t);
    64 extern bool kernel_frame_pointer_prev(uintptr_t, uintptr_t *);
    65 extern bool kernel_return_address_get(uintptr_t, uintptr_t *);
     69extern bool kernel_stack_trace_context_validate(stack_trace_context_t *);
     70extern bool kernel_frame_pointer_prev(stack_trace_context_t *, uintptr_t *);
     71extern bool kernel_return_address_get(stack_trace_context_t *, uintptr_t *);
    6672
    67 extern bool uspace_frame_pointer_validate(uintptr_t);
    68 extern bool uspace_frame_pointer_prev(uintptr_t, uintptr_t *);
    69 extern bool uspace_return_address_get(uintptr_t, uintptr_t *);
     73extern bool uspace_stack_trace_context_validate(stack_trace_context_t *);
     74extern bool uspace_frame_pointer_prev(stack_trace_context_t *, uintptr_t *);
     75extern bool uspace_return_address_get(stack_trace_context_t *, uintptr_t *);
    7076
    7177#endif
Note: See TracChangeset for help on using the changeset viewer.