, , . ? (Chris Sells) : " , ". , , . , , .
, -, , , Dr. Watson. ( ). , . . - CrashFinder, -.
, , 2. (release builds) - . , (DLL). , , , , .
, - . : - , . CrashFinder , -, ( ) (DLL, OCX . .). , - , , -.
- , Microsoft Visual C++, Microsoft Visual Basic. Visual C++ Link Project Settings Project Options /MAPINFO: EXPORTS /MAPINFO:LINES. Category Debug Generate mapfile.
, , , . - , , , - . Mapfile name $ (OUTDIR) \<>., <> , $ (OOTDIR; NMAKE.EXE, . . 8.1 - MapDLL, -.
- VB- . , , . Visual Basic (LINK.EXE), Visual C++, LINK. " /MAP :<>./: EXPORTS /MAPINFO:LINES", Visual Basic - . Command Prompt, Visual Basic ( LINK VB6.EXE).
, - , . CrashFinder . D , , , . , , 5 Microsoft Visual Studio ( 6), , CrashFinder , (Visual Studio 6). , Microsoft ( ). - .
PDB Program Data Base ( ). .
. 8.1. - Project Settings
, Windows 2005 Visual Studio 11 Service Pack 6, , , , 1999 . , , - Visual Studio 6, - PDB-. - .
- 8-1. - , / (timestamp), , LINK.EXE . , , OBJ- LIB-.
(public) . . -, (static), -. , .
Rva+Base, . . :
10 0001:00000030
, , . , .
, -. , DUMPBIN <EXPORTS<_>.
8-1. MAP-
MapDLL
Timestamp is 37f41936 (Thu Sep 30 22:15:18 1999)
Preferred load address is 03900000
Start Length Name Class
0001:00000000 00001421H .text CODE
0002:00000000 0000012cH .rdata DATA
0002:00000130 00000193H .edata DATA
0003:00000000 00000104H .CRT$XCA DATA
0003:00000104 00000104H .CRT$XCZ DATA
0003:00000208 00000104H .CRT$XIA DATA
0003:0000030 00000104 .CRT$XIZ DATA
0003:00000410 00000176H .data DATA
0003:00000588 00000030H .bss DATA
0004:00000000 00000014H .idata$2 DATA
0004:00000014 00000014H .idata$3 DATA
0004:00000028 00000050H .idata$4 DATA
0004:00000078 00000050H .idata$5 DATA
0004:000000c8 00000179H .idata$6 DATA
Address Publics by Value Rva+Base Lib:0bject
0001:00000030 _DllMain@12 03901030 f MapDLL.obj
0001:0000004 ?MapDLLFunction@@YAHXZ 0390104 f MapDLL.obj
0001:00000076 ?MapDLLHappyFunc@@YAPADPAD@Z 03901076 f MapDLL.obj
0001:000000f6 _printf 039010f6 f MSVCRTD:MSVCRTD.dll
0001:000000fc _chkesp 039010fc f MSVCRTD:MSVCRTD.dll
0001:00000110 _CRT_INIT@12 03901110 f MSVCRTD:crtdll.obj
0001:00000220 _DllMainCRTStartup@12 03901220 f MSVCRTD:crtdll.obj
0001:00000314 _free_dbg 03901314 f MSVCRTD:MSVCRTD.dll
0001:0000031a _initterm 0390131a f MSVCRTD:MSVCRTD.dll
0001:00000320 _onexit 03901320 f
MSVCRTD:atonexit.obj
0001:00000360 __atexit 03901360 f
MSVCRTD:atonexit.obj
0001:00000378 _malloc_dbg 03901378 f MSVCRTD:MSVCRTD.dll
0001:0000037e __dllonexit 0390137e f MSVCRTD:MSVCRTD.dll
0002:0000001c ??_C@_08JKC@crtdll?4c?$AA@ 0390301 MSVCRTDrcrtdll.obj
0003:00000000 __xc_a 03904000
MSVCRTD:cinitexe.obj
0003:00000104 __xc_z 03904104
MSVCRTD:cinitexe.obj
0003:00000208 __xi_a 03904208
MSVCRTD:cinitexe.obj
0003:0000030 __xi_z 0390430
MSVCRTD:cinitexe.obj
0003:0000058 _adjust_fdiv 0390458 <common>
0003:00000598 __onexitend 03904598 <common>
0003:000005a8 __onexitbegin 039045a8 <common>
0003:000005ac _pRawDllMain 039045ac <common>
0004:00000000 _IMPORT_DESCRIPTOR_MSVCRTD 03905000 MSVCRTD:MSVCRTD.dll
0004:00000014 _NULL_IMPORT_DESCRIPTOR 03905014 MSVCRTD:MSVCRTD.dll
0004:00000078 __imp__malloc_dbg 03905078 MSVCRTD:MSVCRTD.dll
0004:0000007 _imp chkesp 0390507 MSVCRTD:MSVCRTD.dll
0004:00000080 imp free_dbg 03905080 MSVCRTD:MSVCRTD.dll
0004:00000084 _imp initterm 03905084 MSVCRTD:MSVCRTD.dll
0004:00000088 _imp_jjrintf 03905088 MSVCRTD:MSVCRTD.dll
0004:0000008 _imp adjust_fdiv 0390508 MSVCRTD:MSVCRTD.dll
0004:00000090 _imp___dllonexit 03905090 MSVCRTD:MSVCRTD.dll
0004:00000094 _imp onexit 93905094 MSVCRTD:MSVCRTD.dll
0004:00000098 \177MSVCRTD_NULL_THUNK_DATA 03905098 MSVCRTD:MSVCRTD.dll
entry point at 0001:00000220
Line numbers for .\Debug\MapDLL.obj(D:\MapFile\MapDLL\MapDLL.cpp)
segment '. text
10 0001:00000030 12 0001:0000003b 19 0001:00000041 20 0001:00000046' 24 0001:0000004c 25 0001:00000050 26 0001:00000067 27 0001:0000006c 35 0001:00000076 36 0001:0000007a 37 0001:0000007f 38 0001:00000096 39 0001:0000009c 40 0001:0000009f 30 0001:000000a9 31 0001:OOOOOOad 32 0001:000000c4
Line numbers for g:\vc\LIB\MSVCRTD.lib(atonexit.c) segment .text
84 0001:00000320 89 0001:00000324 98 0001:0000035b 103 0001:00000360
104 0001:00000363 105 0001:00000376
Line numbers for g:\vc\LIB\MSVCRTD.lib(crtdll.c) segment .text
135 0001:00000110 140 0001:00000114 141 0001:0000011a 142
0001:00000123
143 0001:00000130 147 0001:00000132 156 0001:00000139 164
0001:00000147
170 0001:0000014d 175 0001:00000175 177 0001:0000017 179
0001:00000187
184 0001:00000193 189 0001:OOOOOlaS 192 0001:000001b4 219 0001:OOOOOlbc
220 0001:000001c5 222 0001:000001cd 227 0001:OOOOOlel 228 0001:000001e9
236 0001:000001ee 238 0001:00000202 242 0001:0000020c 243 0001:00,000211
251 0001:00000220 252 0001:00000224 258 0001:0000022b 259 0001:0000023a
261 0001:00000241 263 0001:0000024d 264 0001:00000256 266 0001:0000026b
267 0001:00000271 269 0001:00000285 270 0001:0000028b 273 0001:0000028f
276 0001:000002a3 284 0001:000002af 287 0001:000002be 289 0001:000002ca
290 0001:000002df 292 0001:000002e6 293 0001:000002f5 296 0001:
297 0001:0000030d '
Exports
ordinal name
1 ?MapDLLFunction@@YAHXZ (int_cdecl MapDLLFunction(void))
2 ?MapDLLHappyFunc@@YAPADPAD@Z (char * _cdecl MapDLLHappyFunc(char *))
, - , . , , 0x03901099 MAPDLL.DLL, 8-1.
, - , . . , , "" -.
( , -), Rva+Base , . - , . , 8-1 , (0x3901099), Ox39010F6, , ?MapDLLHappyFunc@@YAPADPAD@z. , , (decorated name) C++. , - | UNDNAME.EXE Platform SDK. , ?MapDLLHappyFunc@@YApADPAD@z MapDLLHappyFunc, , , , . C++ , . :
(crash address) (preferred load address) 0x1000
, , . , , , 0x1000? , . , 0x1000 .
- . Portable Executable, ( ) . .
, -, . LINK.EXE Rva+Base , , .
, -, , . , , . :
0x03901099 - 0x03900000 - 0x1000 = 0x99
8-1 , 0001:00000099 38 ( 0001:00000096), . . 38 MAPDLL.CPP.
- , Visual Basic, , , - ( CrashFinder), , Visual Basic. , Visual Basic . , , VB- , Visual C++, , -.
, - . , , , ( , ). , CrashFinder (, , ). , . , 2, CrashFinder .
CrashFinder 1 PDB-, CrashFinder , . CrashFinder , , CrashFinder, . CrashFinder , , , , , , CrashFinder- . PDB- , CrashFinder, . , , .
(binary images) , -, EXE, DLL, OCX . . .
, CrashFinder-. DLL CrashFinder-, , , . CrashFinder- , , , PDB-.
. 8.2 CrashFinder, . , DLL-. * , () . CrashFinder , . .
CrashFinder-' Add Image Edit. , , CrashFinder - . -, CrashFinder- . CrashFinder DI-, - ( ). DLL-, CrashFinder DLL, . CrashFinder , DLL CrashFinder-. , , CrashFinder- , DLL: 2, DLL .
MDI Multiple-Document Interface ( ). .
. 8.2. CrashFinder
- , , Remove Image Edit. Image Properties Edit. DLL, . , . 5, Windows 2000 . Windows 2000 CrashFinder , .
RaiSon d'etre CrashFinder , , . Find Crash Edit Find Crash, . 8.3. , , Hexadecimal Address Find.
Raison d'etre (.). .
. 8.3. CrashFinder
Find Crash , . . Fn Displacement , Source Displacement . , , , . , CrashFinder , () . C++ this, 0x00000001. , , CrashFinder.
CrashFinder MFC- (. . Microsoft Foundation Class), . CrashFinder ( , , " CrashFinder?" ), . -, , CrashFinder, -, , CrashFinder, , , .
CrashFinder DBGHELP.DLL, 4. , , SYMOPT_LOAD_LINES symsetoptions. DBGHELP.DLL , .
CrashFinder , , ccrashFinderDoc. csyinboiEngine, (). ccrashFinderDoc:: LoadAndShowimage 8-2. , , , . , . CcrashFinderDoc: :LoadAndShowimage, , CrashFinder , , .
8-2. CcrashFinderDoc: :LoadAndShowimage
BOOL CcrashFinderDoc :: LoadAndShowimage ( CBinaryImage * plmage,
BOOL bModifiesDoc)
{
// .
ASSERT ( this);
ASSERT ( NULL != m_pcTreeControl);
// ,
CString sMsg ;
//
int iState = STATEJSIOTVALID;
//
BOOL bRet ;
// , .
ASSERT ( NULL != plmage);
if ( NULL == plmage)
{
// ,
return ( FALSE);
}
// , . , ,
//
// . ,
// , . .
// .
// ,
// ,
if ( TRUE == p!mage->IsValidImage ())
{
// ,
// :
// 1. . ,
// .
// 2. ,
// . ,
// Properties ,
// .
// 3. (-), plmage
// .
// ,
// plmage .
BOOL bValid = TRUE;
int iCount = m_cDataArray.GetSize ();
for ( int i = 0; i < iCount; i++)
{
CBinaryImage * pTemp = (CBinaryImage *)m_cDataArray[ i ];
ASSERT ( NULL != pTemp);
if ( NULL = pTemp)
{
// !
return ( FALSE);
}
// Cstring-?
if ( pImage->GetFullName = pTemp->GetFullName ())
{
// !!
sMsg.FormatMessage ( IDS_DUPLICATEFILE,
pTemp->GetFullName () );
AfxMessageBox ( sMsg);
return ( FALSE);
}
// ,
// , |
// , -
// . ,
// ..
// , . .
// ,
// .
if ( TRUE == pTemp.->IsValidIinage ( FALSE) )
{
// , -.
if ( 0 == ( IMAGE_FILE_DLL &
pTemp->GetCharacteristics ()))
{
if ( 0 = { IMAGE_FILE_DLL &
pImage->GetCharacteristics ()))
{
// !!
SMsg.FormatMessage ( IDS_EXEALREADYINPROJECT,
p!mage->GetFullName (), pTemp->GetFullName () );
AfxMessageBox ( sMsg);
// ,
// "",
// plmage. return ( FALSE);
}
}
// ,
if ( pImage->GetLoadAddress () == pTemp->GetLoadAddress() )
{
sMsg.FormatMessage ( IDS_DUPLICATELOADADDR ,
pImage->GetFullName () ,
pTemp->GetFullName () );
if ( IDYES == AfxMessageBox ( sMsg, MB_YESNO))
{
//
pImage~>SetProperties ();
// ,
//
// .
int iIndex;
if ( TRUE =
IsConflictingLoadAddress (
pImage->GetLoadAddress(),
iIndex ) )
{
sMsg.FormatMessage
( IDS_DUPLICATELOADADDRFINAL,
p!mage->GetFullName () ,
((CBinaryImage*)m_cDataArray[iIndex])->GetFullName());
AfxMessageBox ( sMsg);
// pImage ,
// .
bValid = FALSE;
break;
}
}
else
{
// plmage ,
// .
bValid = FALSE;
break;
}
}
}
}
if ( TRUE = bValid)
{
// ( ,
// ).
iState = STATE_VALIDATED;
}
else
{
iState = STATE_NOTVALID;
}
}
else
{
// .
iState = STATE_NOTVALID;
}
if ( STATE_VALIDATED = iState)
{
// .
bRet =
m_cSymEng.SymLoadModule(NULL ,
(PSTR)(LPCSTR)pImage->GetFullName(),
NULL
pImage->GetLoadAddress () ,
0 );
// . SymLoadModule
// , TRUE.
ASSERT ( FALSE != bRet);
if ( FALSE == bRet)
{
TRACE ( "m_cSymEng.SymLoadModule failed!!\n");
iState = STATE_NOTVALID;
}
else
{
iState STATE_VALIDATED;
}
}
// "Extra Data" plmage
// i
f ( STATEJVALIDATED == iState)
{
pImage->SetExtraData ( TRUE);
}
else
{
pImage->SetExtraData ( FALSE);
}
// .
m_cDataArray.Add ( plmage);
// ?
if ( TRUE == bModifiesDoc)
{
SetModifiedFlag ();
}
CCrashFinderApp * pApp = (CCrashFinderApp*)AfxGetApp ();
ASSERT ( NULL != pApp);
// .
HTREEITEM hltem =
m_pcTreeControl->Insert!tem ( pApp->ShowFullPaths ()
? pImage->GetFullName ()
: pImage->GetName () ,
iState ,
iState );
ASSERT ( NULL != hltem);
// .
//
// , .
bRet = m_pcTreeControl->SetItemData ( hltem, (DWORD)plmage);
ASSERT ( bRet);
// .
bRet = m_pcTreeControl->SelectItem ( hltem);
// Bee OK, Jumpmaster!
return ( bRet);
}
, , CrashFinder. cbinaryimage. cbinaryimage , , , , . 1 cbinaryimage ( ) . ( CrashFinder) , cbinaryimage ( CrashFinder).
CcrashFinderDoc. .
, , CrashFinder, , . CrashFinder , , . , CrashFinder :
, , , . . : -. - , . : , CrashFinder. . CrashFinder , -, -, , , - , .
10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _. 10.11.2021 - 12:36: - Conscience -> . ? - _. 10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _. 10.11.2021 - 12:35: - Ecology -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> . - _. 10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _. 10.11.2021 - 09:18: - New Technologies -> , 5G- - _. 10.11.2021 - 09:18: - Ecology -> - _. 10.11.2021 - 09:16: - Ecology -> - _. 10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _. 10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _. |