Skip to content

Instantly share code, notes, and snippets.

View ayardley's full-sized avatar

Alvis Yardley ayardley

  • Stephenville, TX
View GitHub Profile
@nbrown
nbrown / gist:2706968
Created May 16, 2012 03:01
M0 Debugger idea

Debugger:

Use the same m0 run loop and ops as m0 proper

The debugger main function, should be called from m0 proper

Store all state data in a debugger state struct

The struct has the following fields:

  • Run state => an enumerated value which is initialized to STEP. The valid values for the enumeration are:
    • INIT => the initial state during which the debugger state structure is initialized from command line arguments if they exist
@cotto
cotto / questions.txt
Created May 2, 2012 22:52
m0 memory questions
per-callframe constants segment layout:
constants segment starts with a list of fixed-width pointers. I/N entries are stored directly. S/P entries are pointers to later in the constants segment
The data segment has a couple options. It can be appended after the constants segment (either on the next page or immediately after), with the constants data being marked read-only. Alternately, it can just be another segment attached to a special register.
If callframes are analogous to subs, the constants and data segment can be analogous to lexical data.
If callframes are analogous to subs, how will recursion work?
* clone a callframe (when? before entering ( -> no state) or after entering (less waste, leftover state))
* need to work out calling conventions