Pokrewne
- Strona Główna
- iraq book of iraq dodipp intelligence for military personnel
- Borland Delphi 7 Developer's Guide
- borland c unleashed
- 2 Helion RS 232C Praktyczne programowanie Od Pascala i C do Delphi i Buildera
- C Builder 5 Ćwiczenia praktyczne
- Brenner Mayer Alan Zaklecie katastrofy
- Barker Clive Wielkie sekretne widowisko (SCA
- Ruda Aleksandra OdnaleÂźć swą drogę
- Zimmer Bradley Marion Mgly Avalonu
- Cammilleri Rino Inkwizytor (2)
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- fopke.keep.pl
[ Pobierz całość w formacie PDF ]
.Select Run,Parameters, click the Remote tab, and set Remote Path to the remote application sfull path and application filename as you would use locally on that machine, such asC:\Temp\MyProj.exe.If you are debugging a DLL on the remote machine, enter thepath and name of the remote application that will host the DLL.Enter anycommand-line parameters for the application in the Parameters field.Set RemoteHost to the hostname or IP address of the remote machine.04 0672324806 CH02 12/12/02 2:42 PM Page 75Advanced Debugging 75To start debugging immediately, or when you don t have the application projectloaded in C++Builder, just click the Load button.If you have the application projectloaded, you can check Debug Project On Remote Machine and click OK.When youperform any debug command on the application within C++Builder, the debuggingconnection to the remote application will be established.You can then debug theapplication just as if it were running on the local machine.If you get the error Unable to connect to remote host, check that the debug serverservice or process is running, Remote Host is set correctly, and that you have connec-tivity to the remote host using ping.exe or another network tool.If you get the errorCould not find program program , check that Remote Path is correct and that theapplication is actually located there.Another feature of remote debugging is an extension of Attach To Running Process.Select Run, Attach To Process, enter the name of the remote machine in the RemoteMachine field, and press Enter.The processes on the remote machine are listed;select one and click Attach to debug it.To use remote process attachment, theremote machine must be running the debug server.Remember that when attachingto a running process, there is no way to detach without terminating it.Debugging DLLsDebugging a DLL is very similar to debugging any normal executable applicationexcept that a host application is required to load it.You can create the host applica-tion that uses the DLL, but in most cases you will be using an existing host, such asan application written in another language that uses the DLL that you have devel-oped.Load the DLL project into C++Builder and set any breakpoints in the DLL sourcecode as necessary.Specify the host application that will load the DLL by entering thefull path and name of the host application in the Host Application field on the Localtab from the Run, Parameters dialog.Enter any command-line parameters for theapplication in the Parameters field if necessary.When the host application is specified, either select Load to run the host applicationand begin debugging, or simply press OK and run the host application at a later timewith Run, Run.You might do this after setting additional breakpoints or setting upwatches, for example.That s all there is to it.When the breakpoint in the DLL code is hit, you can stepthrough the source code and use the Debug Inspector, watches, or any other tech-nique during the debug process.You can use this technique for debugging COMobjects and ActiveX components, but for separate processes you can do this only onWindows NT and Windows 2000 systems that allow cross-process debugging.04 0672324806 CH02 12/12/02 2:42 PM Page 7676 CHAPTER 2 C++Builder Projects and More on the IDESpeeding Up Compile TimesThe C++Builder compiler is fast! It compiles C++ code almost twice as fast as theGNU C++ compiler and is comparable in speed to the Microsoft Visual C++ compiler.If you ve used Delphi before, and you think that the C++Builder compiler takesmuch longer to compile a similar size application, you re right.The relatively slowcompilation speed of C++ when compared to Delphi s Object Pascal is because ofseveral reasons:" C++ allows for header (include) files, whereas Object Pascal does not.Headerfiles can be nested, and this can set up a lot of complex code to be processed.Asimple 10-line program can be several hundred thousand lines long because ofheader file nesting, which takes up most of the compile time." C++ has macros, whereas Object Pascal does not.Macros require a preprocessorto parse and expand them." C++ has templates, whereas Object Pascal does not.Templates are very complexto analyze." C++ semantics must conform to the ANSI standard.The grammar of C++ issomewhat more complex than that of Delphi, which is based on Pascal, butdeveloped to Borland s standard.In general, C++ provides more flexibility in program design than Delphi s ObjectPascal.However, this comes at the expense of compile time and in some cases codereadability [ Pobierz całość w formacie PDF ]
zanotowane.pl doc.pisz.pl pdf.pisz.pl agnieszka90.opx.pl
.Select Run,Parameters, click the Remote tab, and set Remote Path to the remote application sfull path and application filename as you would use locally on that machine, such asC:\Temp\MyProj.exe.If you are debugging a DLL on the remote machine, enter thepath and name of the remote application that will host the DLL.Enter anycommand-line parameters for the application in the Parameters field.Set RemoteHost to the hostname or IP address of the remote machine.04 0672324806 CH02 12/12/02 2:42 PM Page 75Advanced Debugging 75To start debugging immediately, or when you don t have the application projectloaded in C++Builder, just click the Load button.If you have the application projectloaded, you can check Debug Project On Remote Machine and click OK.When youperform any debug command on the application within C++Builder, the debuggingconnection to the remote application will be established.You can then debug theapplication just as if it were running on the local machine.If you get the error Unable to connect to remote host, check that the debug serverservice or process is running, Remote Host is set correctly, and that you have connec-tivity to the remote host using ping.exe or another network tool.If you get the errorCould not find program program , check that Remote Path is correct and that theapplication is actually located there.Another feature of remote debugging is an extension of Attach To Running Process.Select Run, Attach To Process, enter the name of the remote machine in the RemoteMachine field, and press Enter.The processes on the remote machine are listed;select one and click Attach to debug it.To use remote process attachment, theremote machine must be running the debug server.Remember that when attachingto a running process, there is no way to detach without terminating it.Debugging DLLsDebugging a DLL is very similar to debugging any normal executable applicationexcept that a host application is required to load it.You can create the host applica-tion that uses the DLL, but in most cases you will be using an existing host, such asan application written in another language that uses the DLL that you have devel-oped.Load the DLL project into C++Builder and set any breakpoints in the DLL sourcecode as necessary.Specify the host application that will load the DLL by entering thefull path and name of the host application in the Host Application field on the Localtab from the Run, Parameters dialog.Enter any command-line parameters for theapplication in the Parameters field if necessary.When the host application is specified, either select Load to run the host applicationand begin debugging, or simply press OK and run the host application at a later timewith Run, Run.You might do this after setting additional breakpoints or setting upwatches, for example.That s all there is to it.When the breakpoint in the DLL code is hit, you can stepthrough the source code and use the Debug Inspector, watches, or any other tech-nique during the debug process.You can use this technique for debugging COMobjects and ActiveX components, but for separate processes you can do this only onWindows NT and Windows 2000 systems that allow cross-process debugging.04 0672324806 CH02 12/12/02 2:42 PM Page 7676 CHAPTER 2 C++Builder Projects and More on the IDESpeeding Up Compile TimesThe C++Builder compiler is fast! It compiles C++ code almost twice as fast as theGNU C++ compiler and is comparable in speed to the Microsoft Visual C++ compiler.If you ve used Delphi before, and you think that the C++Builder compiler takesmuch longer to compile a similar size application, you re right.The relatively slowcompilation speed of C++ when compared to Delphi s Object Pascal is because ofseveral reasons:" C++ allows for header (include) files, whereas Object Pascal does not.Headerfiles can be nested, and this can set up a lot of complex code to be processed.Asimple 10-line program can be several hundred thousand lines long because ofheader file nesting, which takes up most of the compile time." C++ has macros, whereas Object Pascal does not.Macros require a preprocessorto parse and expand them." C++ has templates, whereas Object Pascal does not.Templates are very complexto analyze." C++ semantics must conform to the ANSI standard.The grammar of C++ issomewhat more complex than that of Delphi, which is based on Pascal, butdeveloped to Borland s standard.In general, C++ provides more flexibility in program design than Delphi s ObjectPascal.However, this comes at the expense of compile time and in some cases codereadability [ Pobierz całość w formacie PDF ]