Skip to content

adreuter/tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Memory Tutor

Setup

This tool requires python3 and the Flask webframework. Furthermore clang-15 is required as a dependency.

Running the Flask app in debug mode

Go into the app folder and run

. venv/bin/activate

to activate the environment. Now you can run the application using

flask run --host=<host-ip-address>

The last step is to set the correct host address inside app/static/js/index.js

Memory layout input syntax

Virtual tables

  • off(number) for offset
  • vptr(number) for virtual table pointer destinations
  • RTTI for return type information
  • method signatures

Record layout

  • hasVptr indicates if the record has a virtual table pointer
  • members contains all members of a record
  • bases and virtual-bases contain the (virtual) bases of a record

Example:

{
    "hasVptr": true,
    "members": {
        "a": "int"
    }
    "bases": {
        "A": {
            ...
        }
    }
    "virtual-bases": {
        ...
    }
}

The outermost curly braces are omitted.

About

A web-based tutor for teaching and visualizing memory layout of C++ objects

Resources

Stars

Watchers

Forks