Opened 9 years ago

Closed 9 years ago

#6160 closed enhancement (fixed)

[PATCH] ppc: Implement arch_debug_save_registers and shorten stack traces

Reported by: andreasf Owned by: andreasf
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: PowerPC

Description

As suggested in #6139, here's a patch saving the stack pointer in arch_debug_save_registers and retrieving it for the stack trace instead of using the current function's stack frame.

This was tested to exclude panic and upwards from both the immediate KDL stack trace and the interactive bt stack trace.

Attachments (2)

0001-ppc-Save-debug-register-state-and-shorten-stack-trac.patch (1.6 KB) - added by andreasf 9 years ago.
proposed patch
0001-ppc-Drop-one-frame-in-stack-trace.patch (923 bytes) - added by andreasf 9 years ago.
draft patch: drop "panic" from stack trace

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by andreasf

proposed patch

comment:1 Changed 9 years ago by andreasf

Has a Patch: set

comment:2 Changed 9 years ago by andreasf

Owner: changed from axeld to andreasf
Status: newin-progress

comment:3 Changed 9 years ago by andreasf

Has a Patch: unset

Changed 9 years ago by andreasf

draft patch: drop "panic" from stack trace

comment:4 Changed 9 years ago by andreasf

Has a Patch: set

comment:5 Changed 9 years ago by andreasf

Resolution: fixed
Status: in-progressclosed

I've applied slightly different patches in hrev37281 and hrev37282.

In particular I've fixed a type inconsistency (uint32 vs. addr_t) and save the proper r1 value rather than the one that's nice to have for the stack trace.

I've attached a potential add-on patch that does the additional stack frame dereference on the stack_trace() side of things, but I believe this behavior should be synchronized with x86. Before we reach a point with working USB drivers we cannot test the alternative (non-panic) KDL entry through keyboard shortcut anyway. Closing this ticket for now.

Note: See TracTickets for help on using tickets.