Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#71 closed enhancement (fixed)

Stack walkers

Reported by: Jakub Jermář Owned by: Jakub Jermář
Priority: minor Milestone: 0.4.2
Component: helenos/unspecified Version: mainline
Keywords: debugging, observability Cc:
Blocker for: Depends on:
See also:

Description

Implement a common API for walking kernel and userspace stacks so that a stack trace can be printed on kernel panic or on userspace task abort. All architectures should implement this API, perhaps in a temporarily dummy mode if full support is not delivered immediately.

Change History (6)

comment:1 by Jakub Jermář, 15 years ago

Owner: set to Jakub Jermář
Status: newaccepted

I implemented the userspace part of this ticket in changeset:head,185.
Support for amd64, ia32 and sparc64 is now present, other implementations are dummy.

comment:2 by Jakub Jermář, 15 years ago

Support for uspace arm32 stack tracing was merged in changeset:head,186.

comment:3 by Jakub Jermář, 15 years ago

From the not-yet supported architectures, only ppc32 seems to have a straightforward implementation because it has the standard linked-list organization of stack frames:

  • mips32 seems to require some disassembling of the function's first basic block to figure out the register used as the frame pointer
  • ia64 must use the stack unwind data generated by the compiler

comment:4 by Jakub Jermář, 15 years ago

Support for uspace ppc32 stack tracing was merged in changeset:head,187.

comment:5 by Jakub Jermář, 15 years ago

Resolution: fixed
Status: acceptedclosed

The kernel generic and ia32 and amd64 support was merged in changeset:head,199.
In changeset:head,210, kernel support for arm32 was added.

As in the userspace case, ia64 and mips32 are difficult and will not be realized now.

I am unfortunately lacking a deeper knowledge of ppc32 exception code so that I will leave the kernel ppc32 support to someone else.

The last architecture is sparc64. Unfortunately, the design around the userspace window buffer complicates the situation and prevents us from easily printing stack from istate originating in uspace.

Having made this summary, I think the main goal of this ticket was met and we can close this ticket. We can open dedicated tickets for the missing functionality in this field.

comment:6 by Jakub Jermář, 15 years ago

Milestone: 0.5.00.4.2
Note: See TracTickets for help on using tickets.