-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Implement backtracing for MIPS #6690
Copy link
Copy link
Closed
Labels
arch-mips32-bit MIPS32-bit MIPSarch-mips6464-bit MIPS64-bit MIPSenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Metadata
Metadata
Assignees
Labels
arch-mips32-bit MIPS32-bit MIPSarch-mips6464-bit MIPS64-bit MIPSenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Type
Fields
Give feedbackNo fields configured for issues without a type.
EDIT: This issue has been turned into a tracking issue to implement backtracing on MIPS. Some useful information is provided by @LemonBoy in the comment down below.
I think I found an upstream bug regarding frame pointers on MIPS.For-target mips64-freestanding(64bit) the following function prologue is emitted:To have a working stack trace on MIPS we should be able to also use afp_offsetof2 * @sizeOf(usize). But that breaks the 32 bit MIPS code. See below.zig/lib/std/debug.zig
Lines 342 to 349 in 3b4432d
For-target mips-freestanding(32bit) the following function prologue is emitted:As can be seen for 32bit mips, we also need a offset of 16 to get the previous frame pointer. I would guess that an offset of 8 would be fine too, but that is not what is emitted.@LemonBoy Is this an upstream bug, or is this required on mips32 because of alignment or some other reason?