/* * FIXME: Decide on the way to request/handle debugging information: * - request the info in bulk for all frames/on demand for individual frames * - request the info from the runtime/request only the il offset, and compute * everything else based on this info using the method debug info. */ internal StackFrame(VirtualMachine vm, long id, ThreadMirror thread, MethodMirror method, int il_offset, StackFrameFlags flags) : base(vm, id) { this.thread = thread; this.method = method; this.il_offset = il_offset; this.flags = flags; }
private string GetFunctionName(int relSubEntryAddr, StackFrameFlags flags) { if (relSubEntryAddr < 0) { return("[bottom of stack]"); } string funcName = ""; //TODO LABELS /*CodeLabel label = absSubEntryAddr >= 0 ? LabelManager.GetLabel((UInt32)absSubEntryAddr, AddressType.PrgRom) : null; * if(label != null) { * funcName = label.Label + (relSubEntryAddr >= 0 ? (" ($" + relSubEntryAddr.ToString("X6") + ")") : ""); * } else { * funcName = (relSubEntryAddr >= 0 ? ("$" + relSubEntryAddr.ToString("X6")) : "n/a"); * }*/ if (flags == StackFrameFlags.Nmi) { funcName = "[nmi] "; } else if (flags == StackFrameFlags.Irq) { funcName = "[irq] "; } funcName += "$" + relSubEntryAddr.ToString(_format); return(funcName); }
private string GetFunctionName(int relSubEntryAddr, StackFrameFlags flags) { if (relSubEntryAddr < 0) { return("[bottom of stack]"); } CodeLabel label = relSubEntryAddr >= 0 ? LabelManager.GetLabel(new AddressInfo() { Address = relSubEntryAddr, Type = _cpuType.ToMemoryType() }) : null; if (label != null) { return(label.Label + " ($" + relSubEntryAddr.ToString(_format) + ")"); } else if (flags == StackFrameFlags.Nmi) { return("[nmi] $" + relSubEntryAddr.ToString(_format)); } else if (flags == StackFrameFlags.Irq) { return("[irq] $" + relSubEntryAddr.ToString(_format)); } return("$" + relSubEntryAddr.ToString(_format)); }