} // end property Module private static DbgEngDebugger _GetDebugger(DbgSymbolGroup symGroup) { if (null == symGroup) { throw new ArgumentNullException("symGroup"); } return(symGroup.Debugger); } // end _GetDebugger()
} // end WireUpChildren() /// <summary> /// Creates a new DbgLocalSymbol object. /// </summary> internal DbgLocalSymbol(DbgSymbolGroup symGroup, uint idx, string name, DEBUG_SYMBOL_PARAMETERS symParams, DEBUG_SYMBOL_ENTRY?dse, DbgTarget target) : base(_GetDebugger(symGroup), name, target) { if (null == symGroup) { throw new ArgumentNullException("symGroup"); } m_symGroup = symGroup; m_idx = idx; m_nativeParams = symParams; m_dse = dse; m_metaDataUnavailable = (null == dse); if (!m_metaDataUnavailable && DbgTypeInfo.IsDbgGeneratedType(m_dse.Value.TypeId)) { // HACK HACKALERT WORKAROUND // // This is a workaround for the fact that we can't get at the type // information that the debugger generates. It tends to do this to create // pointer types, pointing to UDTs (not sure why the pointer types don't // exist in the PDB). // // It of course knows what the pointee type is, but it isn't exposed in // any way. I'd like to add a new IDebugAdvancedN::Request request to grab // it out, but until I get to that, I'll cheat and parse it out of some // string output. // // I don't know how robust this is, because I've rarely seen it (only once // with this code). // _GenerateSyntheticTypeToMatchDbgEngGeneratedType(name, Debugger, m_dse.Value); } // end if( it's a debugger-generated type ) m_pointerAdjustment = 0; if (0 == Util.Strcmp_OI(name, "this")) { try { ulong displacementDontCare; var sym = Debugger.GetSymbolByAddress(symGroup.Frame.InstructionPointer, out displacementDontCare); var ftti = sym.Type as DbgFunctionTypeTypeInfo; Util.Assert(null != ftti); // if we made it this far, we should have the right type m_pointerAdjustment = ftti.ThisAdjust; } catch (DbgEngException dee) { LogManager.Trace("Could not get thisadjust: {0}", Util.GetExceptionMessages(dee)); } } } // end constructor