Opened 14 years ago

Closed 14 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:
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 14 years ago.
proposed patch
0001-ppc-Drop-one-frame-in-stack-trace.patch (923 bytes ) - added by andreasf 14 years ago.
draft patch: drop "panic" from stack trace

Download all attachments as: .zip

Change History (7)

comment:1 by andreasf, 14 years ago

patch: 01

comment:2 by andreasf, 14 years ago

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

comment:3 by andreasf, 14 years ago

patch: 10

by andreasf, 14 years ago

draft patch: drop "panic" from stack trace

comment:4 by andreasf, 14 years ago

patch: 01

comment:5 by andreasf, 14 years ago

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.