shithub: mc

ref: b5ddbc86346fddc60360a817ee62bc8ca938973e
dir: /support/acid/myr/

View raw version
// acid support for Myrddin.

// Myrddin doesn't use the Plan 9 ABI, so we
// define our own stack function.
defn myrstk()
{
	local b

	line = pcline(*SP);
	file = pcfile(*SP);
	func = fmt(*(*BP + 8), 'a');
	print(file, ":", line, ":\t", func, "\n");

	b = *BP;
	while *b do {
		line = pcline(*(b + 8));
		file = pcfile(*(b + 8));
		func = fmt(*(b + 8), 'a');
		print(file, ":", line, ":\t", func, "\n");
		b = *b;
	}
}