# Writing a Debugger From Scratch - DbgRs Part 6 - Stacks

DevFeed: [Writing a Debugger From Scratch - DbgRs Part 6 - Stacks](<https://devfeed.tech/articles/writing-a-debugger-from-scratch-dbgrs-part-6-stacks-39738.md>)

Original publisher: [Read original article](<https://www.timdbg.com/posts/writing-a-debugger-from-scratch-part-6/>)

Author: Tim Misiak

Published: 2023-11-22T17:40:45Z

Content type: tutorial

Language: en

Sources: [TimDbg](<https://devfeed.tech/sources/timdbg.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Windows](<https://devfeed.tech/topics/windows.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [execution](<https://devfeed.tech/tags/execution.md>), [function](<https://devfeed.tech/tags/function.md>), [local-variables](<https://devfeed.tech/tags/local-variables.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

This tutorial explains how DbgRs, an x64 Windows debugger, walks call stacks by unwinding register contexts to inspect stack frames, return addresses, and local variables.

## Source excerpt

(New to this series? Consider starting from part 1) At the end of the last post, DbgRs could finally set breakpoints. That was the last really critical feature needed for controlling execution of a program. Now that it can stop on an arbitrary function or code location, the next step is to find more information about the state of the program. In my opinion, the single most useful piece of information is the call stack, so that's what this post will be about.