stack-layout

Diff stack-frame layouts between target and base builds for a function.

4|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/freeqaz/rb3 --skill stack-layout
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stack-layout
Source: https://github.com/freeqaz/rb3/tree/main/.claude/skills/stack-layout
Command: npx skills add https://github.com/freeqaz/rb3 --skill stack-layout

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes and diff-weights stack-frame layouts between the target build and our base rebuild to reveal frame-size differences, callee-save changes, and slot misalignments that impact function behavior.

Core Features & Use Cases

  • Compare and surface differences in frame size, callee-saves, and local-slot usage between builds.
  • Provide a per-slot verdict table with actionable categories (SWAPPED, DIFFER, SHIFTED, TGT_ONLY, BASE_ONLY, MATCH) to guide refactors.
  • Leverage DWARF-derived "base var" mappings to identify exactly which declarations to reorder or adjust.

Quick Start

Run the diff tool for a function symbol to generate a frame-size delta, callee-save changes, and a per-slot verdict table.

Frequently Asked Questions about stack-layout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diff stack-frame layouts between two builds?

To diff stack-frame layouts, compare a function symbol across target and base builds to produce a frame-size delta, callee-save changes, and a per-slot verdict table identifying SWAPPED, DIFFER, SHIFTED, TGT_ONLY, BASE_ONLY, or MATCH classifications.

What does a per-slot verdict table show in a stack-frame analysis?

A per-slot verdict table in stack-frame analysis shows actionable categories—SWAPPED, DIFFER, SHIFTED, TGT_ONLY, BASE_ONLY, and MATCH—detailing how local-slot usage and slot misalignments impact function behavior between target and base builds.

How do I find callee-save register changes when debugging stack frames?

Finding callee-save register changes requires applying a stack-frame diff to a single function, which compares target and base frame layouts and outputs callee-save deltas alongside frame-size differences.

How does DWARF base-var mapping work for stack-frame slot misalignments?

DWARF base-var mapping works by leveraging DWARF-derived debug information to identify exact variable declarations associated with misaligned stack slots, providing actionable reordering guidance to resolve slot misalignments.

Does stack-frame diffing work with mwcc compiler output?

Stack-frame diffing works with mwcc compiler output by analyzing the generated frame layouts and DWARF debug information, comparing target and base builds to surface frame-size differences and slot misalignments.

Why do stack-frame slot shifts happen between target and base builds?

Stack-frame slot shifts happen due to changes in variable declaration ordering or callee-save usage between target and base builds, detected through slot fingerprint analysis and classified as SHIFTED or SWAPPED in the per-slot verdict table.