Exemple #1
0
        //todo

        /*
         * public NativeContext ExceptionStreamThreadContext()
         * {
         *  NativeMethods.MINIDUMP_EXCEPTION_STREAM es = GetExceptionStream();
         *  return GetThreadContext(es.ThreadContext);
         * }
         */

        /// <summary>
        /// Lookup the first module in the target with a matching.
        /// </summary>
        /// <param name="nameModule">The name can either be a matching full name, or just shortname</param>
        /// <returns>The first DumpModule that has a matching name. </returns>
        public DumpModule LookupModule(string nameModule)
        {
            MINIDUMP_MODULE_LIST list = GetModuleList();
            uint num = list.Count;

            for (uint i = 0; i < num; i++)
            {
                MINIDUMP_MODULE module = list.GetElement(i);
                RVA             rva    = module.ModuleNameRva;

                DumpPointer ptr = TranslateRVA(rva);

                string name = GetString(ptr);
                if (nameModule == name ||
                    name.EndsWith(nameModule))
                {
                    return(new DumpModule(this, module));
                }
            }

            return(null);
        }
Exemple #2
0
 /// <summary>
 /// Translates from an RVA to Dump Pointer.
 /// </summary>
 /// <param name="rva">RVA within the dump</param>
 /// <returns>DumpPointer representing RVA.</returns>
 protected internal DumpPointer TranslateRVA(RVA rva)
 {
     return(_base.Adjust(rva.Value));
 }
Exemple #3
0
        /// <summary>
        /// Gets a MINIDUMP_STRING at the given RVA as an System.String.
        /// </summary>
        /// <param name="rva">RVA of MINIDUMP_STRING</param>
        /// <returns>System.String representing contents of MINIDUMP_STRING at the given RVA</returns>
        protected internal string GetString(RVA rva)
        {
            DumpPointer p = TranslateRVA(rva);

            return(GetString(p));
        }