From: Rohan Bafna Date: Thu, 16 Jan 2025 22:04:20 +0000 (-0500) Subject: Update README.md to include information on ebp sentinels X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=ec70eeb445cd67f1e61493bdda302f41c032a46d;p=cs3210-lab1.git Update README.md to include information on ebp sentinels --- diff --git a/README.md b/README.md index 17dd9aa..01370d3 100644 --- a/README.md +++ b/README.md @@ -198,15 +198,24 @@ operations: - By convention, when a function is first called, the base-pointer is written to the stack, and stack-pointer is transferred into the base-pointer. +This scheme doesn't describe how to find the bottom of the stack, +however. In order to know when to stop walking the stack, for this +lab, we have modified the codebase to ensure that the first function +that executes in any kernel thread begins with `ebp` set to `0xF00`. + +You should **not** print out a backtrace line corresponding to the +first function's return address, as that return address is not always +defined. + This forces the stack layout to appear as follows: ```text --------------------- | ... | --------------------- -| Return Address 0 | <- First frame on the stack [0] +| Return Address 0 | <- Not defined for first frame, don't print --------------------- -| Base Pointer 0 | <- Not defined for first frame +| Base Pointer 0 | <- Hardcoded to `0xF00` --------------------- | ... | ---------------------