3GL   4GL   5GL  

Visual C++

  1. Windows-
  2. .
  3. Watch
  4. Set Next Statement.
  5. Visual Basic

, C++, Microsoft Visual Basic Java, . Microsoft Visual C++ . Visual C++ . , Visual C++. Visual C++ ( Disassembly, ). , , . , . 6 Disassembly, , Visual C++.

, Visual C++, MSDN Microsoft Visual Studio. . MSDN : "m Page: Debugger" ( : ) .

 

Visual C++ ( Win32 Debug Win32 Unicode Debug) : , , , Insert/Remove Breakpoint

Buid BuildMiniBar Visual C++.

1 () . , .

. "" , , , , , , . . , , , . . , , , . (location breakpoint) : 99,46 .

, . , for, 10 000 , ? -, ( 10 000 Go), -, . , 9 999 .

  (location breakpoint). , Microsoft Visual . .

  . .

, . . , , . , :

, , , , .

 

. , Breakpoints . , . 5-1 ( " " ) AdvancedBP, . -, Visual Studio .

. (), , ( ), , Windows-, . (scope) . .

( ) , :

{[], [ ], [ ]}

  .. . . .

, . . , , Breakpoints. , , 20 TEST.CPP, Breakpoints :

{,TEST.CPP,}.20

 . Breakpoints Breakpoints, Edit|Breakpoints. .

. : CheckMyMem A.DLL B.DLL . , DLL. .DLL . checkMyMem ( {,CHECKMYMEM.CPP, } .27), DLL, , .DLL. , B.DLL, : {, CHECKMYMEM.CPP, .DLL}.27. Break At Location Breakpoints ( Edit|Breakpoints <Alt>+ +<F9>) Visual C++; Advanced Breakpoint, . 5.1. Break at ( Breakpoints), . Advanced Context Advanced Breakpoint .

, () , , Windows-, . -- , ( ). . , ( ), Break at Breakpoints. , AdvancedBP. (mainCRTStartup) 0x401210 , . , .

. 5.1. Advanced Breakpoint

 

, Visual C++ . , , Break at. , . , , . ++- . , coiaiog MFC, coialog: :0nOk.

, (overloaded) , . , MFC- Break at cstring: :cstring , , , cstring Symbols Resolve Ambiguity, . 5.2. ( ) cstring, .

. 5.2. Resolve Ambiguity

, operator- , , Resolve Ambiguity. , MFC- cstring , Resolve Ambiguity, Break at cstring: :operator= (operator- cstring). , Break at ( ). , CString: :operator= CString: :operator=(const char *) Resolve Ambiguity.

 

. , DLL, . , , . , : , DLL. , DLL- Microsoft Windows 2000. "--" ( 4) , Windows 98, 2 . Windows 2000, COFF (. 4) . , IDE Visual C++, , Debug Options ( Tools|Options) Load COFF & Exports.

