home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv4.zip / VACPP / IBMCPP / HELP / CPPDHDI.INF (.txt) < prev    next >
OS/2 Help File  |  1995-04-07  |  55KB  |  1,762 lines

  1.  
  2. ΓòÉΓòÉΓòÉ <hidden> About this Information ΓòÉΓòÉΓòÉ
  3.  
  4. The How Do I... information provides solutions to common tasks that you would 
  5. perform with the various components of VisualAge C++. Before you begin to use 
  6. this information, it would be helpful to understand how to navigate through it: 
  7.  
  8. o Use the Contents and Index facilities to locate topics. 
  9. o Use the Search facility to search the text of this document. 
  10. o Use hypertext links to acquire related information on the current topic. 
  11.   Hypertext links appear in a different color (which you can customize using 
  12.   the OS/2 Scheme Palette). For example, below there are two lists of hypertext 
  13.   links. By double-clicking on the text of the link or by pressing Enter on a 
  14.   highlighted link, you will open a panel of related information. To shift the 
  15.   focus to other links using the keyboard, use the Tab key. 
  16.  
  17. For more information on using this help facility, see: 
  18.  
  19. o How to Use the Contents 
  20. o How to Obtain Additional Information 
  21. o How to Access and Use IPF Facilities 
  22.  
  23. For more information, see: 
  24.  
  25. o Other Information You Might Find Helpful 
  26. o Communicating Your Comments to IBM 
  27. o Notices 
  28. o Trademarks 
  29.  
  30.  
  31. ΓòÉΓòÉΓòÉ <hidden> How to Use the Contents ΓòÉΓòÉΓòÉ
  32.  
  33. The Contents window is the first to appear. Some topics have a plus ( ) icon 
  34. beside them. This icon indicates that additional topics are available. 
  35.  
  36. To expand the Contents if you are using a mouse, click on the plus ( ) icon. If 
  37. you are using the keyboard, use the Up or Down Arrow key to highlight the 
  38. topic, and press the plus (+) key. To see additional topics for a heading with 
  39. a plus ( ) icon, click on the icon or highlight that topic and press the plus 
  40. (+) key. 
  41.  
  42. To view a topic, double-click on the topic (or press the Up or Down Arrow key 
  43. to highlight the topic, and then press the Enter key). 
  44.  
  45.  
  46. ΓòÉΓòÉΓòÉ <hidden> How to Obtain Additional Information ΓòÉΓòÉΓòÉ
  47.  
  48. After you select a topic, the information for that topic appears in a window. 
  49. Highlighted words or phrases indicate that additional information is available. 
  50. Certain words and phrases are highlighted in a different color from the 
  51. surrounding text. These are called hypertext terms. 
  52.  
  53. If you are using a mouse, double-click on the highlighted word. If you are 
  54. using a keyboard, press the Tab key to move to the highlighted word, and then 
  55. press the Enter key. Additional information then appears in a window. 
  56.  
  57.  
  58. ΓòÉΓòÉΓòÉ <hidden> How to Access and Use IPF Facilities ΓòÉΓòÉΓòÉ
  59.  
  60. Several choices are available for managing the information presented in this 
  61. document. There are three PullDown menus: the Services menu, the Options menu, 
  62. and the Help menu. 
  63.  
  64. The actions that are selectable from the Services menu operate on the active 
  65. window currently displayed on the screen. These actions include the following: 
  66.  
  67. Placing Bookmarks 
  68.   You can set a placeholder so you can retrieve information of interest to you. 
  69.  
  70. Searching for Information 
  71.   You can find occurrences of a word or phrase in the current topic, selected 
  72.   topics, or all topics. 
  73.  
  74. Printing Information 
  75.   You can print one or more topics. You can also print a set of topics by first 
  76.   marking the topics in the Contents list. 
  77.  
  78. Copying Information to a File 
  79.   You can copy a topic that you are viewing to the System Clipboard or to a 
  80.   file that you can edit. This method is particularly useful for copying syntax 
  81.   definitions and program samples into the application that you are developing. 
  82.  
  83. Using the actions that are selectable from the Options menu, you can change the 
  84. way your Contents list is displayed. To expand the Contents and show all levels 
  85. for all topics, choose Expand all from the Options PullDown menu. You can also 
  86. press the Ctrl, Shift and * keys together. 
  87.  
  88. The actions that are selectable from the Help menu allow you to select 
  89. different types of help information. 
  90.  
  91. For information about any of the menu choices, highlight the choice in the menu 
  92. and press F1. 
  93.  
  94.  
  95. ΓòÉΓòÉΓòÉ <hidden> Placing Bookmarks ΓòÉΓòÉΓòÉ
  96.  
  97. When you place a bookmark on a topic, it is added to a list of bookmarks you 
  98. have previously set.  You can view the list, and you can remove one or all 
  99. bookmarks from the list.  If you have not set any bookmarks, the list is empty. 
  100.  
  101. To set a bookmark, do the following: 
  102.  
  103.  1. Select a topic from the Contents. 
  104.  2. When that topic appears, select the Bookmark option from the Services menu. 
  105.  3. If you want to change the name used for the bookmark, type the new name in 
  106.     the field. 
  107.  4. Click on the Place radio button (or press the Up or Down Arrow key to 
  108.     select it). 
  109.  5. Click on OK (or select it and press Enter). The bookmark is then added to 
  110.     the bookmark list. 
  111.  
  112.  
  113. ΓòÉΓòÉΓòÉ <hidden> Searching for Information ΓòÉΓòÉΓòÉ
  114.  
  115. You can specify a word or phrase to be searched.  You can also limit the search 
  116. to a set of topics by first marking the topics in the Contents list. 
  117.  
  118. To search for a word or phrase in all topics, do the following: 
  119.  
  120.  1. Select the Search option from the Services menu. 
  121.  2. Type the word or words to be searched for. 
  122.  3. Click on All sections (or press the Up or Down Arrow keys to select it). 
  123.  4. Click on Search (or select it and press Enter) to begin the search. 
  124.  5. The list of topics where the word or phrase appears is displayed. 
  125.  
  126.  
  127. ΓòÉΓòÉΓòÉ <hidden> Printing Information ΓòÉΓòÉΓòÉ
  128.  
  129. You can print one or more topics, the index, or the table of contents.  Make 
  130. sure that your printer is connected to the serial port, configured correctly, 
  131. and ready for input. To print: 
  132.  
  133.  1. Select Print from the Services menu. 
  134.  2. Select what you want to print. Note that the This section and Marked 
  135.     sections choices are only available if you are viewing a topic or if you 
  136.     have marked topics, respectively.  To mark topics in the table of contents, 
  137.     press the Ctrl key and click on the topics, or use the arrow keys. 
  138.  3. Select Print to print what you've chosen on your printer. 
  139.  
  140.  
  141. ΓòÉΓòÉΓòÉ <hidden> Copying Information to a File ΓòÉΓòÉΓòÉ
  142.  
  143. You can copy a topic that you are viewing in two ways: 
  144.  
  145. o Copy copies the topic that you are viewing into the System Clipboard. If you 
  146.   are using a Presentation Manager (PM) editor (for example, the Enhanced 
  147.   Editor) that copies or cuts (or both) to the System Clipboard, and pastes to 
  148.   the System Clipboard, you can easily add the copied information to your 
  149.   program source module. 
  150.  
  151. o Copy to file copies the topic that you are viewing into a temporary file 
  152.   named TEXT.TMP. You can later edit that file by using any editor. TEXT.TMP is 
  153.   placed in the directory where your viewable document resides. 
  154.  
  155. To copy a topic, do the following: 
  156.  
  157.  1. Expand the Contents list and select a topic. 
  158.  2. When the topic appears, select Copy to file from the Services menu. 
  159.  3. The system puts the text pertaining to that topic into the temporary file 
  160.     TEXT.TMP. 
  161.  
  162.  
  163. ΓòÉΓòÉΓòÉ <hidden> Other Information You Might Find Helpful ΓòÉΓòÉΓòÉ
  164.  
  165. The VisualAge C++ provides a number of online guides and references that we 
  166. hope you'll find helpful as you develop applications. This information 
  167. includes: 
  168.  
  169. o User's Guide information provides conceptual and usage information, 
  170. o Reference information is organized for quick access, and 
  171. o How Do I... information gives you specific instructions for performing common 
  172.   tasks. 
  173.  
  174. You can get to this online information from the Information folder inside the 
  175. main product folder. You can also get to it from the Help menu in any of the 
  176. components of the product. 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ <hidden> Communicating Your Comments to IBM ΓòÉΓòÉΓòÉ
  180.  
  181. If there is something you like, or dislike, about this document, please let us 
  182. know. You can use one of the methods listed below to send your comments to IBM. 
  183. Please be sure to include the complete title of the publication that you are 
  184. commenting on. For example, you would refer to the How Do I... information for 
  185. the Browser as: 
  186.   VisualAge C++ Browser: How Do I... for OS/2. 
  187.  
  188. The comments you send should only pertain to the information in this document 
  189. and its presentation. To request additional publications or to ask questions or 
  190. make comments about the functions of IBM products or systems, you should talk 
  191. to your IBM representative or your authorized IBM remarketer. 
  192.  
  193. When you send comments to IBM, you grant IBM a nonexclusive right to use or 
  194. distribute your comments in any way it believes appropriate without incurring 
  195. any obligation to you. 
  196.  
  197. You can send your comments to IBM in the following ways: 
  198.  
  199. o By mail to the following address: 
  200.  
  201.     IBM Canada Ltd. Laboratory
  202.     Information Development
  203.     2G/345/1150/TOR
  204.     1150 EGLINTON AVENUE EAST
  205.     NORTH YORK, ONTARIO
  206.     CANADA M3C 1H7
  207.  
  208. o By FAX to the following number: 
  209.  
  210.    - United States and Canada: (416) 448-6161 
  211.    - Other countries (+1) 416-448-6161 
  212.  
  213. o By electronic mail to one of the following IDs.  Be sure to include your 
  214.   entire network address if you wish to get a reply. 
  215.  
  216.    - Internet: torrcf@vnet.ibm.com 
  217.    - IBMLink: toribm(torrcf) 
  218.    - IBM/PROFS: torolab4(torrcf) 
  219.    - IBMMAIL: ibmmail(caibmwt9) 
  220.  
  221.  
  222. ΓòÉΓòÉΓòÉ <hidden> Notices ΓòÉΓòÉΓòÉ
  223.  
  224. Copyright International Business Machines Corporation, 1995. All rights 
  225. reserved. 
  226.  
  227. Note to U.S. Government Users - Documentation related to restricted rights - 
  228. Use, duplication, or disclosure is subject to restrictions set forth in GSA ADP 
  229. Schedule Contract with IBM Corp. 
  230.  
  231. This edition applies to Version 3.0 of IBM VisualAge C++ for OS/2 (30H1664, 
  232. 30H1665, 30H1666) and to all subsequent releases and modifications until 
  233. otherwise indicated in new editions.  Make sure you are using the correct 
  234. edition for the level of the product. 
  235.  
  236. This publication could include technical inaccuracies or typographical errors. 
  237. Changes are periodically made to the information herein; any such changes will 
  238. be reported in subsequent revisions. 
  239.  
  240. Requests for publications and for technical information about IBM products 
  241. should be made to your IBM Authorized Dealer or your IBM Marketing 
  242. Representative. 
  243.  
  244. When you send information to IBM, you grant IBM a nonexclusive right to use or 
  245. distribute the information in any ways it believes appropriate without 
  246. incurring any obligation to you. 
  247.  
  248. Any reference to an IBM licensed program in this publication is not intended to 
  249. state or imply that only IBM's licensed program may be used. Any functionally 
  250. equivalent product, program, or service that does not infringe any of IBM's 
  251. intellectual property rights may be used instead of the IBM product, program, 
  252. or service. Evaluation and verification of operation in conjunction with other 
  253. products, except  those expressly designated by IBM, is the user's 
  254. responsibility. 
  255.  
  256. IBM may have patents or pending patent applications covering subject matter in 
  257. this document.  The furnishing of this document does not give you any license 
  258. to these patents.  You can send license inquiries, in writing, to the IBM 
  259. Director of Licensing. IBM Corporation, 500 Columbus Avenue, Thornwood, NY, 
  260. 10594, USA. 
  261.  
  262. This publication contains examples of data and reports used in daily business 
  263. operations. To illustrate them as completely as possible, the examples include 
  264. the names of individuals, companies, brands, and products. All of these names 
  265. are fictitious and any similarity to the names and addresses used by an actual 
  266. business enterprise is entirely coincidental. 
  267.  
  268.  
  269. ΓòÉΓòÉΓòÉ <hidden> Trademarks and Service Marks ΓòÉΓòÉΓòÉ
  270.  
  271. The following terms used in this publication are trademarks or service marks of 
  272. IBM Corporation in the United States or other countries: 
  273.  
  274. C/2                      C Set/2 
  275. C Set ++                 Common User Access 
  276. CUA                      IBM 
  277. Operating System/2       OS/2 
  278. Personal System/2        Presentation Manager 
  279. PS/2                     VisualAge 
  280. WorkFrame/2 
  281.  
  282. Other company, product, and service names, which may be denoted by a double 
  283. asterisk(**), may be trademarks or service marks of others. 
  284.  
  285.  
  286. ΓòÉΓòÉΓòÉ 1. Access windows that are hidden or minimized ΓòÉΓòÉΓòÉ
  287.  
  288. To access any debugger window that is already open and hidden or minimized: 
  289.  
  290.  1. Select the Windows menu from any of the debugger windows. 
  291.  
  292.  2. Select the window you want from the list of choices. The window is brought 
  293.     into focus and made the active window. 
  294.  
  295.  
  296. ΓòÉΓòÉΓòÉ 2. Change line colors in a source window ΓòÉΓòÉΓòÉ
  297.  
  298. Use the Source Window Colors window to change the color of lines in a source 
  299. window. 
  300.  
  301. To change the color of the background in the source window: 
  302.  
  303.  1. Select Options  Window settings  Colors from a source window. 
  304.  
  305.  2. Open the OS/2 Color Palette window. 
  306.  
  307.  3. Using the mouse pointer, select a color from the color palette. 
  308.  
  309.  4. Hold down mouse button two and drag the selected color to the Source Window 
  310.     Colors window. 
  311.  
  312.  5. Release mouse button two over the text line that represents the source 
  313.     window area that you want to change. 
  314.  
  315.  6. Select the Apply push button. 
  316.  
  317. To change the color of the foreground in the source window: 
  318.  
  319.  1. Select Options  Window settings  Colors from a source window. 
  320.  
  321.  2. Open the OS/2 Color Palette window. 
  322.  
  323.  3. Using the mouse pointer, select a color from the color palette. 
  324.  
  325.  4. Hold down the Ctrl key and mouse button two and drag the selected color 
  326.     into the Source Window Colors window. 
  327.  
  328.  5. Release the Ctrl key and mouse button two over the text line that 
  329.     represents the source window area that you want to change. 
  330.  
  331.  6. Select the Apply push button. 
  332.  
  333. To change the colors in the other debugger windows, simply drag and drop the 
  334. selected colors directly on the window that you want to change. 
  335.  
  336.  
  337. ΓòÉΓòÉΓòÉ 3. Change the font ΓòÉΓòÉΓòÉ
  338.  
  339. To change the font in the Control or any of the source windows: 
  340.  
  341.  1. Select Options  Window settings  Fonts from the Control window or from a 
  342.     source window. The Font Selection window displays. 
  343.  
  344.  2. Choose the font you want and select the OK push button. 
  345.  
  346. To change the font in the other debugger windows: 
  347.  
  348.  1. Select Options  Fonts. The Font Selection window displays. 
  349.  
  350.  2. Choose the font you want and select the OK push button. 
  351.  
  352.  
  353. ΓòÉΓòÉΓòÉ 4. Change program profiles location ΓòÉΓòÉΓòÉ
  354.  
  355. To change the location where you want program profiles stored: 
  356.  
  357.  1. Select Options  Debugger settings  Program profiles  Change location 
  358.     from the Control window or from a source window. The Change Location window 
  359.     displays. 
  360.  
  361.  2. Type the full path name of the directory where you want the program 
  362.     profiles file stored in the Path entry field. 
  363.  
  364.  3. Select the OK push button. 
  365.  
  366. Note:  Any existing program profiles will be moved to the specified directory. 
  367.  
  368.  
  369. ΓòÉΓòÉΓòÉ 5. Change representation of an expression ΓòÉΓòÉΓòÉ
  370.  
  371. To change the representation of an expression or a variable: 
  372.  
  373.  1. Select the expression or variable that you want to change from any of the 
  374.     monitor windows.  These include the Program Monitor, Private Monitor, and 
  375.     Popup Monitor.  The expression becomes highlighted. 
  376.  
  377.  2. Select Options  Representation. 
  378.  
  379.  3. Select an alternate representation from the choices that are available. The 
  380.     new representation takes effect immediately. 
  381.  
  382. You can change the representation of the value displayed in a monitor to: 
  383.  
  384. o Hexadecimal 
  385. o Decimal 
  386. o String 
  387. o Character 
  388. o Floating-point 
  389. o Hexadecimal pointer 
  390. o Decimal pointer 
  391. o Array. 
  392.  
  393. Note:  The representation you can select varies with the data type being 
  394. displayed. 
  395.  
  396.  
  397. ΓòÉΓòÉΓòÉ 6. Change the Presentation Manager debugging mode ΓòÉΓòÉΓòÉ
  398.  
  399. The PM debugging mode choice allows to set the debugging mode to asynchronous 
  400. or synchronous.  This controls the interaction between the program windows and 
  401. Presentation Manager, while the application has stopped executing. 
  402.  
  403. To change the debugging mode: 
  404.  
  405.  1. Select Options  Debugger settings  PM debugging mode from the Control 
  406.     window or a source window. The PM Debugging Mode window displays. 
  407.  
  408.  2. Select one of the following radio buttons: 
  409.  
  410.    o Synchronous 
  411.    o Asynchronous 
  412.  
  413.  3. Select the other parameters you want from this window. 
  414.  
  415.  4. Select the OK push button. 
  416.  
  417.  
  418. ΓòÉΓòÉΓòÉ <hidden> Asynchronous ΓòÉΓòÉΓòÉ
  419.  
  420. When the debugger is operating in asynchronous mode and the program you are 
  421. debugging is stopped, the debugger immediately responds to messages that have 
  422. been sent to the program being debugged on this program's behalf. The debugger 
  423. answers the messages with a simple default response, freeing up other processes 
  424. to operate while the debugger has control. When you are running the debugger in 
  425. asynchronous mode, other Presentation Manager applications running in the 
  426. system are not blocked when the program being debugged stops. 
  427.  
  428. Warning: Do not operate the debugger in asynchronous mode if the Presentation 
  429. Manager application that you are debugging requires the appropriate response to 
  430. its messages. For example, a dynamic data exchange (DDE) message would require 
  431. the appropriate response. 
  432.  
  433.  
  434. ΓòÉΓòÉΓòÉ 7. Change views ΓòÉΓòÉΓòÉ
  435.  
  436. To select a different view of your program: 
  437.  
  438.  1. Select the View menu from a source window. 
  439.  
  440.  2. Select the view you want. You can view the program as Source, Disassembly, 
  441.     or Mixed 
  442.  
  443. You may also select the View button located in the title bar.  This allows you 
  444. to cycle through the source windows. The order depends on the view priority. 
  445.  
  446.  
  447. ΓòÉΓòÉΓòÉ 8. Check the heap ΓòÉΓòÉΓòÉ
  448.  
  449. This checks all memory blocks allocated or freed by the compiler debug memory 
  450. management functions.  This makes sure that overwriting has not occurred 
  451. outside the bounds of allocated blocks and free memory blocks have not been 
  452. overwritten. 
  453.  
  454. To enable heap check: 
  455.  
  456.  1. Select Run  Check heap when stopping from the Control window or from a 
  457.     source window. 
  458.  
  459.  2. Enable the Check heap when stopping choice. When a check mark symbol 
  460.     displays, heap check is enabled. 
  461.  
  462. When Check heap when stopping choice is enabled, each time the program stops, 
  463. the heap is checked.  For example, stopping at a breakpoint or at the end of a 
  464. step command would cause the heap check to be performed. If a heap error is 
  465. detected, your application terminates. The Termination window displays showing 
  466. the source line number where the application stopped and the heap check was 
  467. performed. 
  468.  
  469. Notes 
  470.  
  471. o For the Check heap when stopping choice to work, you have to compile your 
  472.   application using the Tm+ compiler option. 
  473. o If you enable the Check heap when stopping choice and you run your 
  474.   application to termination and the application contains a heap error, the 
  475.   heap check is not made. To check the heap just before termination, set a 
  476.   breakpoint on the last line of our application. 
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ 9. Close the debugger ΓòÉΓòÉΓòÉ
  480.  
  481. To close the debugger: 
  482.  
  483.  1. Select File  Close debugger from any of the debugger windows. The Close 
  484.     Debugger message box displays. 
  485.  
  486.  2. Select Yes to end the debugging session. 
  487.  
  488. You can also press F3 in any primary debugger window to end the debugging 
  489. session. 
  490.  
  491.  
  492. ΓòÉΓòÉΓòÉ 10. Close the How Do I... information ΓòÉΓòÉΓòÉ
  493.  
  494. To close the How Do I... information: 
  495.  
  496. Mouse Users: 
  497.  
  498. o Click on a How Do I... panel with mouse button 2 (usually the right). 
  499. o Select Exit 
  500.  
  501. Note that this popup menu provides access to the services (such as, search, 
  502. bookmark, copy), options (such as, expand, collapse, index, libraries), and 
  503. help provided for the Information Presentation Facility (IPF). 
  504.  
  505. Keyboard Users: 
  506.  
  507. o Press F3 
  508.  
  509.  
  510. ΓòÉΓòÉΓòÉ 11. Debug child processes ΓòÉΓòÉΓòÉ
  511.  
  512. To debug child processes: 
  513.  
  514.  1. Open the Program Startup window. 
  515.  
  516.  2. Enable the Debug child process(es) check box. When you enable this check 
  517.     box, the Child name(s) entry field becomes active. 
  518.  
  519.  3. Type the name of the child process you want to debug in the Child name(s) 
  520.     entry field. 
  521.  
  522.     You can also select the Child list push button. If you select Child list, 
  523.     the Select Child Process window displays. From this window, select the 
  524.     child process or processes you want to debug. The Program Startup window 
  525.     displays again with the child names displayed in the Child name(s) entry 
  526.     field. 
  527.  
  528. After your program starts running and the selected child process is started by 
  529. OS/2, the debugger begins debugging the child process. 
  530.  
  531.  
  532. ΓòÉΓòÉΓòÉ 12. Delete breakpoints ΓòÉΓòÉΓòÉ
  533.  
  534. To delete all the breakpoints that have been set: 
  535.  
  536.  1. Select Breakpoints  Delete all from the Control window or from a source 
  537.     window. An information box displays for verification to delete all 
  538.     breakpoints. 
  539.  
  540.  2. Select Yes. 
  541.  
  542. You can also select the Delete all choice from the Edit menu in the Breakpoint 
  543. List window. 
  544.  
  545. To delete a simple line breakpoint: 
  546.  
  547.  1. Place your mouse pointer on the line number of the breakpoint you want to 
  548.     delete.  The prefix area displays in red indicating that a breakpoint has 
  549.     been previously set. 
  550.  
  551.  2. Double-click on the red prefix area. The color clears indicating that the 
  552.     breakpoint cleared. 
  553.  
  554. If the prefix area turns gray instead, double-click again to make sure the 
  555. breakpoint clears. 
  556.  
  557. To delete all other breakpoints: 
  558.  
  559.  1. Select Breakpoints  List from the Control window or from a source window. 
  560.     The Breakpoints List window displays. 
  561.  
  562.  2. Select the breakpoint you want to delete. The line becomes highlighted. 
  563.  
  564.  3. Select Edit  Delete. The highlighted breakpoint is deleted. 
  565.  
  566. If the prefix area turns gray instead, double-click again to make sure the 
  567. breakpoint clears. 
  568.  
  569.  
  570. ΓòÉΓòÉΓòÉ 13. Delete program profiles ΓòÉΓòÉΓòÉ
  571.  
  572. To delete program profiles for a program that you have previously debugged: 
  573.  
  574.  1. Select Options  Debugger settings  Program profiles  Delete from the 
  575.     Control window or from a source window. The Delete window displays. 
  576.  
  577.  2. Select the path names of the programs whose program profile you want to 
  578.     delete. 
  579.  
  580.  3. Select the Delete push button. 
  581.  
  582.  
  583. ΓòÉΓòÉΓòÉ 14. Display a list of object files ΓòÉΓòÉΓòÉ
  584.  
  585. The Components pane, which is located in the Control window, shows the 
  586. executable files that are associated with the program you are debugging. 
  587.  
  588. To display a list of object files contained within the executable file: 
  589.  
  590. o Select the plus icon to the left of the executable file name. 
  591.  
  592. To open a source window of an object file: 
  593.  
  594. o Double-click on the object file name. 
  595.  
  596. You can display any component (object or function) by double-clicking on the 
  597. component name or by highlighting the component name and selecting a view from 
  598. the View menu. 
  599.  
  600.  
  601. ΓòÉΓòÉΓòÉ 15. Display functions for a particular thread ΓòÉΓòÉΓòÉ
  602.  
  603. To list the active functions or procedures for a particular thread: 
  604.  
  605. o Select Monitors  Call chain from the Control window or from a source window. 
  606.  
  607. When you select Call chain, the Call Chain window displays. 
  608.  
  609.  
  610. ΓòÉΓòÉΓòÉ 16. Display local variables for the current function ΓòÉΓòÉΓòÉ
  611.  
  612. To show the local variables (static, automatic, and parameters) for a specific 
  613. function: 
  614.  
  615. o Select Monitors  Local variables from the Control window or from a source 
  616.   window. 
  617.  
  618. The local variables display in the Local Variables window. 
  619.  
  620.  
  621. ΓòÉΓòÉΓòÉ 17. Display Presentation Manager messages ΓòÉΓòÉΓòÉ
  622.  
  623. Select Monitors  Message queue monitor from the Control window or from a 
  624. source window. 
  625.  
  626. The Message Queue Monitor window presents formatted messages in a list as they 
  627. occur. Using the message queue monitor, you can control the following: 
  628.  
  629. o How the information displays for each message. 
  630. o How message parameters are formatted. 
  631. o Which messages are monitored. 
  632. o Which windows have their messages monitored. 
  633. o Which message queues have their messages monitored. 
  634. o How the user generated messages display. 
  635.  
  636.  
  637. ΓòÉΓòÉΓòÉ 18. Display specific components ΓòÉΓòÉΓòÉ
  638.  
  639. To specify which components display in the Components list: 
  640.  
  641.  1. Select Options  Debugger settings  Only components with debug data. 
  642.  
  643.  2. Enable the Only components with debug data choice from the Control window 
  644.     or from a source window. 
  645.  
  646. When this choice is enabled, only components compiled and linked with debugging 
  647. data are listed. Otherwise, all components are listed. 
  648.  
  649.  
  650. ΓòÉΓòÉΓòÉ 19. Display the contents of storage ΓòÉΓòÉΓòÉ
  651.  
  652. To display the contents of storage used by your program: 
  653.  
  654. o Select Monitors  Storage from the Control window or from a source window. 
  655.  
  656. To open additional storage windows, repeat the above step. 
  657.  
  658. You can also select the Storage button in the title bar of any of the source 
  659. windows. 
  660.  
  661.  
  662. ΓòÉΓòÉΓòÉ 20. Display the functions for a specific object ΓòÉΓòÉΓòÉ
  663.  
  664. To display a list of functions for a specific object file: 
  665.  
  666. o Select the plus icon to the left of the object file name in the Control 
  667.   window. 
  668.  
  669. To open a source window to a specific function: 
  670.  
  671. o Double-click on the function name. 
  672.  
  673. You can display any component (object or function) by double-clicking on the 
  674. component name that displays in the Components box or by highlighting the 
  675. component name and selecting a view from the View menu. 
  676.  
  677.  
  678. ΓòÉΓòÉΓòÉ 21. Display the registers ΓòÉΓòÉΓòÉ
  679.  
  680. To display the processor and math coprocessor registers: 
  681.  
  682. o Select the Monitors  Registers from the Control window or from a source 
  683.   window. 
  684.  
  685. You can also select the Registers button in the title bar of any of the source 
  686. windows. 
  687.  
  688.  
  689. ΓòÉΓòÉΓòÉ 22. Display the state of a thread ΓòÉΓòÉΓòÉ
  690.  
  691. To display the state of a thread: 
  692.  
  693.  1. Go to the Control window. 
  694.  
  695.  2. Select the plus icon to the left of the thread name. 
  696.  
  697. When a check mark symbol displays, threads are enabled and the debugger allows 
  698. the highlighted thread to execute. 
  699.  
  700. When the check mark symbol does not display, threads are disabled and do not 
  701. execute.  You can also double-click on Enabled to change the thread status to 
  702. Disabled. 
  703.  
  704. You may enable or disable the highlighted thread in the Threads list by 
  705. toggling the Enabled choice from the Run menu in the Control window or from a 
  706. source window. 
  707.  
  708.  
  709. ΓòÉΓòÉΓòÉ 23. Enable threads ΓòÉΓòÉΓòÉ
  710.  
  711. To enable threads: 
  712.  
  713. o Select Run  Thread enabled from the Control window or from a source window. 
  714.  
  715. The thread that is highlighted in the Threads box of the Control window is 
  716. executed when the program runs. 
  717.  
  718. When threads are enabled, a check mark symbol displays beside the Thread 
  719. enabled choice.  When threads are not enabled, a check mark symbol is not 
  720. displayed and the highlighted thread is not executed when the program runs. 
  721.  
  722.  
  723. ΓòÉΓòÉΓòÉ 24. Filter exceptions ΓòÉΓòÉΓòÉ
  724.  
  725. Use the Exception Filtering window to select exceptions that you want the 
  726. debugger to recognize. 
  727.  
  728. o Select Options  Debugger settings  Exception filtering from the Control 
  729.   window or from a source window. The Exception Filtering window displays. 
  730.  
  731. To highlight an exception: 
  732.  
  733.  1. Select the exception by clicking on the name. It becomes highlighted. 
  734.  2. Select the OK push button. 
  735.  
  736. If a highlighted exception is encountered during the execution of your program, 
  737. the Exception window is displayed. Any other exceptions that are encountered 
  738. are ignored. 
  739.  
  740. For details on the OS/2 exception definitions listed in this window, refer to 
  741. the Control Program Programming Reference (S10G-6263-00). The Software 
  742. exception will not be listed, since this is a user-defined OS/2 exception 
  743. generated by the DosRaiseException call. 
  744.  
  745.  
  746. ΓòÉΓòÉΓòÉ 25. Halt execution of my program ΓòÉΓòÉΓòÉ
  747.  
  748. To interrupt execution of your program: 
  749.  
  750. o Select Run  Halt from the Control window or from a source window.  This 
  751.   stops your program from running. 
  752.  
  753. You can also access this choice by pressing SysRq (Alt+PrintScreen). 
  754.  
  755.  
  756. ΓòÉΓòÉΓòÉ 26. Hide the debugger when running a program ΓòÉΓòÉΓòÉ
  757.  
  758. To hide the debugger windows whenever your program is running: 
  759.  
  760. o Select Run  Hide debugger on Run from the Control window or from a source 
  761.   window. 
  762.  
  763. The debugger windows will display again when the program is finished running. 
  764.  
  765.  
  766. ΓòÉΓòÉΓòÉ 27. Jump to Location ΓòÉΓòÉΓòÉ
  767.  
  768. Select Run  Jump to Location from any of the source windows.  This takes you 
  769. to the current line in your program without executing the lines between the 
  770. present current line and the new current line. 
  771.  
  772. To use the Jump to location choice: 
  773.  
  774.  1. Single-click in the prefix area of the line you want to become the current 
  775.     line. The prefix area turns gray. 
  776.  
  777.  2. Select the Jump to location choice. The current line is changed and the 
  778.     lines between are not executed. 
  779.  
  780. The Jump to location choice stops only on executable lines. If a highlighted 
  781. line is not executable, the jump is not performed. 
  782.  
  783. Warning Jumping out of the current function may corrupt the call chain and 
  784. cause your program to produce unpredictable results. 
  785.  
  786.  
  787. ΓòÉΓòÉΓòÉ 28. List all the breakpoints ΓòÉΓòÉΓòÉ
  788.  
  789. To list all the breakpoints that have been set, do the following: 
  790.  
  791. o Select Breakpoints  List from the Control window or from a source window. 
  792.  
  793. When you select List, the Breakpoint List window displays.  This window 
  794. displays all the breakpoints that have been set and provides a description of 
  795. each breakpoint. 
  796.  
  797.  
  798. ΓòÉΓòÉΓòÉ 29. Locate a function ΓòÉΓòÉΓòÉ
  799.  
  800. To open a source window to a particular function: 
  801.  
  802.  1. Select View  Locate function from a source window. The Locate Function 
  803.     window displays. 
  804.  
  805.  2. Type the name of the function you want to search for in the Function entry 
  806.     field. 
  807.  
  808.  3. Select the OK push button. 
  809.  
  810. If the function that you specify is not found, the following message displays: 
  811.  
  812.    No matching function found
  813.  
  814. This means it may be a static function or the function you specified does not 
  815. exist. 
  816.  
  817.  
  818. ΓòÉΓòÉΓòÉ 30. Look at Presentation Manager windows ΓòÉΓòÉΓòÉ
  819.  
  820. To help you understand Presentation Manager (PM) application windows: 
  821.  
  822. o Select Monitors  Window analysis from the Control window or from a source 
  823.   window. 
  824.  
  825. The Window Analysis window presents both graphical and textual information of 
  826. debugged windows and lets you observe the relationships between windows. 
  827.  
  828. Note:  To display the Window Analysis window, you must stop your program. 
  829.  
  830.  
  831. ΓòÉΓòÉΓòÉ 31. Modify a breakpoint ΓòÉΓòÉΓòÉ
  832.  
  833. To change the state of a breakpoint that has been set in your program: 
  834.  
  835.  1. Select Breakpoints List from the Control window or from a source window. 
  836.     The Breakpoints List window displays. 
  837.  
  838.  2. Highlight the breakpoint you want to change. 
  839.  
  840.  3. Select Edit  Modify from the Breakpoint List window. The breakpoint window 
  841.     containing information pertaining to that breakpoint displays. Make the 
  842.     necessary changes to the entry fields. 
  843.  
  844.  4. Select the OK push button. 
  845.  
  846. If you want to make other changes, select Set to accept the changes and keep 
  847. the window open. 
  848.  
  849.  
  850. ΓòÉΓòÉΓòÉ 32. Open a new source file ΓòÉΓòÉΓòÉ
  851.  
  852. To open a new source file: 
  853.  
  854.  1. Select View  Open new source from a source window. The Open New Source 
  855.     window displays. 
  856.  
  857.  2. Type the name of the object file you want to open the source for in the 
  858.     Source entry field. For example, to look for the source used to compile 
  859.     A123.OBJ, type the following: 
  860.  
  861.             A123.
  862.  
  863.     If you are unsure of the file name, select the File List push button to 
  864.     view a list of the files that you can select. 
  865.  
  866.  3. Type the name of the executable file in the Executable entry field.  The 
  867.     source files for the executable file display in the Source entry field. 
  868.  
  869.     Note:  You have to disable the All executables check box option to search 
  870.     only one executable file. 
  871.  
  872.  4. Select the OK push button. 
  873.  
  874.  
  875. ΓòÉΓòÉΓòÉ 33. Perform a step debug ΓòÉΓòÉΓòÉ
  876.  
  877. Select the Step debug choice to execute the current line in the program. The 
  878. debugger steps over any function for which debugging data is not available, 
  879. such as library and system functions, and steps into any function for which 
  880. debugging information is available. 
  881.  
  882. To perform a step debug: 
  883.  
  884. o Select Run  Step debug from any of the source windows. 
  885.  
  886. You may also select the Step debug button which is located in the title bar of 
  887. any source window. 
  888.  
  889.  
  890. ΓòÉΓòÉΓòÉ 34. Perform a step into ΓòÉΓòÉΓòÉ
  891.  
  892. Select the Step into choice to execute the current line in the program. If the 
  893. current line is a call, execution stops at the first statement in the called 
  894. function. 
  895.  
  896. Note:  If you have multiple calls on the same source line and perform a step 
  897. into for which there is no source code available, the Disassembly view 
  898. displays.  To return to the Source view, you have to do a step return.  To 
  899. avoid this, perform step debug so that the debugger will step over any calls 
  900. for which debugging data is not available, such as library and system 
  901. functions, and steps into any function for which debugging information is 
  902. available. 
  903.  
  904. To perform a step into: 
  905.  
  906. o Select Run  Step into from any of the source windows. 
  907.  
  908. You may also select the Step into button which is located in the title bar of 
  909. any source window. 
  910.  
  911.  
  912. ΓòÉΓòÉΓòÉ 35. Perform a step return ΓòÉΓòÉΓòÉ
  913.  
  914. Select the Step return choice to automatically execute the lines of code up to, 
  915. and including, the return statement of the current function. 
  916.  
  917. To perform a step return: 
  918.  
  919. o Select Run  Step return from any of the source windows. 
  920.  
  921. You may also select the Step return button which is located in the title bar of 
  922. any source window. 
  923.  
  924.  
  925. ΓòÉΓòÉΓòÉ 36. Perform a step over ΓòÉΓòÉΓòÉ
  926.  
  927. Select the Step over choice to execute the current line of the program. If the 
  928. current line is a call, execution stops when the call completes. You can also 
  929. access the Step over function by placing the mouse pointer in a source window 
  930. and clicking mouse button two to execute one line. 
  931.  
  932. All enabled threads continue execution. 
  933.  
  934. Note:  The debugger stops in a called function if it encounters a breakpoint. 
  935.  
  936. To perform a step over: 
  937.  
  938. o Select Run  Step over from any of the source windows. 
  939.  
  940. You may also select the Step over button which is located in the title bar of 
  941. any source window. 
  942.  
  943.  
  944. ΓòÉΓòÉΓòÉ 37. Restart a debugging session ΓòÉΓòÉΓòÉ
  945.  
  946. To restart a debugging session: 
  947.  
  948. o Select Run  Program restart from the Control window or from a source window. 
  949.  
  950. Program restart allows you to restart the current debugging session on the 
  951. existing program, while Program startup allows you to debug another program. 
  952.  
  953.  
  954. ΓòÉΓòÉΓòÉ 38. Run my program ΓòÉΓòÉΓòÉ
  955.  
  956. To run your program: 
  957.  
  958. o Select Run  Run from the Control window or from a source window. 
  959.  
  960. You can also select the run button located in the title bar of the source 
  961. windows or press R. 
  962.  
  963.  
  964. ΓòÉΓòÉΓòÉ 39. Run from the current line to a highlighted line ΓòÉΓòÉΓòÉ
  965.  
  966. Select Run  Run to Location from a source window to execute your program from 
  967. the current line up to the line that is highlighted or gray in the prefix area. 
  968.  
  969. To use the Run to location choice: 
  970.  
  971.  1. Single-click in the prefix area of the line you want to become the current 
  972.     line. The prefix area turns gray. 
  973.  
  974.  2. Select the Run to location choice. The program runs up to the line that you 
  975.     marked. 
  976.  
  977. The Run to location choice stops only on executable lines. 
  978.  
  979.  
  980. ΓòÉΓòÉΓòÉ 40. Scroll to a particular line ΓòÉΓòÉΓòÉ
  981.  
  982. To scroll to a particular line in your program or set a line breakpoint: 
  983.  
  984.  1. Select View  Scroll to line number from a source window. The Scroll to 
  985.     Line Number window displays. 
  986.  
  987.  2. Type the line number you want to scroll to in the Enter line number: entry 
  988.     field. 
  989.  
  990.  3. Select the OK push button to scroll to that line. 
  991.                               the 
  992.  
  993. Note:  If the Source window is active, you can type in a number and the Scroll 
  994. to Line Number window displays. 
  995.  
  996. To use the Scroll to Line Number window to set a breakpoint: 
  997.  
  998.  1. Type the line number you want to set the breakpoint on in the Enter line 
  999.     number: entry field. 
  1000.  
  1001.  2. Select the Set Breakpoint push button to set the breakpoint on the 
  1002.     specified line number. 
  1003.  
  1004.  
  1005. ΓòÉΓòÉΓòÉ 41. Set a breakpoint in a DLL that is not loaded ΓòÉΓòÉΓòÉ
  1006.  
  1007. To set a deferred breakpoint in a DLL that is not loaded: 
  1008.  
  1009.  1. Select Breakpoints  Set function from the Control window or from a source 
  1010.     window. The Set Function window displays. 
  1011.  
  1012.  2. Type the name of the DLL in the Executable entry field. 
  1013.  
  1014.  3. Type the name of the object file in the Source entry field. 
  1015.  
  1016.  4. Type the name of the function in the Function entry field. 
  1017.  
  1018.  5. Enable the Defer breakpoint check box. 
  1019.  
  1020.  6. Select the Set push button. 
  1021.  
  1022. Note:  If your application consists of an EXE or preloaded DLLs, do not use 
  1023. this choice. If your application consists of DLLs that are dynamically loaded, 
  1024. use this choice to set breakpoints in DLLs which have not been loaded yet. 
  1025.  
  1026. If you set a deferred breakpoint in a function and that function is overloaded, 
  1027. the debugger sets the breakpoint in all of the overloaded functions when the 
  1028. DLL is loaded. 
  1029.  
  1030.  
  1031. ΓòÉΓòÉΓòÉ 42. Set breakpoints ΓòÉΓòÉΓòÉ
  1032.  
  1033. To set breakpoints: 
  1034.  
  1035.  1. Select the Breakpoints menu from the Control window or from a source window 
  1036.     to set breakpoints. 
  1037.  
  1038.  2. Select the appropriate choice that represents the type of breakpoint that 
  1039.     you want to set. 
  1040.  
  1041. You can set various types of breakpoints. Double-click on any of the following 
  1042. to learn how to set the breakpoint: 
  1043.  
  1044. o Set a simple line breakpoints 
  1045. o Set a line breakpoint 
  1046. o Set a function breakpoint 
  1047. o Set an address breakpoint 
  1048. o Set a change address breakpoint 
  1049. o Set a load occurrence breakpoint 
  1050. o Set a deferred breakpoint. 
  1051.  
  1052.  
  1053. ΓòÉΓòÉΓòÉ 42.1. Set a line breakpoint ΓòÉΓòÉΓòÉ
  1054.  
  1055. To set a line breakpoint: 
  1056.  
  1057. o Select Breakpoints  Set line from the Control window or from a source 
  1058.   window. 
  1059.  
  1060. When you select Set line, the Set Line window displays. 
  1061.  
  1062. You can also set simple line breakpoints. Double-click on one of the following 
  1063. for the procedures you use to set or clear simple line breakpoints: 
  1064.  
  1065. o Setting simple line breakpoints 
  1066. o Deleting simple line breakpoints. 
  1067.  
  1068.  
  1069. ΓòÉΓòÉΓòÉ 42.2. Set simple line breakpoints ΓòÉΓòÉΓòÉ
  1070.  
  1071. To set a simple line breakpoint in all threads: 
  1072.  
  1073. o Double-click in the prefix area of an executable statement in any of the 
  1074.   source windows. 
  1075.  
  1076. The prefix area turns red indicating that the breakpoint has been set. 
  1077.  
  1078. To set a line breakpoint for a specific thread, hold down the CTRL key as you 
  1079. double-click in the prefix area. 
  1080.  
  1081.  
  1082. ΓòÉΓòÉΓòÉ 42.3. Delete Simple Line Breakpoints ΓòÉΓòÉΓòÉ
  1083.  
  1084. To remove a simple line breakpoint in all threads: 
  1085.  
  1086. o Double-click in a red prefix area of a source window. The color changes 
  1087.   indicating that the breakpoint cleared. 
  1088.  
  1089. If the prefix area turns gray instead, double-click again to make sure the 
  1090. breakpoint clears. 
  1091.  
  1092.  
  1093. ΓòÉΓòÉΓòÉ <hidden> Set Line Window ΓòÉΓòÉΓòÉ
  1094.  
  1095. Use the Set Line window to set a breakpoint on a specific line. 
  1096.  
  1097. For a description of the entry fields in the window, double-click on one of the 
  1098. following topics: 
  1099.  
  1100. o Executable 
  1101. o Source 
  1102. o File 
  1103. o Line number 
  1104. o Thread 
  1105. o From 
  1106. o To 
  1107. o Every 
  1108. o Expression 
  1109.  
  1110. Defer breakpoint Check Box 
  1111.  
  1112. Enable this check box if you want to postpone the setting of a breakpoint in a 
  1113. DLL. 
  1114.  
  1115. Note:  If your application consists of an EXE or preloaded DLLs, do not use 
  1116. this choice. If your application consists of DLLs that are dynamically loaded, 
  1117. you must use this choice to set breakpoints in the dynamically loaded DLLs that 
  1118. have not been loaded yet. 
  1119.  
  1120. If you enter an invalid source, source file or invalid line number, the 
  1121. debugger is unable to activate the breakpoint when the DLL is loaded. 
  1122. Therefore, the invalid breakpoint remains in the deferred state even after the 
  1123. DLL is loaded. 
  1124.  
  1125. The state of the breakpoints will change from active state to deferred state 
  1126. depending on whether the DLL has been loaded or not.  For example, if the DLL 
  1127. has been loaded and a deferred breakpoint has been set, the breakpoint becomes 
  1128. active. If you stop the program and the DLL has been freed, the breakpoint 
  1129. changes from active state to deferred state. 
  1130.  
  1131. If you set a deferred line breakpoint and the line is located in a template, 
  1132. the debugger sets the line breakpoint in all of the templates when the DLL is 
  1133. loaded. 
  1134.  
  1135.  
  1136. ΓòÉΓòÉΓòÉ <hidden> Executable Entry Field ΓòÉΓòÉΓòÉ
  1137.  
  1138. To select a component from the Executable list: 
  1139.  
  1140.  1. Open the Executable list by selecting the arrow with your mouse. 
  1141.  
  1142.  2. Highlight the executable where you want to set the breakpoint. 
  1143.  
  1144.     OR 
  1145.  
  1146.     Type the executable name in the entry field. 
  1147.  
  1148.  
  1149. ΓòÉΓòÉΓòÉ <hidden> Source Entry Field ΓòÉΓòÉΓòÉ
  1150.  
  1151. To select a component from the Source list: 
  1152.  
  1153.  1. Open the Source list by selecting the arrow with your mouse. 
  1154.  
  1155.  2. Highlight the source where you want to set the breakpoint. 
  1156.  
  1157.     OR 
  1158.  
  1159.     Type the source name in the entry field. 
  1160.  
  1161.  
  1162. ΓòÉΓòÉΓòÉ <hidden> Line Number Entry Field ΓòÉΓòÉΓòÉ
  1163.  
  1164. To set a line breakpoint, type the line number in the Line number entry field. 
  1165. The breakpoint is set on the line number. 
  1166.  
  1167.  
  1168. ΓòÉΓòÉΓòÉ 42.4. Set a function breakpoint ΓòÉΓòÉΓòÉ
  1169.  
  1170. To set a function breakpoint: 
  1171.  
  1172. o Select Breakpoints  Set function from the Control window or from a source 
  1173.   window. 
  1174.  
  1175. When you select Set function, the Set Function window displays. 
  1176.  
  1177.  
  1178. ΓòÉΓòÉΓòÉ <hidden> Set Function Window ΓòÉΓòÉΓòÉ
  1179.  
  1180. Use the Set Function window to set a function breakpoint.  Type the name of the 
  1181. function. If a function is overloaded, then a window displays with a list of 
  1182. all the overloaded function names. Select one of the functions from the list. 
  1183.  
  1184. To set a function breakpoint for the function my_func, you would type the 
  1185. following in the Function entry field. 
  1186.  
  1187.    my_func
  1188.  
  1189. Note:  You cannot set a function breakpoint to a function name that was defined 
  1190.        using the define preprocessor directive. 
  1191.  
  1192. For a description of types of data you can enter in the entry fields, 
  1193. double-click on one of the following topics: 
  1194.  
  1195. o Executable 
  1196. o Source 
  1197. o Function 
  1198. o Expression 
  1199. o Thread 
  1200. o From 
  1201. o To. 
  1202.  
  1203. All executables Check Box 
  1204.  
  1205. Enable this check box if you want to search all the executable files for the 
  1206. function. 
  1207.  
  1208. Note:  To search for a function in a particular executable file, disable this 
  1209. check box and type in the name of the executable file in the Executable entry 
  1210. field and the name of the source file in the Source entry field. 
  1211.  
  1212. Debug data only Check Box 
  1213.  
  1214. Enable this check box if you want to search only the object files that contain 
  1215. debugging data. 
  1216.  
  1217. Case sensitive Check Box 
  1218.  
  1219. Enable this check box if you want to search for the string exactly as typed. 
  1220. Disable this check box if you want to search for both uppercase and lowercase 
  1221. characters. 
  1222.  
  1223. Defer breakpoint Check Box 
  1224.  
  1225. Enable this check box if you want to postpone the setting of a breakpoint in a 
  1226. DLL. 
  1227.  
  1228. Note:  If your application consists of an EXE or preloaded DLLs, do not use 
  1229. this choice. If your application consists of DLLs that are dynamically loaded, 
  1230. you must use this choice to set breakpoints in the dynamically loaded DLLs that 
  1231. have not been loaded yet. 
  1232.  
  1233. If you enter an invalid source file or invalid function, the debugger is unable 
  1234. to activate the breakpoint when the DLL is loaded. Therefore, the invalid 
  1235. breakpoint remains in the deferred state even after the DLL is loaded. 
  1236.  
  1237. The state of the breakpoints will change from active state to deferred state 
  1238. depending on whether the DLL has been loaded or not.  For example, if the DLL 
  1239. has been loaded and a deferred breakpoint has been set, the breakpoint becomes 
  1240. active. If you stop the program and the DLL has been freed, the breakpoint 
  1241. changes from active state to deferred state. If you set a deferred breakpoint 
  1242. in a function and that function is overloaded, the debugger sets the breakpoint 
  1243. in all of the overloaded functions when the DLL is loaded. 
  1244.  
  1245.  
  1246. ΓòÉΓòÉΓòÉ 42.5. Set an address breakpoint ΓòÉΓòÉΓòÉ
  1247.  
  1248. To set an address breakpoint: 
  1249.  
  1250. o Select Breakpoints  Set address from the Control window or from a source 
  1251.   window. 
  1252.  
  1253. When you select Set address, the Set Address window displays. 
  1254.  
  1255.  
  1256. ΓòÉΓòÉΓòÉ <hidden> Set Address Window ΓòÉΓòÉΓòÉ
  1257.  
  1258. Use the Set Address window to set an address breakpoint.  Type in the address 
  1259. that represents the location in your program where you want to set the 
  1260. breakpoint. 
  1261.  
  1262. Note:  The address can be either segmented or flat format. 
  1263.  
  1264. To set an address breakpoint for the address 000A1FCC, you would type the 
  1265. following in the Address or expression entry field. 
  1266.  
  1267.      A1FCC
  1268.  
  1269. For a description of types of data you can enter in the window entry fields, 
  1270. double-click on any of the following topics: 
  1271.  
  1272. o Thread 
  1273. o Every 
  1274. o From 
  1275. o To 
  1276. o Expression 
  1277.  
  1278.  
  1279. ΓòÉΓòÉΓòÉ 42.6. Set a change address breakpoint ΓòÉΓòÉΓòÉ
  1280.  
  1281. To set a change address breakpoint: 
  1282.  
  1283. o Select Breakpoints  Set change address from the Control window or from a 
  1284.   source window. 
  1285.  
  1286. When you select Set change address, the Set Change Address window displays. 
  1287.  
  1288.  
  1289. ΓòÉΓòÉΓòÉ <hidden> Set Change Address Window ΓòÉΓòÉΓòÉ
  1290.  
  1291. Use the Set Change Address window to set a change address breakpoint.  To do 
  1292. so, type a hexadecimal address or an expression and select the range of bytes. 
  1293.  
  1294. Note:  The debugger supports up to 4 enabled change address breakpoints. 
  1295. However, you can set as many disabled change address breakpoints as you want. 
  1296.  
  1297. To set a change address breakpoint, complete the fields as follows: 
  1298.  
  1299. Address or expression Entry Field 
  1300.  
  1301. You would type the following in the Address or expression entry field to set a 
  1302. change address breakpoint for the expression 0xA1FCC. 
  1303.  
  1304.      0xA1FCC
  1305.  
  1306. Note:  If you type ABC in the Address or expression entry field, and there is a 
  1307. variable named ABC, it uses the value of the variable instead of the hex value 
  1308. ABC. Also, you can type &a in the Address or expression entry field to set the 
  1309. breakpoint on the address of a variable a. 
  1310.  
  1311. Warning: If you set a change address breakpoint that is on the call chain, you 
  1312. should remove the breakpoint prior to leaving the routine associated with the 
  1313. breakpoint.  Otherwise, when you return from the routine, the routine's stack 
  1314. frame will be removed from the stack leaving the breakpoint intact.  Any other 
  1315. routine that gets loaded on the stack will then contain the breakpoint. 
  1316.  
  1317. Bytes to monitor Radio Buttons 
  1318.  
  1319. Select one of the radio buttons to specify the range of bytes. The 2-byte range 
  1320. must be aligned on a word boundary and the 4-byte range must be aligned on a 
  1321. double-word boundary. 
  1322.  
  1323. Execution stops when the specified range of memory changes. 
  1324.  
  1325. For a description of types of data you can enter in the other window entry 
  1326. fields, double-click on one of the following topics: 
  1327.  
  1328. o Thread 
  1329. o From 
  1330. o To 
  1331. o Every 
  1332.  
  1333.  
  1334. ΓòÉΓòÉΓòÉ 42.7. Set a load occurrence breakpoint ΓòÉΓòÉΓòÉ
  1335.  
  1336. To set a load occurrence breakpoint which stops your program when a specific 
  1337. DLL is loaded: 
  1338.  
  1339. o Select Breakpoints  Set load occurrence from the Control 
  1340.  
  1341. When you select Set load occurrence, the Set Load Occurrence window displays. 
  1342.  
  1343.  
  1344. ΓòÉΓòÉΓòÉ <hidden> Set Load Occurrence Window ΓòÉΓòÉΓòÉ
  1345.  
  1346. Use the Set Load Occurrence window to set a DLL load occurrence breakpoint. 
  1347. Type the name of the DLL in the DLL file name entry field. Execution stops when 
  1348. the DLL is loaded. 
  1349.  
  1350. DLL file name Entry Field 
  1351.  
  1352. To set a DLL load occurrence breakpoint when MY.DLL is loaded, you would type 
  1353. the following in the DLL file name entry field: 
  1354.  
  1355.    MY
  1356.  
  1357. or 
  1358.  
  1359.    MY.DLL
  1360.  
  1361. For a description of types of data you can enter in the other window entry 
  1362. fields, double-click on one of the following topics: 
  1363.  
  1364. o Thread 
  1365. o From 
  1366. o To 
  1367. o Every 
  1368.  
  1369.  
  1370. ΓòÉΓòÉΓòÉ <hidden> File List ΓòÉΓòÉΓòÉ
  1371.  
  1372. If the source you selected has include files with executable statements, then 
  1373. the File list displays all the file names that contain executable lines. 
  1374.  
  1375.  1. Open the File list by selecting the arrow with your mouse. 
  1376.  
  1377.  2. Highlight the file where you want to set the breakpoint. 
  1378.  
  1379.     OR 
  1380.  
  1381.  3. Type the name of the file in the entry field. 
  1382.  
  1383.  
  1384. ΓòÉΓòÉΓòÉ <hidden> Function List ΓòÉΓòÉΓòÉ
  1385.  
  1386. Type in the name of the function where you want to set the breakpoint or select 
  1387. a function from the Function list: 
  1388.  
  1389.  1. Open the Function list by selecting the arrow with your mouse. 
  1390.  
  1391.  2. Highlight the function you want to set the breakpoint. 
  1392.  
  1393.     OR 
  1394.  
  1395.  3. Type the name of the function in the entry field. 
  1396.  
  1397.  
  1398. ΓòÉΓòÉΓòÉ <hidden> Expression Entry Field ΓòÉΓòÉΓòÉ
  1399.  
  1400. If you are setting an address, function, or line breakpoint, you can also type 
  1401. in an expression.  The execution of the program stops only if this condition 
  1402. tests true. For example, you could type the following: 
  1403.  
  1404.    (i==1) || (j==k) && (k!=5)
  1405.  
  1406. Note:  Variables in a conditional expression associated with a Function 
  1407. breakpoint are limited to any static or global variables that are known to the 
  1408. called function when the function is called. Local variables and automatic 
  1409. variables cannot be used. 
  1410.  
  1411. The maximum length of the condition is 256 characters. 
  1412.  
  1413.  
  1414. ΓòÉΓòÉΓòÉ <hidden> Thread List ΓòÉΓòÉΓòÉ
  1415.  
  1416. To select a thread ID from the Thread list: 
  1417.  
  1418.  1. Open the Thread list by selecting the arrow with your mouse. 
  1419.  
  1420.  2. Highlight the thread where you want to set the breakpoint. 
  1421.  
  1422. Select Every, the default, to set a breakpoint in all of the active threads in 
  1423. your program. The Every choice is thread independent. Select one of the 
  1424. individual threads to set a breakpoint in one thread only.  Threads are added 
  1425. to the Thread list as new threads are activated. 
  1426.  
  1427.  
  1428. ΓòÉΓòÉΓòÉ <hidden> Every Entry Field ΓòÉΓòÉΓòÉ
  1429.  
  1430. This field is used for location breakpoints and load occurrence breakpoints. 
  1431. Type in a whole integer number to indicate how often the breakpoint should be 
  1432. activated within the From and To range. 
  1433.  
  1434.  
  1435. ΓòÉΓòÉΓòÉ <hidden> From Entry Field ΓòÉΓòÉΓòÉ
  1436.  
  1437. This field is used for location breakpoints and load occurrence breakpoints. 
  1438. Type in a whole integer number to start activating the breakpoint the nth time 
  1439. the location is encountered. 
  1440.  
  1441.  
  1442. ΓòÉΓòÉΓòÉ <hidden> To Entry Field ΓòÉΓòÉΓòÉ
  1443.  
  1444. This field is used for location breakpoints and load occurrence breakpoints. 
  1445. Type in a whole integer number to stop activating the breakpoint after the nth 
  1446. time the location is encountered. 
  1447.  
  1448.  
  1449. ΓòÉΓòÉΓòÉ 43. Set the search path ΓòÉΓòÉΓòÉ
  1450.  
  1451. The search path tells the debugger where to find the source file used in the 
  1452. source windows. The debugger searches for the source files in the following 
  1453. order: 
  1454.  
  1455.  1. The path defined by the PMDOVERRIDE environment variable, if specified. 
  1456.  
  1457.  2. The path where the object file was compiled. 
  1458.  
  1459.  3. The path where the executable file is located. 
  1460.  
  1461.  4. The path defined by the PMDPATH environment variable, if specified. 
  1462.  
  1463.  5. The current path. 
  1464.  
  1465.  6. The path defined in the INCLUDE environment variable. 
  1466.  
  1467. The debugger uses two environment variables: PMDOVERRIDE and PMDPATH to set the 
  1468. search path. 
  1469.  
  1470. To set the PMDOVERRIDE environment variable, type the following at the command 
  1471. line: 
  1472.  
  1473.      Set PMDOVERRIDE=path;path
  1474.  
  1475. where, path is the location of your source files. If the source file is not 
  1476. found in the defined override path, the debugger uses the normal search order. 
  1477.  
  1478. To set the PMDPATH environment variable, type the following at the command 
  1479. line: 
  1480.  
  1481.      Set PMDPATH=path;path
  1482.  
  1483. where, path is the location of your source files. 
  1484.  
  1485. To override the normal search order, use the PMDOVERRIDE environment variable: 
  1486.  
  1487.  
  1488. ΓòÉΓòÉΓòÉ 44. Sort breakpoints ΓòÉΓòÉΓòÉ
  1489.  
  1490. Use the Sort window to sort the breakpoints by categories. 
  1491.  
  1492. To use the Sort window: 
  1493.  
  1494.  1. Select an item from the list that represents how you want the breakpoints 
  1495.     sorted. 
  1496.  
  1497.  2. Select the OK push button. 
  1498.  
  1499.  
  1500. ΓòÉΓòÉΓòÉ 45. Sort components alphabetically ΓòÉΓòÉΓòÉ
  1501.  
  1502. To sort the components in alphabetical order: 
  1503.  
  1504. o Select Options  Window settings  Sort components from the Control window. 
  1505.  
  1506. If enabled, a check mark symbol displays beside the Sort components choice and 
  1507. components are sorted alphabetically. 
  1508.  
  1509.  
  1510. ΓòÉΓòÉΓòÉ 46. Sort threads numerically ΓòÉΓòÉΓòÉ
  1511.  
  1512. To sort the threads in numerical order: 
  1513.  
  1514. o Select Options  Window settings  Sort threads from the Control window. 
  1515.  
  1516. If enabled, a check mark symbol displays beside the sort threads choice and 
  1517. threads are sorted numerically. 
  1518.  
  1519.  
  1520. ΓòÉΓòÉΓòÉ 47. Start a program ΓòÉΓòÉΓòÉ
  1521.  
  1522. To start a program: 
  1523.  
  1524.  1. Select File  Program startup from the Control window or from a source 
  1525.     window. The Program Startup window displays. 
  1526.  
  1527.  2. Type the name of the program you want to start in the Program entry field. 
  1528.  
  1529.  3. Type any parameters you want to pass to your program in the Parameters 
  1530.     entry field. Separate multiple parameters with a space. 
  1531.  
  1532.  4. Enable the Debug child process(es) check box if you want to debug processes 
  1533.     that are started under the parent program. When you enable this check box, 
  1534.     the Child name(s) entry field becomes active. 
  1535.  
  1536.  5. In the Child name(s) entry field, type the name of the child process you 
  1537.     want to debug. You can also select the Child list push button. 
  1538.  
  1539.     If you select Child list, the Select Child Process window displays. From 
  1540.     this window, select the child process or processes you want to debug. The 
  1541.     Program Startup window displays again with the child names displayed in the 
  1542.     Child name(s) entry field. 
  1543.  
  1544.     After your program starts running and the selected child process is started 
  1545.     by OS/2, the debugger begins debugging the child process. 
  1546.  
  1547.  6. Enable the Debug program initialization check box if you want to start the 
  1548.     debugger in the system initialization routine to debug initialization code. 
  1549.     This allows you to halt the execution of the application before any 
  1550.     initialization routines have been executed. It also you to debug any DLL 
  1551.     initialization routines. 
  1552.  
  1553.  7. Select the Use program profile check box if you want to start the debugging 
  1554.     session with program profiles. 
  1555.  
  1556.  8. Select the OK push button. 
  1557.  
  1558. Program startup allows you to debug another program, while Program restart 
  1559. allows you to restart the current debugging session on the existing program. 
  1560.  
  1561.  
  1562. ΓòÉΓòÉΓòÉ 48. Turn the titles on or off ΓòÉΓòÉΓòÉ
  1563.  
  1564. You can specify to display the titles or to turn the titles off in the Control 
  1565. window. The titles are Threads and Components. 
  1566.  
  1567. To turn the titles on: 
  1568.  
  1569. o Select Options  Window settings  Titles on from the Control window. 
  1570.  
  1571. If enabled, a check mark symbol displays beside the Titles on choice and titles 
  1572. display. 
  1573.  
  1574.  
  1575. ΓòÉΓòÉΓòÉ 49. Update storage ΓòÉΓòÉΓòÉ
  1576.  
  1577. To display the Storage window: 
  1578.  
  1579. o Select Monitors  Storage from the Control window or any of the source 
  1580.   windows. 
  1581.  
  1582. You can also select the Storage button located in the title bar of the source 
  1583. windows. 
  1584.  
  1585. To update the contents of storage, use one of the following methods: 
  1586.  
  1587. o Highlight the appropriate line and press Enter.  An entry field displays, 
  1588.   Type the new storage information in the entry field. 
  1589.  
  1590. o Double-click on the appropriate column.  An entry field displays. Type in the 
  1591.   new storage information. 
  1592.  
  1593. To move around in the Storage window, press the Tab key to move the selected 
  1594. column to the right or press Shift+Tab to move the selected column to the left. 
  1595. The up and down arrow keys move the highlighted line up and down. 
  1596.  
  1597. After you have made a change in the Storage window, click anywhere in the 
  1598. window and it saves your changes.  If you enter an incorrect storage address, a 
  1599. prompt box displays and the previous storage address is returned in the column. 
  1600.  
  1601.  
  1602. ΓòÉΓòÉΓòÉ 50. Use shortcut keys ΓòÉΓòÉΓòÉ
  1603.  
  1604. Shortcut keys are usually two key names that are joined by a plus sign (+). 
  1605. However, they can also be a single key stroke. 
  1606.  
  1607. To use the shortcut keys that are joined by a plus sign(+): 
  1608.  
  1609. o Hold down the first key and press the second key. 
  1610.  
  1611. The following shortcut keys are available from the Control window: 
  1612.  
  1613. Where is execution point      Ctrl+P 
  1614.  
  1615. Close debugger                F3 
  1616.  
  1617. List                          Ctrl+X 
  1618.  
  1619. Call stack                    Ctrl+K 
  1620.  
  1621. Registers                     Ctrl+E 
  1622.  
  1623. Storage                       Ctrl+G 
  1624.  
  1625. Local variables               Ctrl+V 
  1626.  
  1627. Run                           R 
  1628.  
  1629. Halt                          SysRq 
  1630.  
  1631. The following shortcut keys are available from the source windows 
  1632. (Source/Disassembly/Mixed): 
  1633.  
  1634. Where is execution point      Ctrl+P 
  1635.  
  1636. Close debugger                F3 
  1637.  
  1638. Find                          Ctrl+F 
  1639.  
  1640. Find next                     Ctrl+N 
  1641.  
  1642. List                          Ctrl+X 
  1643.  
  1644. Monitor expression            Ctrl+M 
  1645.  
  1646. Call stack                    Ctrl+K 
  1647.  
  1648. Registers                     Ctrl+E 
  1649.  
  1650. Storage                       Ctrl+G 
  1651.  
  1652. Local variables               Ctrl+V 
  1653.  
  1654. Step over                     O 
  1655.  
  1656. Step into                     I 
  1657.  
  1658. Step debug                    D 
  1659.  
  1660. Step return                   T 
  1661.  
  1662. Run                           R 
  1663.  
  1664. Run to location               L 
  1665.  
  1666. Jump to location              N 
  1667.  
  1668. Halt                          SysRq 
  1669.  
  1670. Note:  If you press F3 from any primary window, the debugger will close. 
  1671.  
  1672.  
  1673. ΓòÉΓòÉΓòÉ 51. View include files ΓòÉΓòÉΓòÉ
  1674.  
  1675. To look at include files: 
  1676.  
  1677.  1. Select View  Select Include files from a source window. The Select Include 
  1678.     File window displays. 
  1679.  
  1680.  2. Select the include file.  The include file name is highlighted. 
  1681.  
  1682.  3. Select the OK push button.  The selected include file view displays. 
  1683.  
  1684.  
  1685. ΓòÉΓòÉΓòÉ <hidden> Breakpoint ΓòÉΓòÉΓòÉ
  1686.  
  1687. A breakpoint is a defined location or condition in a program that, when it is 
  1688. met, stops the execution of the program. 
  1689.  
  1690.  
  1691. ΓòÉΓòÉΓòÉ <hidden> Debugging data ΓòÉΓòÉΓòÉ
  1692.  
  1693. Debugging data is the symbolic and line number information contained in the 
  1694. executable file. 
  1695.  
  1696.  
  1697. ΓòÉΓòÉΓòÉ <hidden> Disable ΓòÉΓòÉΓòÉ
  1698.  
  1699. Disable prevents a thread from executing. 
  1700.  
  1701.  
  1702. ΓòÉΓòÉΓòÉ <hidden> Enable ΓòÉΓòÉΓòÉ
  1703.  
  1704. Enable allows a thread to execute. 
  1705.  
  1706.  
  1707. ΓòÉΓòÉΓòÉ <hidden> Executable files ΓòÉΓòÉΓòÉ
  1708.  
  1709. Executable files are the EXE or DLL files. 
  1710.  
  1711.  
  1712. ΓòÉΓòÉΓòÉ <hidden> Functions ΓòÉΓòÉΓòÉ
  1713.  
  1714. A Function is a block of statements executed by a function call. Synonymous 
  1715. with procedures. 
  1716.  
  1717.  
  1718. ΓòÉΓòÉΓòÉ <hidden> Load occurrence breakpoints ΓòÉΓòÉΓòÉ
  1719.  
  1720. A load occurrence breakpoint allows you to stop the execution of your program 
  1721. after the DLL that you specify is loaded. 
  1722.  
  1723.  
  1724. ΓòÉΓòÉΓòÉ <hidden> Location breakpoint ΓòÉΓòÉΓòÉ
  1725.  
  1726. A location breakpoint is one of the following: 
  1727.  
  1728. o A line breakpoint 
  1729. o An address breakpoint 
  1730. o A function breakpoint. 
  1731.  
  1732.  
  1733. ΓòÉΓòÉΓòÉ <hidden> Program Profiles ΓòÉΓòÉΓòÉ
  1734.  
  1735. Program profiles are used to restore the debugger windows and breakpoints when 
  1736. debugging a program more than once. It is stored separately for each program 
  1737. debugged. The file extension for the files that contain this information is 
  1738. @2R. 
  1739.  
  1740. Note:  Only information for executable files and preloaded DLLs relating to the 
  1741. primary thread is restored. 
  1742.  
  1743. To delete this information, erase the @2R file. 
  1744.  
  1745.  
  1746. ΓòÉΓòÉΓòÉ <hidden> Synchronous ΓòÉΓòÉΓòÉ
  1747.  
  1748. When the debugger is operating in synchronous mode, the messages that are 
  1749. passed between Presentation Manager applications are answered by their target 
  1750. applications in the order that they were created. The messages that are passed 
  1751. within the debugger take priority over any other messages that are passed in 
  1752. the system. 
  1753.  
  1754. When the program being debugged is stopped and the debugger is in synchronous 
  1755. mode, other Presentation Manager applications are locked, leaving the debugger 
  1756. free to operate. In synchronous mode, you will not be able to use any other 
  1757. Presentation Manager applications that are running. 
  1758.  
  1759.  
  1760. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1761.  
  1762. Trademark of International Business Machines Corporation