Frame

Represents a stack frame

Members

Functions

print
void print(ResultPrinter printer)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

address
string address;
file
string file;
index
int index;
invalid
bool invalid;
line
int line;
moduleName
string moduleName;
name
string name;
offset
string offset;
raw
string raw;

Examples

The frame should convert a frame to string

Frame(10, "some.module", "0xffffff", "name", "offset", "file.d", 120).toString.should.equal(
  `10  0xffffff name at some.module + offset (file.d:120)`
);

The frame should not output an index < 0 or a line < 0

Frame(-1, "some.module", "0xffffff", "name", "offset", "file.d", -1).toString.should.equal(
  `0xffffff name at some.module + offset (file.d)`
);

The frame should not output the file if it is missing from the stack

Frame(-1, "some.module", "0xffffff", "name", "offset", "", 10).toString.should.equal(
  `0xffffff name at some.module + offset`
);

The frame should not output the module if it is missing from the stack

Frame(-1, "", "0xffffff", "name", "offset", "", 10).toString.should.equal(
  `0xffffff name + offset`
);

The frame should not output the offset if it is missing from the stack

Frame(-1, "", "0xffffff", "name", "", "", 10).toString.should.equal(
  `0xffffff name`
);

The frame should display ???? when the name is missing

Frame(-1, "", "0xffffff", "", "", "", 10).toString.should.equal(
  `0xffffff ????`
);

Meta