, DLL, LoadLibrary KERNEL32.DLL. , , , {,,KERNEL32.DLL} . Visual C++ , . , (PDB), , , 1, COFF/DBG-, (public) 2. COFF/DBG- , . , DLL, Debug Output. Output "Loaded symbols for 'DLL name" ( ' DLL'), DLL. , "Loaded 'DLL name, no matching symbolic information found" ( ' DLL', ) "Loaded exports for 'DLL name " ( ' DLL"), .

, , Windows 2000 . , (public) . , , , , Disassembly. , , (Service Pack) . Windows 2000 - Customer Support Diagnostics ( ). Visual Studio Windows NT 4 Windows NT Symbols Setup, .

  . .

  . .

  Output Microsoft Visual C++ VievjOutput <Alt>+<2>. - .

, , DLL. , DUMPBIN /EXPORTS:

DOMPBIN /EXPORTS DLL-Name

DUMPBIN KERNEL32.DLL, LoadLibrary, LoadLibraryA LoadLibraryw. : ANSI (American National Standards Institute), a w wide ( Unicode). Windows 2000 Unicode . UNICODE, LoadLibraryw, , LoadLibraryA. LoadLibraryA , ANSI- Unicode LoadLibraryw, LoadLibraryw. , , . , . , LoadLibrary : (,,KERNEL32.DLL}LoadLibraryA, : {,,KERNEL32.DLL)LoadLibraryw.

Windows 2000, Unicode. . ( 1997 ) "Under the Hood" Microsoft Systems Journal , ANSI- . , Unicode .

, , . . 6. LoadLibrary WINBASE.H , :

_declspec (dllimport) 

HMODULE 

_stdcall

  LoadLibraryA(

LPCSTR IpLibFileName 

);

WINBASEAPI _stdcall, , , API-. "@", , . , : , . CPU Intel Pentium 4. LoadLibrary, , : _LoadLibraryA@4. , , :

, "@#" ( , TISAIIOC maiito:_TlsAiioc@o). , ANSI- Unicode- . , LoadLibrary : {, ,KERNEL32.DLL}_LoadLibraryA@4, : {,, KERNEL32. DLL}_LoadLibraryW@4.

 

, (location) . , , , "" . "" : , .

(Tll) (skip count). , , (. . ) . .

. Breakpoints. Breakpoints, Condition. Breakpoint Condition .

, , , , . , , , , - . , . , Breakpoints , Breakpoints1. ( ). Breakpoints, . 5.3, . , , . , , . .

. 5.3.

. , , , true. , . , Tll.

  Breakpoints .

  , Breakpoints, Condition ( Enter the expression to be evaluated) Breakpoint Condition. :

"", , . .

. , , . , Visual C++ , Windows 2000, @TI= TIB, . , @IB Watch , . , , Threads . , , @1 , Ox7FFDEOOO, : @TIB == Ox7FFDEOOO. Windows 98 FS, , @FS == (thread specific value).

, (last error code), @ERR. , API-, , Platform SDK, ERROR_FILE_NOT_FOUND, : @ERR==2. ERROR_FILE_NOT_FOUND WINERROR.H. . 5.1.

, - , () .

 TIB Thread Information Block, . .

, , , :

(szBuff[0] = '')-&& (szBuff [l] = 'a'j&& (SzBuff [2] == 'm').

: . , n- true ( ).

5.1. Watch

©ERR

; API- GetLastError

©TIB

; , FS:0

©CLK

; Watch

@, @, ©, @EDX, ©ESI, ©EDI, ©EIP, ©ESP, ©EBP, ©EFL

Intel CPU

@CS, @DS, @ES, @SS, @FS, ©GS

Intel CPU

©STO, ©ST1, @ST2, ©ST3, ©ST4, ©ST5, ©ST6, ©ST7

Intel CPU

. , . , , (. . ). , , , , , . . , .

, Breakpoint Condition . - , (Enter the expression to be evaluated), , . Breakpoint Condition ( Enter the number of elements to watch in an array or structure) , . , , , , *pMyData, .

  , , , Edit|Breakpoints, Breakpoints Break at Location ( ""), (, .47), Condition ( Break at). .

  Enter the expression to be evaluated pMyData ( ), , , . .

 

 

(location breakpoints) . ( ): (expression breakpoints), (variable breakpoints) Windows- (Windows message breakpoints). , , (scope) . , . latel CPU CPU.

1, 2 4 . , , , , , . , . , .

, ( Enter the expression to be evaluated Data Breakpoints) . AdvancedBP, 5-1, , , " g_szGiobai "G". g_szciobai ( 0x00404594) ( Enter the expression to be evaluated Data Breakpoints) :

Mchar*) Ox00404594='G'

:

WO (0x00404594) =='G'

, , . .

/*00*/ ttinclude <windows.h>

/*004*/ void LocBPFunc ( void)

/*005*/ { // {,AdvancedBP.cpp,}.6

/*006V printf ( "Hello from LocBPFuncW) ;

/*007*/ }

/*008*/ void SkipLocBPFunc ( void)

/*009*/ { // {,AdvancedBP.cpp,}.12 skip 99 times(s)

/*010*/ for ( int i = 0; i < 100; i++)

/*011*/ {

/*012*/ printf ( "SkipLocBPFunc iteration = %d\n", i);

/*013*/ }

/*014*/ }

/*015*/ void ExprTrueLocBP ( void)

/*016*/ { // {,AdvancedBP.cpp, } .20 when 'j=8'

/*017*/ int j = 0;

/*018*/ for ( int i = 0; i < 10; i++)

/*019*/ {

/*020*/ j = i * 2;

/*021*/ }

/*022*/ }

/*023*/ void DataChangeLocBP ( void)

/*024*/.{ // {,AdvancedBP.cpp,}.26 szBuff[5](length:1)

/*025*/ char szBuff[ 10 ];

/*026*/ strcpy ( szBuff, "String!");

/*027*/ }

/*028*/ char g_szGlobal[ 10 ];

/*029*/ int g_ilnt = 0;

/*030*/ void main ( void)

/*031*/ { // 0x401210 -> - jmainCRTStartup

/*032*/ LocBPFunc ();

/*0*/ SkipLocBPFunc ();

/*034*/ ExprTrueLocBP ();

/*035*/ DataChangeLocBP ();

/*036*/

/*037*/ //{,,KERNEL32.DLL}_LoadLibraryA@4 <-

/*038*/ //{,,KERNEL32.DLL}LoadLibrary <-

/*039*/ LoadLibrary ( "KERNEL32.DLL");

/*040*/

/*041*/ // (char)Ox00404594=='G' <- .

/*042*/ strcpy ( g_szGlobal, "Global!");

/*043*/

/*044*/ // (long)4045 <- .

/*045*/ g_ilnt = 0x42;

/*046*/

/*047*/ printf ( "Done!\n");

. 5.4 Edit|Breakpoints, Breakpoints, AdvancedBP . : , ( ).

, , , 1. , . , AdvancedBP *(char*)Ox00404594=='G' , , ( "G").   long, .. "* (long*) (0x00404594) " (. 044). , . , long ( Enter the number of elements to watch in an array or structure Data Breakpoints) 1.   , (DWORD), - , , .

. 5.4. AdvancedBP /

, , . , , .

, (wild writes). 2, ,   , .

  , , , Edit|Breakpoints, Breakpoints Break at Location ( ""), (, .47), Condition ( Break at). .

  Enter the expression to be evaluated pMyData ( ), , , . .

  . , . . , (. . ), . , , ( ) .

 

Windows-

Windows- (Windows message breakpoints) , Windows-. Messages Breakpoints (. 5.5). , SDK1 , , , Break at WndProc . :

1. Break at WndProc .

2. Set one breakpoint for each message to watch , .

3. .

Set one breakpoint for each message to watch , .

Windows- ++-, MFC, Windows-. MFC: {, ,MFC42D.DLL}AfxWndProc, . . Windows-, ( cwnd), AfxWndProc .

1 SDK (Software Development Kit) . .

, , MFC- cwnd: :WindowProc. this-- , WINUSER.H Windows-, . cwnd: :WindowProc. Visual C++ 6.0 Service Pack 3, WM_PAINT , :

{,WINCORE.CPP,}.1584 when (this=Ox0012FE74)&&(message==OxF)

. 5.5. Messages Windows-

"this. ..&&.. .message" , this, , , . , ( Class Wizard) ( ) .

. AdvancedBP , Windows-. ( Breakpoints). . , , !

?

(IDE) Visual C++, . IDE, , :

One or more breakpoints are not positioned on valid lines. These breakpoints have been moved to the next valid line.

( . ).

, - , , , ( ).

, :

One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program.

( . .)

, , Breakpoints . - .

DLL . . DLL, API- LoadLibrary. DLL- () , . , DLL DLL ( DLL). Project Settings Debug Additional DLLs Category. Modules DLL, - .

, . , , , .

Project|Settings Microsoft Visual C++. .

 

, , Visual C++ . , () , () , TCP/IP1. Visual C++ , () . , ( GUI-):

  ( ). Windows- WM_SETFOCUS , . GUI- , , , ! , , .

, . , , . , , Microsoft DirectX2, .

 TCP/IP Transmission Control Protocol/Internet Protocol ( / ). .

  DirectX . Windows . .

. GUI- . Visual C++, , . . . , .

, : , Windows 98. , . , Visual C++ Windows 2000, Windows 2000 , , a Windows 98 , .

, : , , , , DLL. IDE Visual C++ DLL, . , , .

Visual Studio. MSDN "Debugging Remote Applications" ( ).

, . , , , . . 5.2.

5.2. , , Visual C++

Visual C++

MSVCMON.EXE, TLNOT.DLL, DM.DLL, MSDIS110.DLL

<VS Common>\MSDEV98\BIN

MSVCRT.DLL, MSVCP60.DLL

%SYSTEMROOT%\System32

PSAPI.DLL ( Windows 2000)

%SYSTEMROOT%\System32

, -, , , , , . , (shared) , . : , ; . -, , , . - , . . -, , , , ( ).

MSVCMON.EXE , . Settings, , , . . MSVCMON.EXE - . MSVCMON.EXE, , . () Remote Executable Path and File Name Debug Project Settings. , . MSVCMON.EXE, , .

Go, , , , . , DLL ( , - ). DLL, . , DLL, , - . , - , , - . , .

, , pcAnywhere Symantec, , . , . , , . , , !

, , . -, , IDE Visual C++ . , , , . -, , , TCP/IP, . WinDBG, , - .

 

, .

, , . , Disassembly, , Call Stack (. . )? , Call Stack . Call Stack , , Insert/Remove Breakpoint ( , ).

, . Disable Breakpoint, Breakpoints Breakpoints . , , , . , , , . | .

Step Into, , , . Resolve Ambiguity , .

 

Watch

Watch Visual C++. Watch . - , . , " , . . Watch , , , Watch.

Watch, , . 5.3 5.4, Visual C++ MSDN. . - hr. Watch @,hr, - (@ Intel CPU, ). .

5.3. Watch





d, i


(int)OxFOOOF065,d

-268373915

u


0x0065, u

101



OxF065,o

0170145

, X


61541, X

OxOOOOF065

1 , h

long short d, i, u, , , X

0x00406042, hx

OxOc22

£


3./2.,f

1.500000



3./2,

1.500000e+000

g

, ,

3./2,g

1.5



0x0065,

'e1

s


szHiWorld, s

"Hello world"

su

Unicode

szWHiWorld, su

"Hello world"

st

Unicode ANSI, AUTOEXP.DAT



hr

HRESULT Win32

0x00000000, hr

S_OK

we

. Windows

0x00000040, we

WC_

DEFAULTCHAR (,

Visual C++ 6)

wm

Windows-

0x0010, wm

WM_CLOSE

5.4. Watch





m

64 ASCII

Ox0012ffac,ma

0x001 2ffac .4.0.".OW&.

.1W&.0.:W.1 .."1.JO&.12.

."1..0y.1

m

16 (-), 16 ASCII

Ox0012ffac,m

0x001 2ffac

  34 cb 00 84 30 94 80 ff                  22 8 30 57 26 00               00 .4...0...".OW&..

rob

16 (-), 16 ASCII

Ox0012ffac,mb

0x001 2ffac 34 cb 00 84        30 94 80 ff 22 8a 30 57          26 00 00 A..O...".OW&..

mw

8

Ox0012ffac,mw

0x001 2ffac 34b3 OOcb 3084         8094 22ff 308a 2657 0000

md

4

Ox0012ffac,md

0x001 2ffac 34 80943084 308a22ff 00002657

mq

4

Ox0012ffac,mq

0x001 2ffac 8094308400cb34b3 00002657308a22ff

mu

2- (Unicode)

Ox0012ffac,mu

0x001 2ffac

34 OOcb 3084 8094 22ff 308a 2657 0000 7 99797

#

( ). ( )

pCharArray, 10

10 ( + /-)

, . 10 (long int), Watch . , , . . , (pLong, 10) 10 . , , , . , (pBigArray+100) ,20 Watch 20 99. : 0, . pBigArray , .0, 100- , 101- . .

, Watch . , , BY, WO DW. (&) (*). . Watch , , " " . , , Watch, QuickWatch.

, Watch , . , , . Watch if . Watch , . , . , Watch. - Watch , . Watch.

Watch

Watch . @CLK. , @CLK . , . , ( Watch) @CLK: "@CLK" "@CLK=0". ( 0) , . , , @CLK @CLK/1000,d. ,d , , Watch (Hexadecimal Display). @CLK , .

Watch

: Watch . : " ?" , . , 10 ( ), , , Watch, (, ).

, , Watch. , , Watch, . Watch , -, . Watch Immediate IDE Microsoft Visual Basic.

, , Visual C++, , . , void MyMemCheck (), Watch MyMemCheck (). , , 1. , Watch.

Watch . , . : Watch, . , Watch, . ( ), . : 20 ; , . : . , OutputDebugstring printf. , , API- Windows.

  . .

, , Watch . :

: , Watch. . , . , , , , , . , , , , , , , Watch, . , - . Watch , , .

Visual C++ , , Watch, , QuickWatch DataTips. , , , cobject RECT, Watch. , , Watch . AUTOEXP.DAT Microsoft Visual Studio\Common\MSDev98\Bin. .

  PROCESS_INFORMATION, API- createProcess. , Visual C++ . PROCESS_INFORMATION Watch, Properties . Program Variable Properties () _PROCESS_INFORMATION, , , , .

typedef struct _PROCESS_INFORMATION {

HANDLE hProcess;

HANDLE hThread;

DWORD dwProcessId;

DWORD dwThreadld;

 } PROCESS_INFORMATION

AUTOEXP.DAT , :

= []<[,]>....

. 5.5 . , .

5.5. AUTOEXP.DAT

. , "<*>",

. , ,

, Watch. (, , ).

-. , , . 5.3

PROCESS_INFORMATION hProcess hThread, :

_PROCESS_INFORMATION=hProcess=<hProcess,> hThread=<hThread,X>

, , .

AUTOEXP.DAT <,t>. ( ) . , , , , . <, t> .

 

Set Next Statement

Set Next Statement. , Disassembly ( ), , . Set Next Statement (), . . . EIP. , .

, , . , Set Next Statement . Set Next Statement Disassembly. , . , , Set Next Statement. 6 .

, , . , (step over). , Set Next Statement, , , , . , . , , , , . Set Next Statement , .

, Set Next Statement . , , . , if- , , . , , Set Next Statement, , . Set Next Statement, (one-shot) Run To Cursor, Debug. Run To Cursor. Set Next Statement ( ). . , Set Next Statement ( , ). Set Next Statement , .

 

Visual Basic

Visual Basic - ( ). Visual Basic , -, , Visual Basic, . , . Visual C++, , SmartCheck Compuware NuMega, Visual Basic. SmartCheck , Visual Basic , , Visual C++. SmartCheck Visual , , . , Outputoebugstring. Visual Basic . , , . 6 .

Visual Basic , ( ) PDB-. Compile Project Properties. No Optimizations. , .

Variables Visual C++, Locals. Visual Basic , unnamed_vari. , .

Visual Basic, , "Floating-point inexact result" ( ). , , . , , Visual Basic (SEH). , EXCEPTION_FLT_INEXACT_RESULT,   , .

, , ActiveX, Visual Basic Visual C++. ActiveX - . - .

Visual C++ , . : , , . , , .

, , . , . , , : , . , . , . , - . , .

, . , , , , , , Windows 98 .

, Visual C++. Watch . , Watch , . Watch . , . , , .

        3GL   4GL   5GL  

, - , , , . , , , . , , , . , , . , , , . , , , .




 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 -> - _.
Bourabai Research -  XXI Bourabai Research Institution