background image

User’s Guide

HP B1466
68000 Series
Debugger/Simulator

Содержание 68000 Series

Страница 1: ...User s Guide HP B1466 68000 Series Debugger Simulator ...

Страница 2: ... reproduced or translated to another language without the prior written consent of Hewlett Packard Company The information contained in this document is subject to change without notice HP UX 9 and 10 0 for HP 9000 Series 700 and 800 computers are X Open Company UNIX 93 branded products UNIX is a registered trademark in the United States and other countries licensed exclusively through X Open Comp...

Страница 3: ...n dates and the corresponding HP manual part numbers are as follows Edition 1 B1466 97003 November 1992 Edition 2 B1466 97004 July 1995 B1466 97003 incorporates information which previously appeared in B1466 92000 B1466 92001 B1466 97000 B1466 97001 B1466 97002 64360 92003 64360 97011 64360 97008 and 64360 97009 Certification and Warranty Certification and warranty information can be found at the ...

Страница 4: ...r by assembly language instructions Stop programs upon the execution of selected instructions or upon a read or write of selected memory locations Create conditional breakpoints using macros Patch C or C code without recompiling Simulate input and output devices using your computer s keyboard display and file system Tune code by using the clock cycle count pseudo register to time code modules duri...

Страница 5: ...sters stack contents and backtrace information in separate windows on the debugger s main display Define your own screens and windows in the debugger s main display Access on line help information Compatibility with Other Products The debugger emulator has been designed to work with HP UX version 8 0 or greater SunOS or Solaris see the Installation Notice for version requirements and the following...

Страница 6: ... 2 User s Guide How to use the debugger to solve your problems Part 3 Concept Guide Conceptual information on CPU simulation and on X resources Part 4 Reference Descriptions of what each debugger command does details of how the debugger works and a list of error messages Part 5 Installation How to install the debugger software on your computer vi ...

Страница 7: ...the debugger 13 To activate display area windows 14 To run until main 15 To scroll the Code window 16 To display a function 17 To run until a line 18 To edit the program 19 To display init_system again 20 To set a breakpoint 20 To run until the breakpoint 21 To patch code using a macro 22 To delete a single breakpoint 23 To delete all breakpoints 24 To step through a program 25 To run until a stac...

Страница 8: ... To choose a pull down menu item using the keyboard 44 To choose pop up menu items 45 To use pop up menu shortcuts 46 To place values into the entry buffer using the keyboard 46 To copy and paste to the entry buffer 46 To recall entry buffer values 48 To edit the entry buffer 49 To use the entry buffer 49 To copy and paste from the entry buffer to the command line entry area 49 To use the action k...

Страница 9: ...display information about the debugger version 69 Solving problems with the interface 70 If pop up menus don t pop up 70 3 Loading and Executing Programs Compiling Programs for the Debugger 72 Writing programs for simulation 72 68020 Module Support CALLM and RTM 72 Using a Hewlett Packard C Cross Compiler 73 Using Microtec Language Tools 75 Loading Programs and Symbols 78 To specify the location o...

Страница 10: ...kpoints 95 To display breakpoint information 96 To halt program execution on return to a stack level 99 Using Simulated Interrupts 100 To define simulated interrupts 100 To remove simulated interrupts 101 Restarting Programs 102 To reset the processor 102 To reset the program counter to the starting address 102 To reset program variables 103 Saving and Loading the CPU State 104 To save the current...

Страница 11: ...h Validator data from program memory 117 4 Viewing Code and Data Using Symbols 120 To add a symbol to the symbol table 120 To display symbols 121 To display symbols in all modules 122 To delete a symbol from the symbol table 122 Displaying Screens 124 To display the high level screen 126 To display the assembly level screen 126 To switch between the high level and assembly screens 126 To display t...

Страница 12: ... display the address of the C object invoking a member function 150 Using Expressions 151 To calculate the value of a C expression 151 To display the value of an expression or variable 152 To display members of a structure 153 To display the members of a C class 154 To display the values of all members of a C object 154 To monitor variables 155 To monitor the value of a register 156 To discontinue...

Страница 13: ... 174 To edit an arbitrary file 175 To edit a file based on an address in the entry buffer 175 To edit a file based on the current program counter 175 Patching Source Code 176 To change a variable using a C expression 176 To patch a line of code using a macro 177 To patch C source code by inserting lines 178 To patch C source code by deleting lines 178 Editing Memory Contents 180 To change the valu...

Страница 14: ...hen stepping through programs 200 To stop a macro 201 To display macro source code 201 To delete a macro 202 Using Command Files 203 To record commands 204 To place comments in a command file 205 To pause the debugger 205 To stop command recording 206 To run a command file 206 To set command file error handling 207 To append commands to an existing command file 208 To record commands and results i...

Страница 15: ...l lookups 222 Setting the Display Options 223 To specify the Breakpoint window display behavior 223 To specify the Breakpoint Status or Simulated I O window display behavior 223 To display half bright or inverse video highlights 224 To turn display paging on or off more 224 To specify scroll amount 225 Modifying Display Area Windows 226 To resize or move the active window 226 To move the Status wi...

Страница 16: ...d in standard places 252 Loading order resolves conflicts between files 253 The app defaults file documents the resources you can set 254 Scheme files augment other X resource files 254 You can create your own scheme files if you choose 255 Scheme files continue the load sequence for X resources 255 You can force the debugger s graphical interface to use certain schemes 256 Resource setting genera...

Страница 17: ...ugger Help 286 Debugger Level 287 Debugger Macro Add 288 Debugger Macro Call 291 Debugger Macro Display 292 Debugger Option Command_Echo 293 Debugger Option General 294 Debugger Option List 298 Debugger Option Symbolics 299 Debugger Option View 302 Debugger Pause 305 Debugger Quit 306 Expression C_Expression 307 Expression Display_Value 308 Expression Fprintf 311 Expression Monitor Clear_All 316 E...

Страница 18: ...6 Memory Map Write_Read 357 Memory Outport Assign 358 Memory Outport Delete 361 Memory Outport Rewind 362 Memory Outport Show 363 Memory Register 364 Memory Unload_BBA 366 Program Context Display 369 Program Context Expand 370 Program Context Set 371 Program Display_Source 372 Program Find_Source Next 373 Program Find_Source Occurrence 374 Program Interrupt Add 376 Program Interrupt Remove 378 Pro...

Страница 19: ...Constants 419 Symbols 424 Program Symbols 424 Debugger Symbols 425 Macro Symbols 425 Reserved Symbols 426 Line Numbers 426 Addresses 427 Code Addresses 427 Data and Assembly Level Code Addresses 427 Address Ranges 427 Keywords 429 Forming Expressions 430 Expression Strings 431 Symbolic Referencing 432 Storage Classes 432 Data Types 433 Special Casting 436 Scoping Rules 437 Referencing Symbols 437 ...

Страница 20: ...454 fopen 455 getsym 456 inport 457 isalive 458 key_get 459 key_stat 460 memchr 461 memclr 462 memcpy 463 memset 464 open 465 outport 467 read 468 reg_str 469 showversion 470 strcat 471 strchr 472 strcmp 473 strcpy 474 stricmp 475 strlen 476 strncmp 477 until 478 when 479 word 480 write 481 Contents xx ...

Страница 21: ...lation 513 To install software on an HP 9000 system 514 Required Hardware and Software 514 Step 1 Install the software 515 To install the software on a Sun SPARCsystem 517 Required Hardware and Software 517 Step 1 Install the software 518 Step 2 Map your function keys 518 To set up your software environment 520 To start the X server 520 To start HP VUE 521 To set environment variables 522 To verif...

Страница 22: ...Contents xxii ...

Страница 23: ...Part 1 Quick Start Guide ...

Страница 24: ...Part 1 2 ...

Страница 25: ...1 Getting Started with the Graphical Interface How to get started using the debugger s graphical interface 3 ...

Страница 26: ...debugger also has a standard interface for several types of terminals terminal emulators and bitmapped displays When using the standard interface commands are entered from the keyboard You should use the graphical interface for the exercises in this chapter Some advanced commands are not well suited to menus Those commands are entered through the command line The command line allows you to enter s...

Страница 27: ...on Hourglass The hourglass mouse pointer means wait If the debugger is busy executing a program you may stop it by pressing Ctrl C Text The I beam keyboard cursor shows where text entered with the keyboard will appear in the entry buffer or in a dialog box Command line The box keyboard cursor on the command line shows where commands entered with the keyboard will appear Chapter 1 Getting Started w...

Страница 28: ...The Debugger Window Menu bar Action keys Entry buffer Scroll bar Display area Status line Command line Chapter 1 Getting Started with the Graphical Interface 6 ...

Страница 29: ...p action keys to use the contents of the entry buffer Display Area This area of the screen is divided into windows which display information such as high level code simulated input and output and breakpoints To activate a window click on its border In this manual the word window usually refers to a window inside the debugger display area Scroll Bar Allows you to page or scroll up or down the infor...

Страница 30: ... Executable means to select the File menu then select Load from the File menu then select the Executable item from the Load menu Refer to the Entering Debugger Commands for specific information about choosing menu items In this manual the word window usually means a window inside the debugger display area rather than an X window Chapter 1 Getting Started with the Graphical Interface 8 ...

Страница 31: ...e a two button mouse press both buttons together to get the middle button right Click selects first item in pop up menus Click on window border activates windows Press and hold displays menus command select Displays pull down menus May be the left button or right button depending on the kind of computer you have See Platform Differences on page 10 Chapter 1 Getting Started with the Graphical Inter...

Страница 32: ...you are using to run the debugger Mouse Button Bindings Generic Button Name HP 9000 Sun SPARCsystem command select left right Keyboard Key Bindings Generic Key Name HP 9000 Sun SPARCsystem menu select extend char extend char diamond left arrow left arrow left arrow1 right arrow right arrow right arrow1 1 These keys do not work while the cursor is in the main display area Chapter 1 Getting Started ...

Страница 33: ...ere The Demonstration Program The demonstration program used in this chapter is a simple environmental control system ECS The system controls the temperature and humidity of a room requiring accurate environmental control The program continuously looks at flags which tell it what action to take next Note Some commands are printed on two lines in this chapter When entering these commands type the e...

Страница 34: ...nd are in your PATH environment variable Type echo PATH to see the value of PATH 4 If the debugger software is installed on a different kind of computer than the computer you are using edit the platformScheme in the Xdefaults sim file This file is located in directory usr hp64000 demo debug_env sim68000 For example if you are sitting at a Sun workstation which is networked to an HP 9000 Series 300...

Страница 35: ... you whether it should copy the demo files to another directory Answer y You cannot modify the files in usr hp64000 demo Note If you were debugging your own program you would need to enter a command like db68k c mycmd ecs This command starts the debugger which executes the command file mycmd com and loads the absolute file ecs x See the Loading and Executing Programs chapter for more details Chapt...

Страница 36: ...indow Be sure to click only once do not double click The Monitor window should now have a thick border Now activate the Code window 2 Use the right mouse button to click on the border of the Code window If you click on the border of the active window it will be expanded Just click again to show the window in its normal size See the Debugging Programs chapter for a list of other ways to activate a ...

Страница 37: ...y runs the program until the line indicated by the contents of the entry buffer Locate the symbol The area to the right of this symbol is the entry buffer When you started the demonstration program the debugger loaded the entry buffer with the value main Chapter 1 Getting Started with the Graphical Interface To run until main 15 ...

Страница 38: ...perate the horizontal scrolling buttons Use the Page Up and Page Down keys on your keyboard The scroll bar affects the contents of the active highlighted window You might notice that the scroll bar has a sticky slider which always returns to the center of the scroll bar This is so that you can always do local navigation even in very large programs Use the Disp Src action key or the Display Source ...

Страница 39: ...his will place the string init_system into the entry buffer 3 Click on the Disp Src action key 4 Scroll up one line to see the init_system line You should now see the source code for the init_system routine in the Code window Chapter 1 Getting Started with the Graphical Interface To display a function 17 ...

Страница 40: ...ton to display the Code window pop up menu Move the mouse to Run until then release the button Line 34 should now be highlighted Notice that init_system now appears in the Backtrace window at level 0 which means that the program counter is inside the init_system function Chapter 1 Getting Started with the Graphical Interface To run until a line 18 ...

Страница 41: ... assignment to target_temp line 33 2 Hold the right mouse button and select Edit Source from the Code window pop up menu An editor will appear in a new X window The default text editor is vi You can use a different text editor by editing X resources described in the Configuring the Debugger chapter 3 Change the 73 to 74 4 Exit the editor 5 Click on the Make action key The program will be re compil...

Страница 42: ...e line that we changed 1 Position the mouse pointer over line 42 2 Click the right mouse button to set a breakpoint The breakpoint window is displayed showing the breakpoint has been added An asterisk appears in the first column of the Code window next to the location of the breakpoint Dots apppear in front of any other lines such as comments associated with the breakpoint Chapter 1 Getting Starte...

Страница 43: ...You cannot enter debugger commands while the program is executing If you need to stop an executing program type Ctrl C with the mouse pointer in the debugger X window After a few moments line 42 will be highlighted showing that program execution stopped there The Journal window shows that a break occurred and which breakpoint it was Chapter 1 Getting Started with the Graphical Interface To run unt...

Страница 44: ...e macro let s examine it 3 Click on the Edit button in the dialog box This macro will set current_temp to 71 each time the breakpoint is encountered The macro skips over the assignment in the program source code by setting the program counter to line 39 The return value of 0 tells the macro to stop program execution after the macro Chapter 1 Getting Started with the Graphical Interface To patch co...

Страница 45: ...current_temp as shown in the Monitor window is 71 not 68 Click Disp Src PC to show the source in the code window To delete a single breakpoint Once you set a breakpoint program execution will break each time the breakpoint is encountered If you don t want to break on a certain breakpoint again you must delete the breakpoint Suppose you want to delete the breakpoint that was previously set at line ...

Страница 46: ...ointer in the Breakpoint window 2 Hold down the right mouse button to select Delete All Breakpoints from the Breakpoint window pop up menu All breakpoints are deleted Chapter 1 Getting Started with the Graphical Interface To delete all breakpoints 24 ...

Страница 47: ...e the PC PC progress through the source code as shown by the inverse video line in the Code window To run until a stack level Now we need to go back to main You can run the program until it enters main by running to a stack level 1 Position the mouse pointer over the line containing main main in the Backtrace window 2 Select Run Until Stack Level from the Backtrace pop up menu The program counter ...

Страница 48: ...ction key until the program counter is in update_system 2 Click on the Step Out action key The program will execute until it returns from update_system To display the value of a variable 1 Use the left mouse button to highlight num_checks in the Code window 2 Click on the C Expr action key In the Journal window the current value of the variable is displayed in its declared type int Notice that thi...

Страница 49: ...the entry buffer add 10 after num_checks 2 Click on the C Expr action key The new value is displayed in the Journal window and in the Monitor window Chapter 1 Getting Started with the Graphical Interface To change the value of a variable 27 ...

Страница 50: ...n the Recall dialog box click the left mouse button on num_checks 3 In the Recall dialog box click the left mouse button on OK The string num_checks is now in the entry buffer Chapter 1 Getting Started with the Graphical Interface To recall an entry buffer value 28 ...

Страница 51: ...on the mouse pointer in the entry buffer 2 Type in the entry buffer so that it contains num_checks 3 Click on the C Expr action key The result is the address of the variable num_checks The address is displayed in hexadecimal format Chapter 1 Getting Started with the Graphical Interface To display the address of a variable 29 ...

Страница 52: ...ion key When the program stops the code window shows that the program stopped at the next reference to the variable num_checks Try running the program a few more times to see where it stops Notice that num_checks is passed by reference to interrupt_sim Since counter points to the same address as num_checks the debugger stops at references to counter 3 Delete the access breakpoint Select Window Bre...

Страница 53: ...3 When the command has been built type or select Return To use a C printf command The command line s Expression Printf command prints the formatted output of the command to the Journal window using C format parameters This command permits type conversions scaling and positioning of output within the Journal window 1 Place the string num_checks 10 in the entry buffer by using the Recall button 2 Cl...

Страница 54: ...e 2 Hold down the shift key and click the right mouse button The shift click operation selects the second item from a pop up menu which in this case is Command Line On Off You can turn the command line on and off from the Settings pull down menu the Status pop up menu and the command line pop up menu Chapter 1 Getting Started with the Graphical Interface To turn the command line off 32 ...

Страница 55: ...p General Topic 2 Select To Use Help then click on the OK button Spend a few minutes exploring the help topics so that you can find them when you need them Chapter 1 Getting Started with the Graphical Interface To see on line help 33 ...

Страница 56: ...the 68000 Series Debugger Simulator You have used many features of the debugger For additional information on performing tasks with the debugger refer to the User s Guide part of this manual For more detailed information on debugger commands error messages etc refer to the Reference part of this manual Chapter 1 Getting Started with the Graphical Interface To end the debugging session 34 ...

Страница 57: ...Part 2 User s Guide ...

Страница 58: ...Part 2 36 ...

Страница 59: ...2 Entering Debugger Commands How to enter debugger commands using the mouse or the keyboard 37 ...

Страница 60: ...oints cut and paste on line help customizable action keys and pop up recall buffers and other advanced features To use the graphical interface your computer must be running an X Window System that supports OSF Motif interfaces The debugger also has a standard interface for several types of terminals terminal emulators and bitmapped displays When using the standard interface commands are entered fr...

Страница 61: ...ate the next lower numbered window F3 Settings High Level Debug or Settings Assembly Level Debug Debugger Level Switch between assembly level and high level mode F4 Right click on active window border Window Toggle_View Select the alternate display of the active window F5 Help Command Line Debugger Help Access on line help F6 Display Simulated I O Window Screen_On Next Access the standard I O scre...

Страница 62: ...ow to right Ctrl G Shift contents of active window to left Ctrl L Redraw screen Ctrl Q Resume output to screen standard interface only Ctrl R Recall previous command Ctrl S Suspend output to screen standard interface only Ctrl U Clear command line Ctrl End the debug session same as Debugger Quit Yes command The Journal Window The debugger displays debugger commands entered from the keyboard in the...

Страница 63: ...ting Programs chapter for information about loading programs as you start the debugger The Using Macros and Command Files chapter for information about loading command files as you start the debugger The Configuring the Debugger chapter for information about using debugger startup files The on line manual page for information about the db68k command and its command line options To see this informa...

Страница 64: ...he mouse pointer over the name of the menu on the menu bar 2 Press and hold the command select mouse button to display the menu 3 While continuing to hold down the mouse button move the mouse pointer to the desired menu item If the menu item has a cascade menu identified by an arrow on the right edge of the menu button then continue to hold the mouse button down and move the mouse pointer toward t...

Страница 65: ...he mouse method 2 1 Position the mouse pointer over the menu name on the menu bar 2 Click the command select mouse button to display the menu 3 Move the mouse pointer to the desired menu item If the menu item has a cascade menu identified by an arrow on the right edge of the menu button then repeat the previous step and then this step until you find the desired item 4 Click the mouse button to sel...

Страница 66: ... and then press the RETURN key on the keyboard To cancel a displayed menu press the Escape key The interface supports keyboard mnemonics and the use of the arrow keys to move within or between menus For each menu or menu item the underlined character in the menu or menu item label is the keyboard mnemonic character Notice the keyboard mnemonic is not always the first character of the label If a me...

Страница 67: ... area whose pop up menu you wish to access If a pop up menu is available the mouse pointer changes from an arrow to a hand 2 Press and hold the right mouse button 3 After the pop up menu appears while continuing to hold down the mouse button move the mouse pointer to the desired menu item 4 Release the mouse button to select the menu choice If you decide not to select a menu item simply continue t...

Страница 68: ... press the Ctrl U key combination To copy and paste to the entry buffer To copy and paste a word of text position the mouse pointer over the word and click the left mouse button To specify the exact text to copy to the entry buffer position the mouse pointer over the first character to copy then hold the left mouse button while dragging the mouse pointer over the text When you release the mouse bu...

Страница 69: ...hich is currently there You cannot use paste to append text to text already in the entry buffer You can retrieve previous entry buffer values by using the Recall button See To copy and paste from the entry buffer to the command line entry area for information about pasting the contents of the entry buffer into the command line entry area Example To paste the symbol init_system into the entry buffe...

Страница 70: ...Buffer Value Selection dialog box and define the maximum number of entries by setting X resources refer to the Setting X Resources chapter If you decide not to change the contents of the entry buffer click on the Cancel button in the dialog box If you want the Entry Buffer Value Selection dialog box to remain visible after you make a selection press Apply instead of OK You may drag the dialog box ...

Страница 71: ...the entry buffer see the previous To place values into the entry buffer using the keyboard To copy and paste to the entry buffer or To recall entry buffer values task descriptions 2 Choose the menu item or click the action key that uses the contents of the entry buffer The contents of the entry buffer will be used wherever the symbol appears in a menu item or action key To copy and paste from the ...

Страница 72: ... displayed entry buffers in all open windows a paste from the entry buffer to the command line only affects the command line of the window in which you are currently working See To copy and paste to the entry buffer for information about pasting information from the display into the entry buffer To use the action keys 1 If the action key uses the contents of the entry buffer place the desired info...

Страница 73: ...ox The graphical interface uses a number of dialog boxes for selection and recall Directory Selection Selects the working directory You can change to a previously accessed directory a predefined directory or specify a new directory File Selection From the working directory you can select an existing file name or specify a new file name Entry Buffer Recall You can recall a previously used entry buf...

Страница 74: ... iconified along with the main window Except for the File Selection dialog box predefined entries for each dialog box and the maximum number of entries are set via X resources refer to the Setting X Resources chapter In file names you may use a tilde as shorthand for your home directory Chapter 2 Entering Debugger Commands Using Menus the Entry Buffer and Action Keys 52 ...

Страница 75: ...bel informs you what kind of file selection you are performing Text entry area Text is either copied here from the recall list or entered directly Clicking this button chooses the file name displayed in the text entry area and closes the dialog box Entering a new file filter and clicking this button causes a list of files matching the new filter to be read from the directory Clicking this button c...

Страница 76: ...s Text entry area Directory name is either copied here from the recall list or entered directly Clicking this button chooses the directory displayed in the text entry area and closes the dialog box Clicking this button chooses the directory displayed in the text entry area but keeps the dialog box on the screen instead of closing it Clicking this button cancels the directory selection operation an...

Страница 77: ...ut the interface When you choose a topic from the Help Index the interface displays a window containing the help information You may leave the window on the screen while you continue using the interface Examples To see more information on how to use the on line help click on Help then click on General Topics then click on To Use Help then click on the OK button Chapter 2 Entering Debugger Commands...

Страница 78: ...face Additionally the graphical interface makes the command tokens pushbuttons so commands may be entered using the mouse If you are using the standard interface the command line is the only way to enter commands This section describes how to Turn the command line off on Enter commands Edit commands Recall commands Display the help window Chapter 2 Entering Debugger Commands Using the Command Line...

Страница 79: ...se pointer in the display area and press any alphanumeric key On means that the command line is displayed and you can use the command token pushbuttons the command return and recall pushbuttons and the cursor pushbuttons for command line editing Off means the command line is not displayed and you can use only the pull down and pop up menus and the action keys to control the interface The command l...

Страница 80: ... area press and hold the right mouse button until the Command Line pop up menu appears then choose the Execute Command menu item You may need to combine pushbutton and keyboard entry to form a complete command A complete command is a string of partial commands or command tokens You know a command is complete when return appears on one of the command token pushbuttons The interface does not check o...

Страница 81: ...the characters to be inserted To delete characters to the left of the cursor position press the Backspace key When the cursor arrives at the beginning of a command word or token the softkey labels change to display the possible choices at that level of the command When moving by words left or right the Backup pushbutton is grayed out and unresponsive when the cursor reaches the beginning of the co...

Страница 82: ... Line pop up menu appears choose Forward Tab or Backward Tab from the menu When the cursor arrives at the beginning of a command word or token the softkey labels change to display the possible choices at that level of the command See To edit the command line using the mouse and the command line pushbuttons and To edit the command line using the keyboard for information about additional editing ope...

Страница 83: ...s for information about using dialog boxes To get help about the command line To display the help topic explaining the operation of the command line select Help General Topic Command Line Operation To display the command line help menu select Help Command Line To find commands which duplicate a menu selection To see how a menu item maps to command line commands 1 Select Window Journal Browser Star...

Страница 84: ...e you with a look ahead feature showing you the debugger commands available to you at any time This section describes how to Enter commands Edit commands Recall commands Access on line help information To enter debugger commands from the keyboard 1 Build a command using direct keyboard entry by successively typing letters corresponding to command tokens until a complete command is formed 2 Execute...

Страница 85: ...mation on how to execute the command Qualifiers are normally single words that immediately follow the command name For example in the command Program Find_Source Next Backward the qualifier Backward causes the debugger to search the file from the current position in the file towards the beginning of the file for a specified string Type parameters in their entirety from the keyboard Parameters must...

Страница 86: ...ecall commands from the command line press the Ctrl R key combination Continue to press Ctrl R to move from the most recently executed commands backward to earlier commands To move forward in the recall list press Ctrl B The command line recall feature is available to you but it is not as easy to use or as flexible as the Command Recall dialog box in the graphical interface You must search through...

Страница 87: ...mmand you entered before displaying the help window The debugger assumes you need help with this command Press Return to display information about the command Pressing Return or Down displays information on the next item in the help menu Pressing Up displays information about the previous item in the help menu You can move the cursor to the first command of a command type Breakpt Debugger etc by e...

Страница 88: ... key one time or press the escape Esc key twice to exit the help window Note that you cannot exit the graphical interface help window this way Chapter 2 Entering Debugger Commands Using the Command Line with the Keyboard 66 ...

Страница 89: ... line in the following format STATUS Status J L W CPU MODULE module BREAK R Debugger Status The Status field on the status line shows the current state of the debugger The possible values for this field are Command The debugger is ready to accept a command or a macro definition Execute The debugger is executing target environment instructions The debugger displays Execute on the status line when y...

Страница 90: ...e The Register indicator R indicates that a register variable is being used but its lifetime is not known by the debugger The debugger displays an R when the variable is referenced indicating that the values being used for this variable may not be valid CPU Simulated The CPU entry indicates which microprocessor is being simulated Current Module The MODULE entry names the current module module The ...

Страница 91: ...Information about how this version of the debugger differs from previous versions is now included in the on line help This includes the information which was previously printed in the Operating Notice or the Versions chapter of the User s Guide Chapter 2 Entering Debugger Commands Viewing Debugger Status 69 ...

Страница 92: ...ing redefined in your window manager resource file Delete any redefinitions from the resource file For example it is very common for users of mwm to redefine the right mouse button to raise a window by changing the mouse button definitions in the mwmrc file The redefinition causes mwm to trap the right mouse button and not pass it through to the debugger Deleting the redefinition will allow the bu...

Страница 93: ...3 Loading and Executing Programs How to load a program into the debugger and control its execution 71 ...

Страница 94: ...ur after each instruction The TRAP instruction causes an illegal instruction exception Use normal debugger commands to set breakpoints 68020 Module Support CALLM and RTM CALLM and RTM are used in conjunction with external hardware to maintain a finer resolution of access control than that afforded by the supervisor and master bits On the actual 68020 microprocessor if the module descriptor used by...

Страница 95: ...acktracing The Getting Started chapter of the Motorola 68000 Family C Cross Compiler User s Guide gives an example of how to compile a simple program and execute it in the debugger simulator environment Note Do not use the h option when compiling and linking your program for the debugger The h option causes the compiler to generate HP 64000 file formats Use the default settings which generate exec...

Страница 96: ...ions on one or more of the following problems may occur while using the debugger Target program execution in the debugger may not appear to correctly reflect the logical flow of the program The debugger may not stop execution at a high level breakpoint or may stop execution at the wrong location in the program The debugger may not be able to display local variables Forcing Variables to be Placed i...

Страница 97: ...s Compiler User s Guide describes the environment dependent routines supplied with the compiler Using Microtec Language Tools The debugger is designed to work with the HP Advanced Cross Language System However you can also use the Microtec Research Inc language tools with the debugger Microtec s language tools are quite similar to the HP language tools The input syntax and code generated by the HP...

Страница 98: ...s you will find that some symbols may be incorrectly scoped with the Microtec assembler Linker Defaults You should be aware of these differences between lnk68k and ld68k Output file format ld68k produces HP MRI IEEE 695 by default lnk68k products Motorola S Records by default To generate an HP MRI IEEE 695 x format absolute file use the H command line option or fi flag Local symbols ld68k provides...

Страница 99: ...68K Compiler mcc68k is very different from the HP compilers Study the Microtec documentation if you need specific information about mcc68k Chapter 3 Loading and Executing Programs Compiling Programs for the Debugger 77 ...

Страница 100: ...ition to path names you can place a percent sign character in the HP64_DEBUG_PATH definition The percent sign forces the debugger to search for files in their compile time locations Compile time paths are stored in the absolute file The search of these paths occurs at the point that the percent sign is found in the variable For example if the percent sign is first in the variable before any paths ...

Страница 101: ... proj src 4 users proj mysrc 5 the paths specified in the absolute file at compile time 6 the current directory If you use the csh shell most Sun systems use setenv instead of export to set the variable To load programs When starting the debugger enter the executable file name as the last term in the db68k command line db68k abs_file Or Select File Load Executable then use the File Selection dialo...

Страница 102: ... do not need to specify the x file extension when entering the absolute file name The Program Load Default command is equivalent to the Program Load New All Pc_Set command Examples To load the executable file ecs x db68k ecs Or Program Load Default ecs To load program code only Select File Load Program Only then use the File Selection dialog box to select the absolute file Or Using the command lin...

Страница 103: ...No_Pc_Set absolute_name To load symbols only Use the I option to the db68k command when starting the debugger db68k I absolute_file RETURN Or Select File Load Symbols Only then use the File Selection dialog box to select the absolute file Or Using the command line enter Program Load New Symbols_only No_Pc_Set absolute_file Enter the name of the absolute file whose symbols are to be loaded and pres...

Страница 104: ... symbols from the absolute file are loaded Pc_Set the program counter PC is set to the transfer address found in the absolute file No_Pc_Set the program counter PC is not changed When you append a program it is loaded without deleting the existing program The new symbols will be added in a tree with the executable file name as the root Examples To append the program module2 x to the current progra...

Страница 105: ... symbols local symbols in the source module containing main and local symbols in assembly modules are loaded during the initial load of the x file Local symbols in C source modules other than that module which contains main are loaded either when the user explicitly references the module or when the program is stopped with the program counter in the module You can also use the d option when starti...

Страница 106: ... stop address To step through programs Click on the Step action key Or Select Execution Step from PC Or Using the command line enter Program Step And press the Return key Your program executes one C source line high level mode or one machine instruction assembly level mode at a time from the address contained in the program counter PC When the program calls a function stepping continues in the cal...

Страница 107: ...routine run until the stack level above the level of the library routine Use the Program Run Until command or the Backtrace window pop up menu To step over functions Click on the Step Over action key Or Select Execution Step Over from PC Or Using the command line enter Program Step Over And press the Return key The debugger steps through the program one line or one instruction at a time However if...

Страница 108: ...anent or temporary breakpoint An error occurs A STOP instruction is encountered You press Ctrl C The program terminates normally You can run from the current program counter address to resume program execution after the program has been stopped To run from a start address 1 Enter the start address into the entry buffer 2 Select Execution Run from Or Chapter 3 Loading and Executing Programs Steppin...

Страница 109: ...stop break address 1 Enter the stop address into the entry buffer 2 Select Execution Run until or click on the Run til action key Or Using the command line enter Program Run Until break_addr Type in the stop address and optionally a pass count and press the Return key The break address break_address acts as a temporary instruction breakpoint It is automatically cleared when program execution is ha...

Страница 110: ... the second access to address update_system To count simulated clock cycles Look at the cycles value in the register window When using the simulator the cycles value in the register window is the cumulative number of clock cycles executed since this value was last reset by means of the command Memory Registers cycles 0 for example This count is based on 68020 cycle counts with the assumption that ...

Страница 111: ...r emulator must not refer to cycles To add simulated wait states Set the value of the wait_state pseudoregister The maximum value of wait_state is 255 0xFF Example To add three cycles to simulated memory accesses type wait_state 3 in the entry buffer then click on the C EXPR action key Chapter 3 Loading and Executing Programs Stepping Through and Running Programs 89 ...

Страница 112: ...formation To set a memory access breakpoint Enter the address which may be a symbol in the entry buffer Select Breakpoints Set and select Read Write or Read Write Or Using the command line enter Breakpt select the type of access to break on Read Write or Access enter the address of the memory location and press the Return key The access types have the following meanings Read break on read accesses...

Страница 113: ...urrent_temp To cause execution to halt each time the program writes to the variable current_temp Breakpt Write current_temp To set an instruction breakpoint Position the mouse pointer in the code window over the line at which you wish to set a breakpoint Either click the right mouse button or press and hold the right mouse button to display the Debugger Display pop up menu and choose Set Clear Bre...

Страница 114: ...oFF Setting the option to On causes breakpoints to be aligned based on the assembly language instructions found in memory at the time the breakpoints are set If multiple breakpoints exist in the same program area their alignment may be incorrect Make sure the Align_Bp option is set to oFF to prevent breakpoint alignment problems See the Configuring the Debugger chapter for more information Example...

Страница 115: ...le To set a breakpoint for the function print which is not in a class for float arguments enter print float in the entry buffer and select Breakpoints Set Another way to set a breakpoint for the function print is to enter print in the entry buffer select Breakpoints Set then type the number of print float from the menu in the Journal window To set a breakpoint for C functions in a class Set a brea...

Страница 116: ...window over the breakpoint you wish to clear Hold the right mouse button and select Delete Breakpoint Or Place the breakpoint address in the entry buffer then select Breakpoints Delete Or Using the command line enter Breakpt Delete brkpt_nmbr Enter the breakpoint number and press the Return key The debugger assigns a breakpoint number to each breakpoint The debugger uses this number to remove the ...

Страница 117: ... where address is a parameter of the same form used to set a breakpoint Examples To delete breakpoint number 1 Breakpt Delete 1 To clear all breakpoints Select Breakpoints Delete All Or Select Delete All Breakpoints from the Breakpoints window pop up menu Or Using the command line enter Breakpt Clear_All And press the Return key Chapter 3 Loading and Executing Programs Using Breakpoints 95 ...

Страница 118: ...een When made active this window displays breakpoint information including Breakpoint number Breakpoint address Name of the module or function containing the breakpoint in high level mode Module line number in high level mode Breakpoint type Command arguments entered with the breakpoint command The following paragraphs describe each field in the breakpoint window Breakpoint number The debugger ass...

Страница 119: ...e code and sets a breakpoint on the next line number for which the compiler generated executable code In the code window the debugger places asterisks beside all line numbers that are associated with breakpoints The debugger places period symbols beside line numbers that are specified as breakpoints but have no code associated with them Breakpoint type The breakpoint type TYPE describes what type ...

Страница 120: ... and macro names all appear in this field For more information about breakpoints see the specific breakpoint command descriptions in the Debugger Commands chapter Chapter 3 Loading and Executing Programs Using Breakpoints 98 ...

Страница 121: ...is is the address of the machine level instruction immediately following the call to initialize_system Place the mouse pointer over the line in the backtrace window that lists main Hold the right button and select Run Until Stack Level Or using the command line and assuming main is at stack level 1 enter Breakpoint Instr 1 This command will cause program execution to stop when the program returns ...

Страница 122: ...shows you how to Define simulated interrupts Remove simulated interrupts To define simulated interrupts Using the command line enter Program Interrupt Add Select Repetitive or Once specify how often the interrupt should occur specify the interrupt level number and exception vector number then press the Return key Use the Program Interrupt Add command to cause a simulated program interrupt to occur...

Страница 123: ...the interrupts to be removed and press the Return key The Program Interrupt Remove command cancels any pending interrupts Examples To remove all level 7 interrupts Program Interrupt Remove 7 To remove all interrupts Program Interrupt Remove Chapter 3 Loading and Executing Programs Using Simulated Interrupts 101 ...

Страница 124: ...Reset to Monitor Or Using the command line enter Debugger Execution Reset_Processor And press the Return key Resetting the processor simulates a microprocessor reset operation by restoring the microprocessor to its initial state To reset the program counter to the starting address Select Execution Set PC to Transfer Or Chapter 3 Loading and Executing Programs Restarting Programs 102 ...

Страница 125: ...ed when you reset the processor or reset the program counter Therefore program variables are not reset to their original values To reset program variables after resetting the processor or program counter reload your program For faster loading you can load only the program code The debugger retains symbol information You do not have to reload symbol information if symbol addresses have not changed ...

Страница 126: ...urrent CPU state Load a saved CPU state To save the current CPU state Using the command line enter Debugger Execution Save_State Enter the name of the file in which the CPU state should be saved and press the Return key The current memory contents and register values are saved to the specified file If a file name is not specified the default file name db68k sav is used Examples To save the current...

Страница 127: ... locations Using the command line enter Memory Map Guarded Enter the range of addresses that should not be accessed and press the Return key Examples To configure memory address range 8000h through 0a000h as guarded nonaccessible memory Memory Map Guarded 8000h 0a000h To prevent writing to memory locations Using the command line enter Memory Map Read_Only Chapter 3 Loading and Executing Programs M...

Страница 128: ...nd line enter Memory Map Write_Read Enter the range of addresses to which reads and writes are allowed and press the Return key Examples To configure memory address range 2000h through 3fffh as Write_Read RAM memory Memory Map Write_Read 2000h 3fffh To display current memory map assignments Using the command line enter Memory Map Show And press the Return key Examples To display the memory map Cha...

Страница 129: ...U 00001048 00002851 Load section prog RAM SIMU 00002854 0000906B Multiple load sections RAM SIMU 00040000 00043FFF Load section stack RAM SIMU 00060000 0006401D Multiple load sections The command displays memory address ranges mapped as Guarded NOMEM Read_Only ROM or Write_Read RAM in the journal window The display includes a list of sections loaded and their address ranges Chapter 3 Loading and E...

Страница 130: ...ry Inport Assign command assigns a simulated input port and defines its size address and input source The port address can be any valid address The source of input data may be the standard I O screen the journal window a file an expression string or the input or output port buffers Examples To assign address 0x40C as an I O port input of size byte Memory Inport Assign Byte 0x40C Source_Is Data_Str...

Страница 131: ...input port at address 400h Memory Inport Delete 400h To rewind the input file associated with an input port Using the command line enter Memory Inport Rewind Enter the address of the input port whose associated input file or is to be rewound or whose input string pointer is to be reset and press the Return key Examples To rewind the input file or string associated with input port 400h Memory Inpor...

Страница 132: ...gle value buffer associated with it The buffer contains the last value read from the port This value can be represented in byte word or long format Examples To show all assigned input ports Memory Inport Show To show input port at address 400h Memory Inport Show 0x400 To show all input ports in the address range 400h through 4ffh Memory Inport Show 0x400 0x4ff Chapter 3 Loading and Executing Progr...

Страница 133: ...es the address size and output destination of a simulated output port The target program can write output data the the simulated output port The port address can be any valid address Examples To assign address 0x408 as an I O port output of size word Memory Outport Assign Word 0x408 Destination_Is File myproj cmdout dat Write operations to the port will access file myproj cmdout dat You must speci...

Страница 134: ... like a normal memory location Examples To disable the output port at address 408h Memory Outport Delete 408h To rewind the output file associated with an output port Using the command line enter Memory Outport Rewind Enter the address of the output port whose associated output file is to be rewound and press the Return key Examples To rewind the output file associated with output port 408h Memory...

Страница 135: ...ue buffer associated with it that contains the last value written to the port The buffer value can be displayed in byte word or long format Examples To display all assigned output ports Memory Outport Show To display output port at address 408h Memory Outport Show 0x408 To display all output ports in the address range 400h through 4ffh Memory Outport Show 0x400 0x4ff Chapter 3 Loading and Executin...

Страница 136: ...Shell command lets you temporarily leave the debugging environment by forking a UNIX shell The shell created is whatever the shell variable SHELL is expanded to In this mode you may enter operating system commands The Debugger Host_Shell command does not end the debugger session it suspends program operation To return to the debugger enter Ctrl D or type exit at the UNIX prompt and press the Retur...

Страница 137: ...d in that window as specified by the shellCommand X resource When using the standard interface stdout from the command is written to the journal window stderr is not captured Commands writing to stderr will corrupt the display Interactive UNIX commands cannot be used in this mode Examples To display the current working directory enter Debugger Host_Shell pwd Chapter 3 Loading and Executing Program...

Страница 138: ...save the current memory contents and register values 2 Quit the simulator session using the Debugger Quit command 3 Start the debugger emulator 4 Load the state file created with the Debugger Execution Save_State command using the Debugger Execution Load_State command This will restore memory and processor registers to the state you saved in the debugger simulator Chapter 3 Loading and Executing P...

Страница 139: ...emory Select File Store BBA Data Then choose a file name from the File Selection dialog box Or Using the command line enter Memory Unload_BBA All And press the Return key This command unloads branch analysis information associated with all absolute files loaded The default file name is bbadump data The BBA preprocessor b option must be used at compile time in order for this information to exist in...

Страница 140: ...Chapter 3 Loading and Executing Programs Using the Debugger with the Branch Validator 118 ...

Страница 141: ...4 Viewing Code and Data How to find and display source code and memory contents Chapter 4 Viewing Code and Data 119 ...

Страница 142: ...embly program These symbols must be given base addresses Debugger symbols which may be used to aid and control the flow of the debugger These symbols are specified without a base address and only debugger commands and C expressions in macros can refer to them They cannot be referenced by the program in target memory Example To add a program symbol of type int default as an alias for num_checks ent...

Страница 143: ... the module The wildcard character may be placed at the end of a symbol name to represent zero or more characters If used with no symbol name is treated the same as that is all symbols are displayed Examples To display the symbol update_sys in the current module Symbol Display Default update_sys Symbol Display Default update_sys ecs update_sys Type is High level module Code section 00001436 thru 0...

Страница 144: ... Display Default To delete a symbol from the symbol table Using the command line enter Symbol Remove symb_name Enter the symbol module or function name then press the Return key The specified symbols are removed from the symbol table Only program symbols and user defined debugger symbols can be deleted from the symbol table Examples To delete the symbol counter in function update_system Symbol Rem...

Страница 145: ...To delete all symbols in module update_sys Symbol Remove update_sys To delete all symbols in all modules Symbol Remove Chapter 4 Viewing Code and Data Using Symbols 123 ...

Страница 146: ...reen Number High level screen Assembly level screen Standard I O screen 1 2 3 This section shows you how to Display the high level screen Display the assembly level screen Switch between the high level and assembly screens Display the standard I O screen Display the next screen activate a screen High Level Screen The debugger automatically displays the high level screen when an executable x file c...

Страница 147: ... The assembly level window displays assembly level code and processor register and stack information Standard I O Screen The debugger displays the standard I O screen when your program requests interactive input from the standard input device stdin or directs output to the standard output device stdout It may also be displayed using the F6 function key This screen has five windows status breakpoin...

Страница 148: ...ndow Screen_On High_Level To display the assembly level screen Select Settings Assembly Level Debug Or Using the command line enter Window Screen_On Assembly_Level To switch between the high level and assembly screens Press the F3 function key Or Chapter 4 Viewing Code and Data Displaying Screens 126 ...

Страница 149: ... Select Window Simulated IO Or Using the command line enter Window Screen_On Stdio The standard I O screen is displayed when your program requests interactive input from the standard input device keyboard or when your program writes information to the standard output device To display the next screen activate a screen Press the F6 function key Or Chapter 4 Viewing Code and Data Displaying Screens ...

Страница 150: ...yed Either the high level or the assembly level screen will be displayed not both The debugger screens are numbered as follows Screen Name Screen Number High level screen Assembly level screen Standard I O screen User defined screens 1 2 3 4 256 Chapter 4 Viewing Code and Data Displaying Screens 128 ...

Страница 151: ...ach window displays information specific to its associated name for example the breakpoint window displays breakpoint information Each of the 18 predefined windows has a corresponding name and number All windows except the log file and journal file windows which are files also have an associated screen number The following table lists the predefined windows and their associated names and numbers C...

Страница 152: ...evel mode The code window displays disassembled machine code in assembly level mode The C source code that generated the assembly code can be interleaved with the assembly level code When disassembled code is displayed the address and machine code of a disassembled instruction are displayed on the left side of the window as hexadecimal values For instructions over 6 bytes in length bytes 7 through...

Страница 153: ...active window The cursor keys scroll bar and function keyF4 select the alternate display only operate in the active window If you are using a terminal without graphics capabilities the active window is indicated by single dashes around the border other windows all have borders of equals signs The window number is displayed in the upper right border of the window Examples To make the high level bac...

Страница 154: ...w Toggle_View Window where Window is the name of the window whose alternate view is to be displayed and press the Return key The typical default alternate view of a window is an enlarged view of the window letting you view more information Repeating the command switches between the normal view and the alternate view of the active window Example To display the alternate view of the high level code ...

Страница 155: ...window one half of the window length at a time Press the Home or End Shift Home key to position the window at the beginning or end of the information displayed in the window Type Ctrl F or Ctrl G to shift the contents of the active window to the right or left The following table describes the functions of the cursor control keys in the active window and the command line window Chapter 4 Viewing Co...

Страница 156: ...r editing data field of command Delete char Delete character within data field of command Undo Back tab The Home and End Shift Home keys have additional functions when used with the code and stack windows The following table describes how the Home and End Shift Home keys work in these active windows Active Window Home Key End Key Code Move to top of module Move to bottom of module Stack Move to cu...

Страница 157: ...he More display has ended You can turn the More list mode off or on with the Settings Debugger Options dialog box For more information see your operating system documentation on the more command To copy window contents to a file Select File Copy Window Or From the command line enter the following commands File User_Fopen Append 99 File file_name Expression Fprintf 99 w window_number File Window_Cl...

Страница 158: ... in a separate browser window You may start several nested browser windows Use End to end output to the current browser window without closing the window Selecting Restart has the effect of an End followed by a Start Use NextNCmds to record the next n commands in a browser window for example to record commands to use for an action key Chapter 4 Viewing Code and Data Displaying Windows 136 ...

Страница 159: ... Or using the command line enter Program Display_Source Enter the line number or function name of the code you wish to display and press the Return key Examples To display the C source code at line number 1 in the current module Program Display_Source 1 To display the C source code at function main Program Display_Source main To display C source code at overloaded C function cfunc you can either g...

Страница 160: ... command line enter Program Find_Source Occurrence Direction Select either Forward or Backward as the direction enter the line number or string you wish to find and press the Return key Example To find the first occurrence of the string main Program Find_Source Occurrence Forward main To find next occurrence of a string Select Display Source Find Again Or Using the command line enter Program Find_...

Страница 161: ...ither Forward or Backward as the direction and press the Return key Example To find the next occurrence of a string Program Find_Source Next Forward Chapter 4 Viewing Code and Data Displaying C Source Code 139 ...

Страница 162: ...splay assembly code Select Settings Assembly Level Debug Or Using the command line enter Window Screen_On Assembly_Level The Code window will show disassembled insructions Chapter 4 Viewing Code and Data Displaying Disassembled Assembly Code 140 ...

Страница 163: ...elect File Context Symbols enter the module or function name in the dialog box and click on the OK pushbutton Or Using the command line enter Program Context Set Enter the module or function name and press the Return key The module and function scope is used by the debugger to uniquely identify symbols For example several functions may have local variables with the same names When you use that var...

Страница 164: ...ich the program counter is pointing Program Context Set To display current module and function Select Display Context Click on the Done pushbutton when you wish to stop displaying the information Or Using the command line enter Program Context Display The current module function and line number are displayed in the journal window To display debugger status Select Window Status Or Chapter 4 Viewing...

Страница 165: ...ister from a list of register names and click Read Current Register Value to display the register value Or Using the command line enter Window Active Assembly Registers The register window shows the current values of the microprocessor s registers and several debugger variables The microprocessor register values are labeled with their standard names The debugger displays all values in hexadecimal ...

Страница 166: ... truncated to show only the address bits valid for the current CPU type Cycle Count Pseudoregister cycles The number of cycles cycles used by instructions since this counter was last cleared by the command Memory Register cycles 0 for example is displayed as the pseudoregister cycles Exception Handling Keyword exc The value of the pseudoregister exc determines how the debugger handles exceptions S...

Страница 167: ...2 68HC001 Status Register Stack Pointers Control Registers T S III XNZVC USP SSP only one shown None The ISP register of the 68020 corresponds to the SSP register of the other processors The S and M bits of the status register determine which stack pointer appears in A7 the other stack pointers appear separately as USP MSP ISP or SSP To list all registers Using the command line enter Symbol Displa...

Страница 168: ...n from the compiler startup routine to the current function in high level mode This window displays from left to right Function nesting level Return address to the calling function Frame status character Module containing the function Function name Function Nesting Level The nesting level of the current function is always 0 the calling function always 1 etc You may reference the nesting level when...

Страница 169: ...n a function has been stripped of debug information The frame is not valid The debugger is at the start of an interrupt routine The debugger is executing an interrupt routine Module Name If the function is in a known module the backtrace window displays the module name If the program counter is pointing to an address that is not contained in a module known to the debugger the module field in the b...

Страница 170: ...evel 1 The module and function shown are based on this address that is the address falls within their code spaces When program execution breaks on an address that has no associated public label nesting level 1 is based on the processor s frame pointer register A6 In this case the stack location four bytes above the location pointed to by register A6 contains the return address of the calling funct...

Страница 171: ...ion at the specified stack backtrace level Select Disp Vars at Stack Level from the Backtrace window pop up menu Or Using the command line enter Program Context Expand stack_level Enter the stack level preceded by an at sign and press the Return key The values of the parameters passed to the function and the function s local variables are displayed in the Journal window Example To display local va...

Страница 172: ...the object which invoked the function The program counter must be inside the function otherwise you may see a Local variable not alive error message Example To see the address of the object that invoked the cfunc function in class C enter the following string in the entry buffer C cfunc this then select Display Var Expression Chapter 4 Viewing Code and Data Displaying Program Context 150 ...

Страница 173: ... calculate the value of a C expression Enter the expression in the entry buffer then select Display C Expression Or Using the command line enter Expression C_Expression Enter the C expression to be calculated and press the Return key The value of the C expression is displayed in the journal window If the C expression is an assignment statement the Expression C_Expression command sets the value of ...

Страница 174: ...to copy the expression or variable into the entry buffer then select Display Var Expression Or Using the command line enter Expression Display_Value Enter the expression or variable whose value is to be displayed and press the Return key The value of the expression or variable is displayed in the journal window The contents of an item such as an array are displayed instead of the C value of the it...

Страница 175: ...py the name of the structure into the entry buffer 2 Add an asterisk in front of the name of the structure 3 Select Display Var Expression If you are using the command line use the Expression Display_Value command Example To display the names of the members of structure astruct use the following expression in the entry buffer astruct The operator tells the debugger to display the members of the st...

Страница 176: ...ers of a C object Enter the name of the C object in the entry buffer and select Display Var Expression Or Using the command line enter Expression Display_Value object Remember you are displaying the values in an object so you need to run the program to the point where the object is created To display the members of a class see To display the members of a C class Example To display the members of o...

Страница 177: ...ess the Return key The monitor window displays monitored variable expressions This window can be displayed in both the high level and assembly level screens Variables in the monitor window are updated each time the debugger stops executing the program The program is not considered to be stopped when a breakpoint with an attached macro is encountered Example To monitor the value of variable current...

Страница 178: ...e monitoring specified variables Select Delete Variable in the Monitor window pop up menu Or Using the command line enter Expression Monitor Delete Enter the number of the variable shown in the monitor window that should no longer be monitored and press the Return key The variable is removed from the monitor window Example To stop monitoring variable 2 in the monitor window Expression Monitor Dele...

Страница 179: ...ar_All All variables are removed from the monitor window To display C inheritance relationships Enter the name of a C class in the entry buffer then select Display Symbols Browse C Class Or Using the command line enter Symbol Browse Enter the name of the C class to be displayed and press the Return key Chapter 4 Viewing Code and Data Using Expressions 157 ...

Страница 180: ...t is used only for writing to a command file The debugger associates the journal file window window no 29 with a journal file so that it can write journal window output to the journal jou file Additional output may be written to the journal file by writing to window 29 Examples To print the value of var to user window 57 as a single character Expression Fprintf 57 c var To print a string in double...

Страница 181: ... To print the value of var to the journal window as a single character Expression Printf c var To print the string in double quotes to the journal window followed by the floating point value of float_temp with a precision of 2 Expression Printf The value of float_temp is 2f n float_temp See Also To view commands in a separate window on page 136 Chapter 4 Viewing Code and Data Using Expressions 159...

Страница 182: ...pared to then press the Return key Example To compare the block of memory starting at address 1000h and ending at address 10ffh with a block of the same size beginning at address 5000h and stop when a difference is found Memory Block_Operation Match Stop_On_Mismatch 1000h 10ffh 5000h To search a memory block for a value Using the command line enter Memory Block_Operation Search Size Until Select e...

Страница 183: ...mand line enter Memory Block_Operation Test Size Until Select either Byte Word or Long as the size of the memory locations select either Once or Repeatedly to specify when the search should stop enter the address range and the value that should be found in the range and press the Return key Example To test for the expression gh in the memory range from address 1000h through address 10ffh and stop ...

Страница 184: ...d line enter the starting address or the address range of the memory whose contents are to be displayed and press the Return key Examples To display disassembled memory in the code window starting at the symbol _emeg_shutdown this command works only in assembly level mode Memory Display Mnemonic _emeg_shutdown To display memory in byte format in the journal window starting at the symbol current_hu...

Страница 185: ...ler HP B3640 your programs can use SIMIO by means of the C routines supplied to you with the debugger software These routines can be found in a subdirectory of debugger demo directory usr hp64000 demo debug_env sim68000 named mri Your programs can use these functions to open close read or write to files etc in the debugger environment See the simio c simio h and the README files in the mri subdire...

Страница 186: ... code to be placed in the first byte of the CA The SIMIO process polls the CA buffer memory When it finds a command the SIMIO process executes the command When the SIMIO process completes the command the first byte of the CA buffer is changed to the command return code In the debugger simulator the debugger stops executing the program while a SIMIO command is being processed This causes no timing ...

Страница 187: ...s UNIX Processes UNIX processes can be run as subprocesses to the debugger with their input and output directed to the user program Subprocesses are controlled from the user program by a Process Identification number PID This lets the user program check specific subprocesses send them signals or stop them This subprocess facility allows user programs to take advantage of the powerful software and ...

Страница 188: ...ame will be replaced by the name stored in the stdin_name This name is set via the Stdio_Redirect command stdout This name will be replaced by the name stored in the stdout_name This name is set via the Stdio_Redirect command stderr This name will be replaced by the name stored in the stderr_name This name is set via the Stdio_Redirect command dev simio keyboard This name refers to the keyboard wh...

Страница 189: ...bugger Execution IO_System Mode Cooked In the Cooked mode the keyboard input is processed This lets you type and then edit the line to correct errors When the final line is composed press the Return key to enter the line Once the line is entered it is read by the target program Only the characters from the final line and the carriage return character are passed as input If program execution is int...

Страница 190: ... of the program See also To set the keyboard I O mode to cooked To control blocking of reads Set the O_NDELAY flag in the startup routine The flag O_NDELAY is passed to the function open to control whether or not reads from the keyboard will block waiting for characters This flag can only be set when opening the stream it may not be changed after the file stream is open This flag can be set in the...

Страница 191: ...ect the three I O streams by changing the translation names for the stdio streams Using the command line enter Debugger Execution IO_System Stdio_Redirect stdin_name stdout_name stderr_name Enter the new names for standard input standard output and standard error then press the Return key 2 Reset the program counter to the startup address Select Execution Set PC to Transfer Or using the command li...

Страница 192: ...sed to redirect the streams after they have been opened The target program must be rerun from the startup address to allow the stdio streams to be reopened if the translations have been changed Examples To redirect the standard input file to the keyboard the standard output file to the display and the standard error file to file users project errorfile Debugger Execution IO_System Stdio_Redirect d...

Страница 193: ...ue of macro FOPEN_MAX from 12 to the new maximum number of open files the limit is 40 in file stdio h 2 Change to the appropriate environment directory under usr hp64000 env then change to the src subdirectory 3 Recompile file startup c For example for a 68000 familyprocessor type cc68k p 68000 Ouc startup c 4 Add startup o to the environment library using the command ar68k r startup env a You can...

Страница 194: ...gger environment Emulators which do not have the debugger interface do not support the increased number of open SIMIO file descriptors Calls to the SIMIO function open will fail in this environment if 12 file descriptors have already been allocated Chapter 4 Viewing Code and Data Using Simulated I O 172 ...

Страница 195: ...5 Editing Code and Data How to use the debugger to make permanent or temporary changes to source code memory contents and registers Chapter 5 Editing Code and Data 173 ...

Страница 196: ...l need to re compile the source file You can recompile with a click of the mouse if you define the Make action key to compile the target program To edit source code from the Code window Place the mouse pointer over the line you want to edit Select Edit source from the Code window pop up menu The debugger will start the editor in a new X window The cursor in the editor window will be on the same li...

Страница 197: ...c in the entry buffer 2 Select File Edit At Location The interface determines which source file contains the code generated for the address in the entry buffer and opens an edit session on the file To edit a file based on the current program counter Select File Edit At PC Location The interface determines which source file generated the address currently in the program counter and opens an edit se...

Страница 198: ...m your source code using the left mouse button When you release the button the expression will appear in the entry buffer Now edit the expression to have the desired value 2 Click on the C Expr action key Or select Display C Expression from the menu bar The value of the variable will be changed until the program modifies it You can continuously monitor the variable s value if you display it in the...

Страница 199: ...contain any number of C expressions and debugger commands The last two lines of the macro should be Modify Register PC next_line return 1 where next_line is the number of the line after the breakpoint Return 0 instead of 1 if you want the debugger to stop after the macro is executed Exit the editor as usual then click on the Attach button in the Macro Operations dialog box Now whenever the breakpo...

Страница 200: ...ource code by deleting lines 1 Write a macro that sets the program counter to point to the first line of code beyond the lines of code that you want to delete The macro must provide a return value of 1 true in order for the program to continue after the macro is executed 2 Set a breakpoint on the first line to be deleted and specify the macro with that breakpoint 3 Start your program The program w...

Страница 201: ...30 and insert a new line incrementing count by one you could write the following macro Debugger Macro Add patch_29 count Expression C_Expression PC 31 return 1 To execute the code patch enter the command Breakpt Instr 29 patch_29 and run your program Chapter 5 Editing Code and Data Patching Source Code 179 ...

Страница 202: ...he value of one memory location 1 Select Modify Memory Or using the command line enter Memory Assign Size 2 Using the command line select either Byte Word or Long as the size of the memory location and enter the expression that assigns a value to an address and press the Return key To change the values of a block of memory interactively 1 Select Modify Memory Or using the command line enter Chapte...

Страница 203: ... the contents of memory location 1000h and allow interactive modification of memory contents Memory Assign Byte 1000h 00001000 0x48 72 To copy a block of memory 1 Using the command line enter Memory Block_Operation Copy 2 Enter the address range of the memory to be copied followed by a comma 3 Enter the starting address of the destination and press the Return key Example To copy the block of memor...

Страница 204: ... blocks of memory Using the command line enter Memory Block_Operation Match Mismatch_Operation Select either Repeat_On_Mismatch or Stop_On_Mismatch to specify what happens when a mismatch is found enter the address range to be compared and the starting address of the range that it is compared to then press the Return key Example To compare the block of memory starting at address 1000h and ending a...

Страница 205: ...only way to restore the initial values is to re load the program After re loading the program you may need to restore some debugger settings for example you might need to re specify variables for the Monitor window To change the contents of a register Select Modify Register This will display the Modify Register dialog box Or Using the command line enter Memory Register On the command line enter th...

Страница 206: ...he cursor prompt and pressing Return The PC will be modified and the next register will be displayed pc 0x000010B8 4280 10a4h sp 0x00015DB4 89524 Press Return without entering a value to exit this mode To set the value of register d1 to 44h Memory Register d1 0x44 To interactively change the value of register d1 Memory Register d1 Chapter 5 Editing Code and Data Editing Memory Contents 184 ...

Страница 207: ...6 Using Macros and Command Files How to use macros and command files to make debugging easier 185 ...

Страница 208: ...commands found there as if they were entered directly into the interface command line Command files are useful for setting up the debugger for executing a program to a certain point and for automated testing Action keys are shortcut definitions or hotkeys which allow you to add new commands to the graphical interface Action keys are useful for simplifying frequently used commands for making the de...

Страница 209: ...of commands Macros can Have input parameters macro arguments Define macro local variables Contain C statements and expressions Refer to target variables and registers Refer to user defined variables Have return values Call other macros Can be used in expressions if they return values Execute most debugger commands Macros cannot Define global variables Define static variables Be recursive Define ot...

Страница 210: ...d on a line The maximum number of lines allowed in a macro depends on the complexity of the lines Macros with too many lines too complex will fail Error 92 Not enough memory for expression will be displayed A maximum of 40 parameters may be specified in a macro definition Once you have defined a macro you can use it any time during the debugging session whenever that set of commands or statements ...

Страница 211: ... and typedefs are not legal within macros The macro processor does not recognize the C keywords extern auto static and register The macro processor reports an error if these C keywords are used Static variables are not scoped within a macro However symbols created with the Symbol Add command debugger symbols are globally scoped and can be accessed from within a macro Register variables such as PC ...

Страница 212: ...n expression expression Macro return values Macros support the C return statement for returning values If a breakpoint macro returns a nonzero value program execution continues If it returns a zero value program execution is halted If a macro does not return a value it should be declared as void when it is defined Macros containing debugger commands You can create macros that contain only a sequen...

Страница 213: ... macros To define a new macro interactively using the graphical interface 1 Display the Macro Operations dialog box 2 Move the mouse pointer to the Selected Macro entry area 3 Type Ctrl U to clear the Selected Macro entry area then type the name of the macro you wish to create When you press Return or click on the Edit button the debugger will display an editor window A skeleton macro will appear ...

Страница 214: ...button Edit the macro in the editor window If you are using the vi editor exit using the ZZ command The new macro should now appear at the end of the Defined Macros list To use an existing macro as a template for a new macro 1 Display the Macro Operations dialog box 2 In the dialog box select the macro you wish to use as a template 3 Click on the Edit button 4 In the editor change the name of the ...

Страница 215: ...or syntax errors as soon as the period is encountered If an error is found within a macro the macro definition is not saved The macro must be completely reentered Your completed macro definition should have the following syntax Debugger Macro Add type name parm parm parm_types C_expr C_stmt debugger_cmd Debugger commands can be embedded in the macro by enclosing the commands between characters For...

Страница 216: ...errors it is loaded into the debugger s symbol table If an error is detected the macro processor reports the error and quits loading the command file The macro remains undefined The number of macros that you can define is limited only by the available memory on your host computer system To edit an existing macro If you want to edit a macro attached to a breakpoint select Edit Attached Macro from t...

Страница 217: ...defined macros to a file The debugger does not provide a way to save only selected macros If you want to save macros in separate files you can create the macros using a text editor To load macros Select File Load User Defined Macros Choose the macro file to load from the File Selection dialog box If macros do not load Check that the macros do not directly access local program variables When the de...

Страница 218: ...xample If you have the following macro definition Debugger Macro Add void stackchk The symbols stack and TopOfStack exist in the compiler s environment library and are addresses which indicate the bottom and the top of the system stack The symbol sp is a debugger reserved symbol which contains the current value of the processor s stack pointer Expression Printf d bytes of stack used TopOfStack sp ...

Страница 219: ...tiplier Value x is multiplied by Multiply x by itself y 1 times for i 1 multiplier x i y i x multiplier Return x y return x The command Expression Display_Value 33 3 power 2 3 will call and evaluate the macro displaying the value 41 3 in the debugger s journal window To call a macro from within a macro You can call a macro from within a macro when they are part of an expression The following restr...

Страница 220: ...g on the return value of the macro program execution will either stop or continue If the macro returns zero program execution stops at the breakpoint If the macro returns a nonzero value program execution continues at the breakpoint Macros attached to breakpoints can test program or user defined variables before determining whether execution should break or not by returning zero or nonzero values ...

Страница 221: ...ebugger symbol function is a char pointer to the name of the current function Compare the current function with the function name passed using the built in macro memcmp if strcmp function stopfunction if global_var min global_var max Expression Printf global_var d n global_var return 0 Not in specified function return 1 so that program will continue executing return 1 the command Breakpt Write glo...

Страница 222: ...r is useful in tracking down subtle bugs Example If the function foo was corrupting automatic variables index and ch on the stack the following macro and commands could be used to identify the line where the corruption was occurring Debugger Macro Add void auto_check if index 0 index 80 ch 32 ch 126 Window Screen_On High_Level Expression Printf Autos corrupted n Expression Printf index d ch c n in...

Страница 223: ... in the Macro Operations dialog box Or Using the command line enter Debugger Macro Display macro_name Enter the name of the macro you want to display and press the Return key This command will write the macro source to the journal window If you want to write the macro source to a user defined window or to a file you can specify an optional user window number as the destination Example To write the...

Страница 224: ...e enter Symbol Remove macro_name Enter the name of the macro you want to delete and press the Return key Use the Breakpt Delete command to remove the breakpoint that called the macro Chapter 6 Using Macros and Command Files Using Macros 202 ...

Страница 225: ...e Command files can also call other command files and the interface will execute the called file like a subroutine of the calling file This section shows you how to Record commands Place comments in a command file Pause the debugger Stop command recording Run a command file Set command file error handling Append commands to a command file Record commands and results to a journal file Stop recordin...

Страница 226: ... will be saved and click on the OK pushbutton Or Using the command line enter File Log On Enter the name of the file to which commands will be saved and press the Return key All commands whether they are entered from the menus or the command line are recorded to the log file If a command causes an error both the command and the error code are recorded as comments Example To start logging commands ...

Страница 227: ...he characters Example To place the comment Place this comment in a command file in the command file File Log Comment Place this comment in the command file To pause the debugger Using the command line enter Debugger Pause And press the Return key The debugger is paused until you enter the spacebar You can also specify that the debugger pause for a number of seconds by using the Debugger Pause Time...

Страница 228: ...tarting the debugger The command_file must end with the com extension db68k c command_file RETURN Or Select File Log Playback Using the file selection dialog box enter the name of the command file and click on the OK pushbutton Or Using the command line enter File Command Enter the name of the command file from which debugger commands will be executed and press the Return key Chapter 6 Using Macro...

Страница 229: ...n the interface window Example To start executing command from the file cmdfile1 com File Command cmdfile1 See Also File Startup in the Debugger Commands chapter To set command file error handling Using the command line enter File Error_Command Handling_Mode Select either Abort_Read Continue_Read or Quit_Debugger error handling mode and press the Return key When an error occurs while executing a c...

Страница 230: ...the j journal_file option to the db68k command when starting the debugger The debugger appends the file extension jou to journal_file db68k j journal_file RETURN Or Select File Log Record Journal Enter the name of the file to which the commands and results will be saved and click on the OK pushbutton Or Using the command line enter File Journal On Enter the name of the file to which commands and r...

Страница 231: ...rt recording commands and results to file journal1 jou File Journal On journal1 To stop command and result recording to a journal file Select File Log Stop Journal Recording Or Using the command line enter File Journal oFF And press the Return key To open a file or device for read or write access Using the command line enter File User_Fopen Select the open option window number and file name then p...

Страница 232: ... inclusive Use the Window Delete or the File Window_Close command to close the file Example To open user window 57 and redirect any data written to window 57 to the file varTrace out File User_Fopen Create 57 File varTrace out To close the file associated with a window number Using the command line enter File Window_Close Enter the window number associated with the file when it was opened and pres...

Страница 233: ...sabled The b option must be accompanied by the c option and a debugger command file All commands are read from the command file No user interaction with the debugger is allowed In batch mode the debugger can be executed as a background process This mode is commonly used for automatic testing Example db68k b c command_file Chapter 6 Using Macros and Command Files Using Command Files 211 ...

Страница 234: ...Chapter 6 Using Macros and Command Files Using Command Files 212 ...

Страница 235: ...7 Configuring the Debugger How to change the appearance and behavior of the debugger Chapter 7 Configuring the Debugger 213 ...

Страница 236: ...e symbolics options Setting the display options Modifying display area windows Saving and loading the debugger configuration Setting X resources Some options can be set using either the Debugger Options dialog box or the command line Other options can be set only using the command line Chapter 7 Configuring the Debugger 214 ...

Страница 237: ...r Options from the menu bar You can change settings in the Debugger Options dialog box by clicking on the appropriate buttons To list the debugger options settings Select Settings Debugger Options You can also look at most debugger option settings by examining the Debugger Options dialog box To change debugger options settings Use the Debugger Options dialog box Or Chapter 7 Configuring the Debugg...

Страница 238: ...rn key On Command file commands are echoed to the Journal window Off Command file commands are not echoed to the Journal window To set automatic alignment for breakpoints and disassembly In the Debugger Options dialog box click on the Align Breakpoints button to toggle alignment On Debugger automatically aligns breakpoints or locations to be displayed in mnemonic format to the beginning of instruc...

Страница 239: ...click on the Demand Loading button On Symbol information is loaded on an as needed basis Off All symbol information is loaded The doff command line option overrides the On setting when the settings are saved in a startup file To select the microprocessor simulated Using the command line enter Debugger Option General Processor processor_id Enter the identifier of the microprocessor being simulated ...

Страница 240: ...mbly level references Any assembly level number you want interpreted as decimal must be terminated with a T for example specify 32 as 32T Even if you select Hex the following inputs will not be interpreted as hexadecimal Line numbers starting with Variables in high level expressions including C_Expression and macro expressions To cast a high level expression as hexadecimal use a leading 0x or a tr...

Страница 241: ...et exc as you would any program variable The following table lists what the values of exc mean exc value stop execution report to journal window trap coprocessor exceptions 0 yes yes yes 1 no yes yes 2 no no yes 4 yes yes no 5 no yes no 6 no no no bus error and address error exception handling is not simulated Bus errors cannot occur during simulation and an address error will terminate processing...

Страница 242: ...d line enter Debugger Option General Step_Speed numb 0 100 Enter the step speed number from 0 to 100 and press the Return key Higher numbers represent slower speeds Chapter 7 Configuring the Debugger Setting the General Debugger Options 220 ...

Страница 243: ...bols button to toggle assembly symbol display Select On or Off and press the Return key On Symbols are displayed instead of addresses wherever possible Off Addresses are displayed To display intermixed C source and assembly code In the Debugger Options dialog box click on the Intermixed Source Assembly button to toggle source display On Assembly code is intermixed with C source code Off Only C sou...

Страница 244: ...will look up the symbol as entered If this fails the debugger will convert the symbol to upper case and try again As Entered Lower The debugger will look up the symbol as entered If this fails the debugger will convert the symbol to lower case and try again As Entered Upper Lower The debugger will look up they symbol as entered If this fails the debugger will convert the symbol to lower case and t...

Страница 245: ...hold the command select mouse button down on the Breakpoint Window button Release the button to select On or Swap On The Breakpoint window is displayed at all times Swap The Breakpoint window is only displayed when you set or delete a breakpoint or when you display breakpoints To specify the Breakpoint Status or Simulated I O window display behavior In the Debugger Options dialog box under View Op...

Страница 246: ...ighlights Using the command line enter Debugger Option View Highlight Select Half_Bright or Inverse and press the Return key This setting does not affect the graphical user interface To turn display paging on or off more In the Debugger Options dialog box hold the command select mouse button down on the More List Mode button Release the button to select On or Off On Information is listed one scree...

Страница 247: ...ng the command line enter Debugger Option View Amt_Scroll numb 0 50 Enter the number of lines for information to be scrolled from 0 to 50 and press the Return key Chapter 7 Configuring the Debugger Setting the Display Options 225 ...

Страница 248: ... screens Erase standard I O and user defined window contents Remove user defined screens and windows To resize or move the active window 1 Using the command line enter Window Resize And press the Return key 2 Type T to position the top left corner B to position the lower right corner or M to move the window without resizing it then use the cursor keys to move the window or window border When the w...

Страница 249: ...ly The Status window cannot be moved in the graphical interface 1 Using the command line in the standard interface enter Window New Specify window number 5 to move the high level Status window or window number 15 to move the assembly level Status window select Tab followed by High_Level or Assembly enter the new coordinates for the Status window and press the Return key The Status window cannot be...

Страница 250: ...displaying debugger information User defined windows must be assigned a number greater than or equal to 50 and less than or equal to 256 Numbers below 50 are reserved for predefined debugger screens and windows When you make a new window with the Window New command the normal view and alternate view dimensions are set identically The debugger allocates a buffer with enough memory to contain the en...

Страница 251: ...ed Examples To make a user window numbered 57 in user screen 4 with the upper left corner of the window at coordinates 5 5 and the lower right corner of the window at coordinates 18 78 Window New 57 tab User_Screen 4 tab Bounds 5 5 18 78 If user screen 4 does not exists the debugger automatically creates it To display user defined screens Using the command line enter Window Screen_On User_Screen s...

Страница 252: ...ul in macros Examples To erase the contents of user window 57 Window Erase 57 To remove user defined screens and windows Using the command line enter Window Delete user_window_nmbr Enter the number of the window to be removed and press the Return key To remove a user defined screen remove all windows associated with that screen You cannot remove predefined debugger windows and screens Examples To ...

Страница 253: ...Window Delete 55 Window Delete 73 Chapter 7 Configuring the Debugger Modifying Display Area Windows 231 ...

Страница 254: ...lect mouse button to choose File Store Startup rc file Using the file selection dialog box enter the name of the file to which startup information should be saved then click on the OK pushbutton This command also saves the window and screen settings When saving window and screen settings that have been customized for a particular type of terminal name the startup file the same as the TERM environm...

Страница 255: ...n the debugger If no startup file is named the following files are searched for in order The first one that exists will be used HOME and TERM are UNIX environment variables db68k rc in the current directory TERM rc in the current directory HOME TERM rc If no startup file is found reasonable defaults will be used Examples To start the debugger and load the state saved in the startup file my_state r...

Страница 256: ...resources are defined When the graphical interface starts up it reads resource specifications from a set of configuration files Resources specifications in later files override those in earlier files Files are read in the following order 1 The application defaults file HP64000 lib X11 app defaults HP64_Debug 2 The XAPPLRESDIR HP64_Debug file The XAPPLRESDIR environment variable defines a directory...

Страница 257: ...or different displays computing environments and languages The HP64_Debug application defaults file is re created each time debugger s graphical interface software is installed or updated You can use the UNIX diff command to check for differences between the new HP64_Debug application defaults file and the old application defaults file that is saved as usr hp64000 lib X11 HP64_schemes old HP64_Deb...

Страница 258: ... debugger s graphical interface if it is different than the platform where the application is running HP64_Debug colorScheme BW Color custom Names the color scheme file HP64_Debug sizeScheme Small Large custom Names the size scheme file which defines the fonts and the spacing used HP64_Debug labelScheme Label LANG custom Names to use for labels and button text The default uses the LANG environment...

Страница 259: ...the action key pushbuttons and the commands that should be executed in the command line area when the action key is pushed Refer to the To set up custom action keys section for more information sim68000 dirSelectSub entries list of strings Specifies the initial values that are placed in the File Context Directory pop up recall buffer Refer to the To set initial recall buffer values section for mor...

Страница 260: ...splay area in characters respectively Minimum values are 18 lines and 80 columns These minimums are silently enforced Note The application cannot be resized by using the window manager HP64_Debug lines 24 HP64_Debug columns 85 Edit the line containing HP64_Debug lines so that it is uncommented and is set to the new value The lines and columns set the vertical and horizontal dimensions of the main ...

Страница 261: ...erge nocpp HP64_Debug tmp 5 Save the changes where they can be found by the debugger One way to do this is to append the temporary file to your HOME Xdefaults file For example cat HP64_Debug tmp HOME Xdefaults You can also save the changes in a scheme file see To use customized scheme files 6 Remove the temporary file 7 Start or restart the debugger s graphical interface Chapter 7 Configuring the ...

Страница 262: ...or example cp usr hp64000 lib X11 HP64_schemes HP UX Debug Color HOME HP64_schemes HP UX Debug MyColor Note that if your custom scheme file has the same name as the default scheme file the load order requires resources in the custom file to explicitly override resources in the default file 3 Modify the HOME HP64_schemes platform Debug scheme file For example you could modify the HOME HP64_schemes ...

Страница 263: ...f your custom scheme files are named differently than the default scheme files you must modify these resource settings so that your customized scheme files are used instead of the default scheme files For example to use the HOME HP64_schemes HP UX Debug MyColor color scheme file you would set the HP64_Debug colorScheme resource to MyColor HP64_Debug colorScheme MyColor Chapter 7 Configuring the De...

Страница 264: ... command is executed Action keys that use the entry buffer should always include the entry buffer symbol in the action key label as a visual cue to remind you to place information in the entry buffer before clicking the action key Shell commands can be executed by using the Debugger Host_Shell command Also command files can be executed by using the File Command command Finally an empty action mean...

Страница 265: ...B_popup recallSub entries Other X resources for the recall buffers are described in the supplied application defaults file The window manager resource transientDecoration controls the borders around dialog box windows The most natural setting for this resource is title Example To set the initial values for the directory selection dialog box modify the debug dirSelectSub entries resource sim68000 d...

Страница 266: ...Chapter 7 Configuring the Debugger Setting X Resources 244 ...

Страница 267: ...Part 3 Concept Guide ...

Страница 268: ...Part 3 246 ...

Страница 269: ...8 X Resources and the Graphical Interface An introduction to X resources 247 ...

Страница 270: ...pplication application specific resources or it may apply to the objects called widgets from which the application is constructed That is particularly true of standard widget resources that control the appearance of an application For example most widgets have a standard resource that allows the user to specify the font used to display text on objects like buttons menus and labels An application s...

Страница 271: ...r the quit pushbutton displayed on an application called tracker might look like the following tracker panel control quit foreground white Don t worry there are shortcuts As you might guess specifying resources for applications with many levels of widgets can be difficult and error prone For that reason you can use a shortened notation To fully understand how the notation works however you must fi...

Страница 272: ...omplete list of resources and the application knows the complete instance and class names for each resource Because you can specify resource values using shortened notation the application when starting up must match specified values to individual resources Some general rules apply Either a class name or instance name from the request must match each class or instance name in the application s lis...

Страница 273: ... of different widget paths through the application Resource specification is usually a matter of trial and error The following resource is probably specific enough to set just the foreground color for the quit button on the control panel tracker control quit foreground white To view the resources in the debugger s graphical interface you can choose Help X Resource Names and click on the All names ...

Страница 274: ... application The system directory for application default files is HP64000 lib X11 app defaults The name of the default file is the same as the class name for the application and is also called the app defaults file for example HP64_Debug is the name of the debugger s graphical interface s application defaults file These defaults should not be changed by individual users because doing so affects t...

Страница 275: ... Resources are added to the resource property database by using xrdb HP VUE is an example The server can use this property to access those resources If no RESOURCE_MANAGER property exists then HOME Xdefaults is read The primary and probably best method for creating or adding to this file is by copying part or all of the app defaults file into the Xdefaults file 4 XENVIRONMENT file This environment...

Страница 276: ...Debug file You may wish to set resources found in the scheme files as well so you need to understand how scheme files relate to the interface and to the other X resource files Scheme files augment other X resource files Hewlett Packard realizes that the debugger s graphical interface will be run in environments made up of workstations with different display capabilities and even in environments wi...

Страница 277: ...heme files are in the subdirectory usr hp64000 lib X11 HP64_schemes HP UX Like the app defaults file these scheme files are system files and should not be modified directly You can create your own scheme files if you choose The debugger s graphical interface supports user defined scheme files The interface searches two places for user defined scheme files and loads any it finds after loading the s...

Страница 278: ... on an HP 9000 computer but displaying the interface on a Sun SPARCsystem computer In this situation you may wish to set the resource to use the SunOS scheme so that you can use the same key and mouse button bindings as other Sun OpenWindows applications The value of this resource is actually the name of a subdirectory under usr hp64000 lib X11 HP64_schemes or one of the alternative directories fo...

Страница 279: ... by collecting related resources in specific files To review the organization The app defaults file contains resources that control the operation of the interface To override a resource in this file copy the resource to your Xdefaults file and change it there Resources that control the appearance of the display and keyboard and mouse button bindings for your platform are in the scheme files Copy t...

Страница 280: ... in your Xdefaults file and save the file Finally if the debugger s graphical interface is currently executing you must exit and restart the interface for the change to have any effect General resources If you plan to modify a general resource that could not be found in the HP64_Debug file look to the scheme files for information about that resource A general discussion of the kinds of information...

Страница 281: ...Part 4 Reference ...

Страница 282: ...Part 4 260 ...

Страница 283: ...9 Debugger Commands Detailed descriptions of command line commands 261 ...

Страница 284: ...lay macros allow access to the host operating system and end debugger sessions Command Definition Debugger Access debugger on line help Debugger Directory Display or change present working directory Debugger Execution Display_Status Display current directory and files in use Debugger Execution IO_System Control debugger simulated I O Debugger Execution Load_State Restore previously saved debugger ...

Страница 285: ...pecified variables Expression Monitor Value Monitor variables Expression Printf Print formatted output to Journal window File Commands File commands read and process command files open files or devices for writing log debugger commands to a file and save debugger startup parameters Command Definition File Command Read in and process a command file File Error_Command Set command file error handling...

Страница 286: ... Assign Set or alter input port status Memory Inport Delete Delete an input port Memory Inport Rewind Rewind input file associated with input port Memory Inport Show Display input port buffer values Memory Map Guarded Prevent access to memory locations Memory Map Read_Only Prevent writing to memory locations Memory Map Show Display current memory map assignments Memory Map Write_Read Allow access ...

Страница 287: ...Find_Source Next Find next occurrence of a string Program Interrupt Add Simulate an interrupt Program Interrupt Remove Cancel all pending interrupts Program Load Load or reload an absolute file for debugging and set load options Program Pc_Reset Reset the program starting address Program Run Start or continue program execution Program Step Execute a number of instructions or lines Program Step Wit...

Страница 288: ... Set the cursor position for a window Window Delete Remove a user defined window or screen Window Erase Clear data from a window Window New Make a new screen or window Window Resize Change the size of a window Window Screen_On Activate a screen Window Toggle_View Select the alternate display of a window Chapter 9 Debugger Commands 266 ...

Страница 289: ...t does the following 1 Suspends program execution Execution will stop immediately following the current instruction 2 Executes a macro if you attached one to the breakpoint Depending on the macro return value the debugger does one of the following actions If the macro return value is true nonzero the debugger resumes execution with the next instruction after the instruction that caused the read or...

Страница 290: ...vectors 16 Breakpt Access assign_vectors 16 To set a breakpoint on access of the address of the variable current_temp Breakpt Access current_temp To stop program execution when the value of variable system_running is set or read as TRUE Breakpt Access system_running when system_running 1 The predefined macro when is executed when the breakpoint is encountered Chapter 9 Debugger Commands Breakpt Ac...

Страница 291: ...moves all defined breakpoints See Also Breakpt Access Breakpt Delete Breakpt Erase Breakpt Instr Breakpt Read Breakpt Write Program Run Program Step Examples To remove all defined breakpoints Breakpt Clear_all Chapter 9 Debugger Commands Breakpt Clear_All 269 ...

Страница 292: ... brkpt_nmbr brkpt_nmbr The debugger displays the breakpoint numbers in the Breakpoint window When you remove a breakpoint the Breakpoint window displays the remaining breakpoints Any breakpoints following the one removed are renumbered See Also Breakpt Access Breakpt Clear_All Breakpt Erase Breakpt Instr Breakpt Read Breakpt Write Program Run Program Step Examples To delete breakpoint number 2 Bre...

Страница 293: ... instead of by a breakpoint number When you remove a breakpoint the Breakpoint window displays the remaining breakpoints Any breakpoints following the breakpoints s removed are renumbered See Also Breakpt Access Breakpt Clear_All Breakpt Delete Breakpt Instr Breakpt Read Breakpt Write Program Run Program Step Examples To delete breakpoint set at the entry to the main function Breakpt Erase main To...

Страница 294: ...an also specify the argument type of the function definition in parentheses after the function name in the Breakpt Instr command You can attach a macro to a breakpoint using the optional macro_call parameter See the Using Macros and Command Files chapter The debugger performs the following actions when it encounters an instruction breakpoint 1 Suspends program execution before the program executes...

Страница 295: ...kpt Read Breakpt Write Program Run Program Step Examples To set an instruction breakpoint at line 82 of the current module Breakpt Instr 82 To set an instruction breakpoint at line 83 of the current module only when the system is running using the predefined macro when Breakpt Instr 83 when system_running To set an instruction breakpoint starting at address 10deh and ending at address 10e4h Breakp...

Страница 296: ...t Access command See Also Breakpt Access Examples To set a breakpoint on reads from variable system_running Breakpt Read system_running To set a read breakpoint starting at the address of variable current_temp and ending 8 bytes after the address of current_temp Breakpt Read current_temp 8 To stop program execution when the value of variable system_running is read as TRUE Breakpt Read system_runni...

Страница 297: ...and behaves just like the Breakpt Access command See Also Breakpt Access Examples To set a breakpoint to occur when the program writes a false value to variable system_is_running Breakpt Write system_running when system_running 00 To set a write breakpoint starting at the address of global variable current_temp and ending 8 bytes after the address of current_temp Breakpt Write current_temp 8 Chapt...

Страница 298: ...e journal window When you specify the Change_Working parameter with a directory name the debugger makes that directory the current working directory Examples To display the current working directory Debugger Directory Show_Working To change the current working directory to users project sources Debugger Directory Change_Working users project sources Chapter 9 Debugger Commands Debugger Directory 2...

Страница 299: ... files have been loaded the absolute file will be missing from the display If multiple executable files have been loaded using the Program Load Append command they will be displayed in the View window You may need to toggle the window click on the window border to see all of the files Example To display product version current working directory and current log journal startup and absolute files in...

Страница 300: ...r simulated I O system Debugger Execution IO_System Disable The Debugger Execution IO_System Disable command disables the debugger simulated I O system Debugger Execution IO_System Stdio_Redirect The Debugger Execution IO_System Stdio_Redirect command allows you to define the standard I O input stdin_name output stdout_name and error stderr_name files devices These are file device names in the hos...

Страница 301: ...acters on the input line are lost Raw Mode In raw mode each keystroke is passed from the keyboard to the simulated I O system with no processing No carriage return is needed to enter characters and no editing operations are available In the raw mode any character is valid including CTRL D No characters are echoed to the screen upon entry The only special character that cannot be sent to the target...

Страница 302: ...imio keyboard dev simio display users project errorfile To redirect the standard input file to temp dat the standard output file to cmdout dat and the standard error file to file errorlog err Debugger Execution IO_System Stdio_Redirect temp dat cmdout dat errorlog err To set data input mode to cooked Debugger Execution IO_System Mode Cooked Chapter 9 Debugger Commands Debugger Execution IO_System ...

Страница 303: ...the debugger simulator Debugger Execution Save_State command If you do not specify a file name save_file the debugger uses the default file db68k sav Example To restore memory contents and register values saved in save file session1 Debugger Execution Load_State session1 Chapter 9 Debugger Commands Debugger Execution Load_State 281 ...

Страница 304: ...ly the interrupt priority mask is set to level 7 4 All other bits in the status register are set to 0 5 The vector base register is set to 0 68020 only 6 The cache control register is set to 0 68020 only 7 The cycle count cycles is set to zero 8 Any pending interrupt or exception is cleared 9 Registers A0 A6 and D0 D7 are set to 0 Note This command does not re initialize memory Use the Program Loa...

Страница 305: ... time by executing the Debugger Execution Load_State command If a file name save_file is not specified the default file name db68k sav is used See Also Debugger Execution Load_State Example To save the current memory contents and register values in file session1 sav Debugger Execution Save_State session1 Chapter 9 Debugger Commands Debugger Execution Save_State 283 ...

Страница 306: ...in the debugger by entering a single operating system command with the debugger Debugger Host_Shell command If you are using the graphical interface the operating system command is executed in a cmdscript window Press Return to close the window If you are using the standard interface stdout from the command is written to the Journal window and stderr is not captured Commands writing to stderr will...

Страница 307: ...script window is closed immediatelly See Also Debugger Quit Examples To temporarily exit the debugger to the UNIX operating system command mode Debugger Host_Shell To write the current working directory to the journal window Debugger Host_Shell pwd Chapter 9 Debugger Commands Debugger Host_Shell 285 ...

Страница 308: ...of the topic list in the help menu If you press the F5 function key the debugger puts the cursor at the entry for the command displayed on the command line if one is displayed Otherwise the cursor is positioned at the top of the topic list You can select topics from the help menu in two ways Use the cursor keys to move to the desired topic and press the Return key Type the first letter of the desi...

Страница 309: ...ger the debugger displays an error message if you attempt to select high level mode If no parameters are specified with this command the mode is switched back and forth between the two modes performing the same function as the F3 function key Examples To select the assembly level debug mode Debugger Level Assembly To select the high level debug mode Debugger Level High_Level To switch to the alter...

Страница 310: ... prompt character indicating that you can enter the macro body Note If the stdio screen or a user defined screen is active when the Debugger Macro Add command is issued the Journal window will not become active Keyboard input at this point will be interpreted by the debugger as the macro definition To terminate the macro definition a period must be entered as the first and only character on a line...

Страница 311: ...tain any legal C statement except the SWITCH and GOTO statements The statements IF ELSE DO WHILE FOR RETURN BREAK and CONTINUE can be used to control program flow within a macro just as in C Macros have return types and can be used in expressions Note Debugger commands may be used in macro definitions they are indicated by placing a dollar sign at the beginning and the end of a command sequence Fo...

Страница 312: ...1 multiplier x i y i x multiplier Return x y return x Debugger Macro Add void stackchk The symbols stack and TopOfStack exist in the compiler s environment library and are addresses which indicate the bottom and the top of the system stack The symbol sp is a debugger reserved symbol which contains the current value of the processor s stack pointer Expression Printf d bytes of stack used TopOfStack...

Страница 313: ... defined by the Debugger Macro Add command or a macro built into the debugger See Also Debugger Macro Add Debugger Macro Display Symbol Remove Example To call the previously defined macro stackchk Debugger Macro Call stackchk Chapter 9 Debugger Commands Debugger Macro Call 291 ...

Страница 314: ...do not specify a window number the macro source is written to the Journal window Macro source for built in macros cannot be displayed See Also Debugger Macro Add File Command Symbol Display Examples To display the source for macro stackchk in user defined window 57 Debugger Macro Display stackchk 57 To display the source for macro stackchk in the Journal window Debugger Macro Display stackchk Chap...

Страница 315: ...ied to the Journal window If the On parameter is specified both the command and its results if any are echoed to the Journal window The default setting is On Examples To turn OFF echo to the Journal window of commands executed from a command file Debugger Option Command_Echo oFF To turn ON echo to the Journal window of commands executed from a command file Debugger Option Command_Echo On Chapter 9...

Страница 316: ...gns breakpoints with processor instruction start Frame_Stop Controls stack walking Demand_Load Enables disables demand loading of symbols Processor Sets the processor type Radix Interprets assembly level numbers as decimal or hex Exceptions Controls behavior of exception processing Step_Speed Specifies the stepping speed Chapter 9 Debugger Commands Debugger Option General 294 ...

Страница 317: ...s set to oFF the debugger lets you set the breakpoint at any address The default setting is oFF Frame_Stop When you set the Frame_Stop option to On if the debugger encounters a bad stack frame it displays only the valid stack frames below the bad frame in the Backtrace window When you set the Frame_Stop option to oFF the debugger displays all frames including the bad frame The default setting is o...

Страница 318: ...By default numeric literals are interpreted as decimal values If you set Radix to hexadecimal any number you want interpreted as decimal must be terminated with a T for example specify 32 as 32T Even if you select Hex the following inputs will not be interpreted as hexadecimal line numbers starting with variables in high level expressions and debugger variables including breakpoint numbers viewpor...

Страница 319: ... window and halts program execution This is the default mode of operation Step Speed The Step_Speed option specifies the stepping speed The stepping speed can be in the range of 0 to 100 units Higher numbers represent slower speeds This option affects the Program Step command The default value is 0 See Also File Startup Debugger Option List Example To align assembly level breakpoints at the beginn...

Страница 320: ...e similar to the sample list shown in the example See Also Debugger Option Command_Echo Debugger Option General Debugger Option Symbolics Debugger Option View Settings Debugger Options Examples To list the current debugger option settings in the Journal window Debugger Option List Chapter 9 Debugger Commands Debugger Option List 298 ...

Страница 321: ...gging session Assem_Symbols Displays symbols in assembly code Intermixed Intermixes C source with assembly code Check_Args Enables parameter checking in commands and macros Uppercase_Mods Converts module names to upper case Line_Option Sets options for building line numbers Symbol_Case Controls case sensitivity of symbol lookups Chapter 9 Debugger Commands Debugger Option Symbolics 299 ...

Страница 322: ...ment This option is off by default Check_Args The Check_Args option controls parameter checking in commands and macros If oFF is selected the debugger does not do any argument checking If On is selected the debugger warns you when an assignment is made which contains a C type mismatch This option is off by default Uppercase_Mods The Uppercase_Mods option tells the debugger to convert module names ...

Страница 323: ...rst and then lower All This option is useful if your toolset converts symbols to all uppercase or lowercase characters See Also File Startup Examples To display symbol names instead of address values in disassembled code Debugger Option Symbolics Assem_Symbols On To turn OFF display of C source lines in assembly level Code window Debugger Option Symbolics Intermixed oFF To enable debugger expressi...

Страница 324: ...io_Window Amt_Scroll Use the Debugger Option List command to display the current option values To permanently change any of the default values first use the appropriate Debugger Option command to change the value s and then use the File Startup command to save the new default values in a startup file See the File Startup command for more information Chapter 9 Debugger Commands Debugger Option View...

Страница 325: ...u specify the Swap setting the window is not automatically displayed You must enter the Debugger Execution Display_Status command or the Window Active View command to display the window The default setting is Swap Highlight The Highlight option determines whether highlighted information in debugger windows is displayed in half bright video or inverse video The default is Inverse More The More opti...

Страница 326: ...y F6 or enter the command Window Screen_On Stdio to display the window The default setting is Swap Amt_Scroll The Amt_Scroll option controls the amount that the Journal and Stdio windows are scrolled when written to When the output reaches the bottom of the window the data scrolls up one line by default You can specify a number of lines from one to 50 Examples To set the Swap option so that the Br...

Страница 327: ...pauses the debugger until you press the space bar CTRL C or the escape key Esc twice The Debugger Pause command is useful when executing command files See Also File Command Examples To pause the debugger for ten seconds Debugger Pause Time 10 To pause the debugger until the space bar CTRL C or Esc Esc is pressed Debugger Pause Chapter 9 Debugger Commands Debugger Pause 305 ...

Страница 328: ...sion Use the File Startup command to save the current set of debugger startup options and window parameters in a startup file Note If you want to save the debugging session use the Debugger Execution Save_State command to save the current memory contents and register values This command is not available with the debugger emulator products See Also Debugger Host_Shell Examples To end the debugger s...

Страница 329: ... expressions specified behave according to the rules of C Note The Expression C_Expression command cannot evaluate conditionals of the form expression expression expression Examples To calculate the value of time and display the result data address 000091DC time_struct Expression C_Expression time To calculate the value of member hours of structure time and display the result 4 0x04 Expression C_E...

Страница 330: ... command displays expressions and their values in the Journal window S Displays the expression as a string T Displays the expression in decimal format H Displays the expression in hexadecimal format Chapter 9 Debugger Commands Expression Display_Value 308 ...

Страница 331: ...s of an item such as an array is displayed instead of the C value of the item which is its address If an expression range is displayed each value within the range is displayed according to the base type if one exists For example if the variable flags is a character array the following command results in elements flags 10 through flags 30 being displayed Expression Display_Value flags 10 30 Note th...

Страница 332: ...To display the value of the variable system_is_running 01h Expression Display_Value system_is_running To display the address of the variable system_is_running 000091F0 Expression Display_Value system_is_running To display the address of the C structure time 000091DC Expression Display_Value time To display the values of the members of structure time hours 4 minutes 0 seconds 20 Expression Display_...

Страница 333: ...r_Fopen or Window New command or the window number must be the log file number 28 or journal file number 29 if opened The command requires a format string as the second parameter The format string may contain both text and argument conversion specifications Whenever a conversion specification is encountered the next argument is converted according to the specification and the result is copied to t...

Страница 334: ...s the maximum number of fractional decimal places to print For g notation it is the number of significant digits to be printed l indicates that a conversion character d x or u corresponds to a long argument Conversion Characters Conversion characters are listed in the following table with a detailed description of each character Char Description c The argument is converted to character format d Th...

Страница 335: ...l point appears only if it is followed by a digit h The argument is either the debugger internal variable HLPC or a high level line number preceded by the character Source lines are formatted as strings according to s rules Note See HLPC in the Registers chapter of this manual m The argument is an instruction address The disassembled instruction is treated as a string s The argument is a string Th...

Страница 336: ...e number of digits in the fractional part is six by default or the maximum field width if specified The number of digits printed depends on the number of significant digits in the number Because floating point values are passed as parameters they are converted to double precision Parameters must be promoted to double precision values as a requirement of the C language Other values passed as parame...

Страница 337: ...n double quotes to user window 57 followed by the floating point value of temperature with a precision of 2 Expression Fprintf 57 The value of temperature is 2f n temperature To print source line 24 to user window 55 Expression Fprintf 55 h 24 To print the contents of the assembly level stack window to user window 256 Expression Fprintf 256 w 14 Chapter 9 Debugger Commands Expression Fprintf 315 ...

Страница 338: ... Expression Monitor Value command and removes all expressions from the Monitor window See Also Expression Fprintf Expression Monitor Delete Expression Monitor Value Expression Printf Memory Display Examples To stop monitoring all expressions Expression Monitor Clear_All Chapter 9 Debugger Commands Expression Monitor Clear_All 316 ...

Страница 339: ...ndow These assigned line numbers are used to specify the expression or group of expressions to be deleted removed All monitored expressions can be deleted with the Expression Monitor Clear_All command See Also Expression Fprintf Expression Monitor Clear_All Expression Monitor Value Expression Printf Memory Display Examples To stop monitoring expression 2 in the Monitor window Expression Monitor De...

Страница 340: ...d and displayed in the Monitor window each time the debugger stops executing the program Up to seventeen lines selected by the display line range parameter display_nmbr display_nmbr can be displayed in the Monitor window Variables located in registers are shown with a between their names and values Chapter 9 Debugger Commands Expression Monitor Value 318 ...

Страница 341: ...n the range is displayed according to the base type if one exists For example if the variable flags is a character array the following command displays 20 characters Expression Monitor Value flags 10 29 Any expression can be type cast to display its value in a different format For example if the variable count is a long value the following statement causes count to be displayed as a four character...

Страница 342: ... a range of lines the amount of data that will fit on those lines is displayed See Also Expression Monitor Clear_All Expression Monitor Delete Symbol Display Examples To monitor the value of variable current_temp Expression Monitor Value current_temp To monitor the value of the three members in structure time and display them on Monitor window lines 4 through 6 Expression Monitor Value time 4 6 To...

Страница 343: ...he journal window followed by the floating point value of temperature with a precision of 2 Expression Printf The value of temperature is 2f n temperature To print source line 24 to the Journal window Expression Printf h 24 To print the name of the current module to the Journal window Expression Printf s module To print the disassembled instruction at address 2030h to the Journal window as a strin...

Страница 344: ...t the contents of the assembly level stack window to the Journal window Expression Printf w 14 Expression Printf w 14 00043FC8 00000690 FP 00043FC4 00043FF0 00043FC0 000604AC 00043FBC 00000001 SP 00043FB8 00000001 Chapter 9 Debugger Commands Expression Printf 322 ...

Страница 345: ...If the filename consists of alphanumeric characters a period or a backslash double quotation marks are optional Otherwise quotation marks must enclose the file name If a filename extension is not specified the debugger automatically appends a default extension com Command files can be executed at debugger startup using the c option from the command line during a debugging session or from a startup...

Страница 346: ...ger to continue to the next command in the command file after an error Quit_Debugger causes the debugger to end the debugging session when an error occurs as if you typed Debugger Quit Yes See Also File Command File Log Examples To return to the command line after an error and wait for keyboard input File Error_Command Abort_Read To continue to the next command in the command file after an error F...

Страница 347: ...ile New information is appended to the end of the existing file File Journal oFF closes the journal file File Journal Browse opens a journal browser window in the graphical interface Start opens a new browser window End stops output to the current browser without closing the window Restart has the same effect as Start followed by End NextNCmds causes the output from the next n commands to be sent ...

Страница 348: ...ing File Journal On debug1 To close the currently open journal file File Journal oFF To open existing journal file debug1 jou for writing and append new information at the end of the file File Journal Append debug1 Chapter 9 Debugger Commands File Journal 326 ...

Страница 349: ...g oFF terminates logging to the file File Log Comment places a string of text in the file as a comment If a log file is not open File Log Comment commands are ignored by the debugger All successful commands are written to the log file so the file can later be used as a command file Commands which are entered but not successfully completed are written to the com file as comments along with their er...

Страница 350: ...g oFF To open existing log file log1 com for writing and append new information at the end of the file File Log Append log1 To place the comment This is a comment string in the log file File Log Comment This is a comment string If a log file is not open this command is ignored Chapter 9 Debugger Commands File Log 328 ...

Страница 351: ...f it If you do not specify a startup file name the startup options are saved in a file named db68k rc You can modify default debugger startup option values with the Debugger Option command and window parameters with the Window commands Remember that you can also specify a command file to be executed when the debugger starts See Also Debugger Option File Command Window New Window Resize the Using M...

Страница 352: ...p options and window parameters in startup file my_start_file rc and execute the command file initDemo com whenever the debugger is started using my_start_file rc File Startup my_start_file initDemo Chapter 9 Debugger Commands File Startup 330 ...

Страница 353: ...for reading After opening a file using the File User_Fopen Append or File User_Fopen Create command you can use the Expression Fprintf command to write information to the file Files opened for reading may be read from the built in macro fgetc See the Predefined Macros chapter of this manual for a complete description of this macro The window number must be between 50 and 256 inclusive Use the Wind...

Страница 354: ...te 57 File varTrace out To open user window 57 and append any data written to window 57 to the existing file varTrace out File User_Fopen Append 57 File varTrace out To open file temp dat for reading accessing the file as user window 52 File User_Fopen Read 52 File temp dat Chapter 9 Debugger Commands File User_Fopen 332 ...

Страница 355: ...s previously opened with the File User_Fopen command The Window Delete command may also be used for this purpose See Also File User_Fopen Window Delete Example To close file associated with user window number 57 File Window_Close 57 Chapter 9 Debugger Commands File Window_Close 333 ...

Страница 356: ...an be entered interactively if you do not define a value on the command line When a value is not specified the contents of the specified memory locations are displayed in hexadecimal and decimal You can change the existing value by entering any legal expression followed by a carriage return The next memory location and its contents are then displayed The return key entered without a value will cau...

Страница 357: ... according to the rules of C The command Expression C_Expression count 5 will set count equal to 5 See Also Expression C_Expression Memory Register Examples To display the contents of memory location 1000h and allow interactive modification of memory contents 00001000 0x48 72 Memory Assign Byte 1000h To change the contents of memory locations 2000h through 2005h to 00 41 00 42 00 43 and change the...

Страница 358: ..._Operation Test Examples To copy the block of memory starting at address 1000h and ending at address 10ffh to a block of the same size starting at address 5000h Memory Block_Operation Copy 1000h 10ffh 5000h To copy the block of memory starting at the address of the structure current_targets and ending 15 bytes after this address to a block of memory starting at the address of the structure default...

Страница 359: ...bugger fills the memory area with the specified string pattern An expression string is a list of values separated by commas and can include ASCII characters enclosed in quotation marks All expressions in an expression string are padded or truncated to the size specified by the size qualifiers if they do not fit the specified size evenly If the number of values in an expression string is less than ...

Страница 360: ...gister Examples To fill memory locations 1000h through 1007h with the long pattern 61626364 65666768 Memory Block_Operation Fill Long 0x1000 7 abcdefgh To fill the memory area starting at location 1000h and ending at location 10ffh with zeros Memory Block_Operation Fill Byte 0x1000 0x10ff Chapter 9 Debugger Commands Memory Block_Operation Fill 338 ...

Страница 361: ... the same The Memory Block_Operation Match Stop_On_Mismatch command halts when a mismatch is found If the Memory Block_Operation Match Repeat_On_Mismatch command is selected the comparison continues until the end of the block When you execute the Memory Block_Operation Match Stop_On_Mismatch Repeat_On_Mismatch command without specifying an address range the debugger continues comparing the address...

Страница 362: ...e previous Memory Block_Operation Match Stop_On_Mismatch command starting from where it found the last mismatch Memory Block_Operation Match Stop_On_Mismatch To compare the block of memory starting at address 1000h and ending at address 10ffh with a block of the same size beginning at address 5000h and stop at the end of the memory block Memory Block_Operation Match Repeat_On_Mismatch 1000h 10ffh ...

Страница 363: ...ize evenly all expressions in an expression string will be padded or truncated to the size specified by the size qualifiers If you specify the Once qualifier the search stops when the expression is found If you specify the Repeatedly qualifier the debugger repeatedly searches for the specified expression displaying each match until it reaches the end of the block or until you press CTRL C When you...

Страница 364: ... found or address 10ffh is reached Memory Block_Operation Search Word Once 1000h 0xff gh To execute the previous Memory Block_Operation Search command starting from where it found the last match Memory Block_Operation Search Word Once To search for the hexadecimal value 65666768 in long format in the address range 1000h through 10ffh and stop at the end of the address range Memory Block_Operation ...

Страница 365: ... expression string You can specify expression strings either as ASCII characters enclosed in quotation marks or as a list of values separated by commas If they do not evenly fit the specified size all expressions in an expression string will be padded with zero valued bytes to the size specified by the size qualifier Once Qualifier If you specify the Once qualifier the test stops when a mismatch i...

Страница 366: ... through address 10ffh and stop when a word not matching the expression is found Memory Block_Operation Test Word Once 1000h 0xff gh To execute the previous Memory Block_Operation Test command starting from where it found the last mismatch Memory Block_Operation Test Word Once To test for the hexadecimal value 65666768 in long format in the address range 1000h through 10ffh and stop at the end of ...

Страница 367: ...el mode If you have executed the Debugger Options Symbolics Intermixed On command C source code lines will be intermixed with the assembly language code when applicable If you have executed the Debugger Options Symbolics Assem_Symbols On command symbol references will be displayed with the assembly language code The Prev Next Up and Down keys may be used when the Code window is active to display i...

Страница 368: ...ss range the debugger displays all memory locations in that range If you specify a single address the debugger displays two lines of data If you do not specify any parameters the debugger displays the next 80 bytes five lines of data after the previously displayed address range The memory contents are displayed in the Journal window See Also Expression Display_Value Symbol Display Examples To disp...

Страница 369: ... file in Motorola S record or Intel Hex format to the current contents of memory The addresses in the file may be offset to generate the address in the target to compare against Messages in the journal window describe differences between the two No messages will be posted if the file and memory are identical Write This command allows you to write a memory image file in Motorola S record or Intel H...

Страница 370: ...ort and defines its size address and input source The port address can be any valid address The source of input data may be the standard I O screen the Journal window a file an expression string or the input or output port buffers Chapter 9 Debugger Commands Memory Inport Assign 348 ...

Страница 371: ...rewind the file Stdio If you specify Stdio the debugger reads data from the standard I O screen The debugger automatically displays the standard I O screen when an input port is read The cursor is positioned at the last point where data was written The standard I O screen border flashes and the debugger displays a message indicating the port from which it is reading data Keyboard entry is echoed t...

Страница 372: ...ry Inport Rewind Memory Inport Show Memory Outport Show Examples To assign address 0x400 as an I O port input of size word Memory Inport Assign Word 0x400 Source_Is File myproj ecs dat Read operations from the port will access file myproj ecs dat You must specify the file name in quotation marks To assign address 0x40C as an I O port input of size byte Memory Inport Assign Byte 0x40C Source_Is Dat...

Страница 373: ...pecified input port address allowing the address to behave like a normal memory location See Also Memory Inport Assign Memory Outport Assign Example To disable the input port at address 400h Memory Inport Delete 400h Chapter 9 Debugger Commands Memory Inport Delete 351 ...

Страница 374: ...ng associated with the input port The input port is specified by the port address port_addr See Also Memory Inport Assign Memory Inport Delete Memory Inport Show Example To rewind the input file or string associated with input port 400h Memory Inport Rewind 0x400h Chapter 9 Debugger Commands Memory Inport Rewind 352 ...

Страница 375: ...her a port address port_addr or a port address range port_addr port_addr If you specify a range the debugger displays all buffer values in the range If you do not specify any parameters the debugger displays all declared input ports with their port address size value and data source See Also Memory Inport Assign Memory Inport Delete Memory Inport Rewind Examples To show all assigned input ports Me...

Страница 376: ... The size of the address range specified in a Memory Map Guarded command and the size of the address space that is mapped by combining all Memory Map commands is limited only by the amount of virtual memory available to the debugger You can map a maximum of 60 banks of memory See Also Memory Map Read_Only Memory Map Show Memory Map Write_Read Example To configure memory address range 8000h through...

Страница 377: ...Map Write_Read commands previously executed The size of the address range specified in a Memory Map Guarded command and the size of the address space that is mapped by combining all Memory Map commands is limited only by the amount of virtual memory available to the debugger You can map a maximum of 60 banks of memory See Also Memory Map Guarded Memory Map Show Memory Map Write_Read Example To con...

Страница 378: ...0000BC 000000BF Load section RAM SIMU 00000100 0000010B Load section RAM SIMU 00000400 00001044 Load section env RAM SIMU 00001048 00002851 Load section prog RAM SIMU 00002854 0000906B Multiple load sections RAM SIMU 00040000 00043FFF Load section stack RAM SIMU 00060000 0006401D Multiple load sections The command displays memory address ranges mapped as Guarded NOMEM Read_Only ROM or Write_Read R...

Страница 379: ...Only commands previously executed The size of the address range specified in a Memory Map Guarded command and the size of the address space that is mapped by combining all Memory Map commands is limited only by the amount of virtual memory available to the debugger You can map a maximum of 60 banks of memory See Also Memory Map Guarded Memory Map Read_Only Memory Map Show Example To configure memo...

Страница 380: ...port The port address can be any valid address Outport Port Size You can specify the size of an output port buffer by entering one of the size qualifiers Byte Word or Long Output Data Destination You can direct the output port data to be written to one of the following destinations by entering the associated keyword for the output destination Chapter 9 Debugger Commands Memory Outport Assign 358 ...

Страница 381: ...le Outport If you specify Outport Set value output port data is written to the output port buffer Previous values written to the buffer are lost This buffer is only one level deep The last value written to a port can be viewed by issuing the Memory Display Outport command The output port buffer may be initialized by using the optional value parameter If no value is specified a zero is placed in th...

Страница 382: ... Write operations to the port will access file myproj cmdout dat You must specify the file name in quotation marks To assign address 0x40C as an I O port output of size byte Memory Outport Assign Byte 0x40C Destination_Is Stdio Write operations to the port will access the Stdio window Chapter 9 Debugger Commands Memory Outport Assign 360 ...

Страница 383: ...pecified output port address allowing the address to behave like a normal memory location See Also Memory Outport Assign Memory Outport Show Example To disable the output port at address 408h Memory Outport Delete 408h Chapter 9 Debugger Commands Memory Outport Delete 361 ...

Страница 384: ...d by the port address port_addr Subsequent output to that port starts at the beginning of the file See Also Memory Outport Assign Memory Outport Delete Memory Outport Show Example To rewind the output file associated with output port 408h Memory Outport Rewind 0x408 Chapter 9 Debugger Commands Memory Outport Rewind 362 ...

Страница 385: ...address port_addr or port address range port_addr port_addr If you specify a range the debugger displays all buffer values in that range If you do not specify any parameters the debugger displays all declared output ports with their port addresses sizes values and data destinations See Also Memory Outport Assign Memory Outport Delete Memory Outport Rewind Examples To display all assigned output po...

Страница 386: ...ry hexadecimal or decimal as appropriate for the register You can change the existing value by entering any legal expression and pressing the Return key Pressing the Return key without specifying a register value terminates the command All register names are preceded with an sign See Also Memory Assign Examples To modify register values interactively Memory Register The program counter PC is displ...

Страница 387: ...0B8 4280 10a4h sp 0x00015DB4 89524 To set the value of register d1 to 44h Memory Register d1 0x44 To interactively change the value of register d1 Memory Register d1 Chapter 9 Debugger Commands Memory Register 365 ...

Страница 388: ...or b option must be used at compile time in order for this information to exist in program memory The file name bbadump data is the default dump file name Once this information has been unloaded it can be formatted with the BBA report generator bbarep see the HP Branch Validator for AxLS C User s Guide Note The Unload_BBA command is disabled when the debugger option Demand_Load is On If Demand_Loa...

Страница 389: ...th the specified absolute file load_file into the file bbadump data This command lets you run bbarep without specifying a file name The file name bbadump data is used as the default name of all dump files Memory Unload_BBA Load_File load_file To dump_file The Memory Unload_BBA Load_File load_file To dump_file command unloads only basis branch information associated with the specified absolute file...

Страница 390: ...To unload branch analysis information associated with absolute file a out x into file mydata Memory Unload_BBA Load_file a out To mydata Chapter 9 Debugger Commands Memory Unload_BBA 368 ...

Страница 391: ...ounter if the two are different Example To display the current module function and line number Program Context Display Current context is ecs main main On line 81 See Expression Elements section of the Expressions and Symbols in Debugger Commands chapter for a description of debugger operators Note If the PC does not point to a valid module an alternate context is displayed The alternate context i...

Страница 392: ...the function stack nesting level beside each function name The current function is level 0 the caller is always 1 etc You can use the Program Context Expand command to display the local variables and parameters of any function shown in the backtrace window The calling parameters and local variables are accessible on the C run time stack for functions in a directly called chain from the main progra...

Страница 393: ...when functions are referenced without a module or function qualifier The default module reverts to the current module when you invoke any command that causes program execution or if you execute the Program Context Set command without a parameter Example To select module updateSys as the current module Program Context Set updateSys Chapter 9 Debugger Commands Program Context Set 371 ...

Страница 394: ...rev Page Up arrow and Down arrow keys may be used when the Code window is active to display code at higher or lower line numbers This command does not change the current program context See Also Memory Display Mnemonic Program Context Set Program Find_Source Examples To display line 82 of the current module in the Code window Program Display_Source 82 To display the source code for function update...

Страница 395: ...file for the string If you specify Backward the debugger searches backward through the file for the string If neither Forward nor Backward is specified the debugger searches forward through the file for the string If the debugger cannot find the specified string it displays the message string not found The screen remains unchanged See Also Program Find_Source Occurrence Example To find the next fo...

Страница 396: ...ing nonalphanumeric characters in quotation marks Quotation marks are not required if the string consists of only alphanumeric characters If the debugger finds an occurrence of the string it displays the line containing the string at the top of the Code window If the string does not exist or the debugger cannot find it the debugger displays the message string not found The screen remains unchanged...

Страница 397: ...through the current module for the string time starting at line 237 Program Find_Source Occurrence Backward time 237 To search forward through the module main for the string system_is_running beginning at line 1 Program Find_Source Occurrence Forward system_is_running main 1 Chapter 9 Debugger Commands Program Find_Source Occurrence 375 ...

Страница 398: ...ing Interrupts Once an interrupt is initiated it remains pending until the status register s interrupt mask bits allow the interrupt to occur The interrupt mask bits in the status register can change as a result of processor instructions or because of user intervention Interrupt Recognition An interrupt is recognized if the interrupt level specified is higher than the interrupt mask bits Interrupt...

Страница 399: ...nterrupt command can be canceled with the Program Interrupt Remove command The Repetitive qualifier does not always force a debugger simulator interrupt to occur every cycle_count cycles because the interrupt can be delayed by masking or by long instructions See Also Program Interrupt Remove Examples To set a one time interrupt to occur in ten cycles at interrupt level 7 through interrupt vector 6...

Страница 400: ...level The interrupt level range is from 1 to 7 inclusive If you do not specify a level all interrupts are canceled See Also Program Interrupt Add Examples To remove all level 7 interrupts Program Interrupt Remove 7 To remove all interrupts Program Interrupt Remove Chapter 9 Debugger Commands Program Interrupt Remove 378 ...

Страница 401: ...rs let you specify defaults for loading executable modules These defaults affect the Program Load Default or command line program load commands You can list the Program Load defaults with the Debugger Option List command Default Parameter When you specify the Default parameter the debugger loads the executable module according to the options set with the Program Load Option_Set command Chapter 9 D...

Страница 402: ...ng program If you enter the Program Load command with the New Append or Options parameter the following qualifiers are available All Both the program image and program symbols to be loaded Code_Only Only the program image is loaded Symbols_Only Only the program symbols are loaded Pc_Set The program counter is set from the transfer address in the load file No_Pc_Set The program counter is not reset...

Страница 403: ...s where the object module will be loaded is specified at link time However the address can be changed by specifying a new base address See Also Debugger Execution Reset_Processor Program Pc_Reset Debugger Option General Demand_Load Debugger Option List Examples To load absolute file ecs remove all existing program symbols reset the program counter and load the full symbol set Program Load Default ...

Страница 404: ...mmand to restart execution at the beginning of the program The command does not clear breakpoints All declared I O ports still exist as originally specified See Also Debugger Execution Reset_Processor Program Load Program Run Example To reset the program counter to the transfer address from the absolute file Program Pc_Reset Chapter 9 Debugger Commands Program Pc_Reset 382 ...

Страница 405: ...he Program Run command may be used to resume execution after program execution has been suspended Program Run From The Program Run From command begins program execution at the specified start address start_addr Using the Program Run From command to specify a starting address in high level mode may cause unpredictable results if the compiler startup module is bypassed Chapter 9 Debugger Commands Pr...

Страница 406: ...ple the command Program Run Until 20 90 Return causes the program to run until either line 20 or line 90 is encountered whichever occurs first Pass Count The pass count pass_count specifies the number of times the break address is executed before the program is halted For example a pass count of three will cause the program to break on the fourth execution of the break address Macro Calls If speci...

Страница 407: ... counter address and run until line 110 of the current module Program Run Until 110 To begin program execution at the current program counter address run until the program returns to the calling function of the current function and then execute the macro read_val Program Run Until 1 read_val Chapter 9 Debugger Commands Program Run 385 ...

Страница 408: ...tepping begins at the address contained in the program counter If you do not specify a step count step_count the debugger will either step one C source line or one machine instruction Note If the debugger steps into an HP library routine you can then use the Program Run Until 1 stack level 1 command to run to the end of the library routine Program Step From The Program Step From command executes o...

Страница 409: ...unction keyF7 to single step See Also Breakpt Instr Program Run Program Step Over Program Step With_Macro Examples To step four source lines starting at line 39 Program Step From 39 4 To step ten source lines high level mode or ten processor instructions assembly level mode starting at the program counter address Program Step Count 10 To step one source line high level mode or one processor instru...

Страница 410: ... C source line at a time In assembly level mode the debugger executes one microprocessor instruction at a time If you do not specify a starting address single stepping begins at the address contained in the program counter If you do not specify a step count step_count the debugger will either step one C source line or one machine instruction Program Step Over From The Program Step Over From comman...

Страница 411: ...n Program Step Count Program Step From Program Step With_Macro Examples To step four source lines starting at line 39 and execute through any function calls Program Step Over From 39 4 To step ten source lines high level mode or ten processor instructions assembly level mode starting at the program counter address and execute through any function calls Program Step Over Count 10 To step one source...

Страница 412: ...value Single stepping is done by C source line in high level mode and by microprocessor instruction in assembly level mode See Also Program Run Program Step From Program Step Over Example To step through the program one source line high level mode or one processor instruction assembly level mode at a time executing the macro read_var after each step Program Step With_Macro read_var Chapter 9 Debug...

Страница 413: ... array the initial value must be a string of values separated by commas and or enclosed in quotation marks If fewer values are given than will fill the array the pattern is repeated until the entire array is filled When initializing symbols the symbol type is not used Only the size is used If a char array is defined it is filled with the specified pattern in the same way as with the Memory Block_O...

Страница 414: ...tion in debugger memory Only debugger commands and C expressions in macros can refer to debugger symbols They cannot be referenced by the program in target memory If an initial value is specified for the debugger symbol the value is loaded in the memory location referenced by the symbol If an initial value is not specified the memory location referenced by the symbol is set to zero See Also Debugg...

Страница 415: ...the specified type In this case the debugger fills the memory location with the lower bytes of the specified value Executing the command Expression Printf x s1 shows that the value is 203 the lower two bytes of the specified value Chapter 9 Debugger Commands Symbol Add 393 ...

Страница 416: ...splays the parents and children of a C class The inheritance relationship is displayed in the Journal window Example To display the parents and children of the C class fruit type Symbol Browse fruit Chapter 9 Debugger Commands Symbol Browse 394 ...

Страница 417: ...Symbol Display The Symbol Display command displays symbols and associated information in the Journal window Chapter 9 Debugger Commands Symbol Display 395 ...

Страница 418: ... the specified name will be displayed including global symbols and symbols local to the module Global symbols are not attached to a module Symbol Display Default dest If you specify a structure name using the Types option the debugger shows all members in the structure and their types Default If you specify Default the debugger displays all types of symbols Options The following options may be spe...

Страница 419: ...ich the symbols are declared Reserved_Symbols If you specify Reserved_Symbols the debugger displays processor reserved symbols registers and internal debugger variables See Also Symbol Add Symbol Remove Examples To display the symbol updateSys in the current module Symbol Display Default updateSys Symbol Display Default updateSys ecs updateSys Type is High level module Code section 00001436 thru 0...

Страница 420: ...001122 thru 00001435 To display all function and labels in module main Symbol Display Options Function labels End_Options main To display all reserved symbols Symbol Display Reserved_Symbols To display all symbols in module systemInt in compressed format symbol names only Symbol Display Options Wide End_Options systemInt Symbol Display Options Wide End_Options systemInt Root is systemInt systemInt...

Страница 421: ...is struct_temp_settings ecs struct_temp_settings Type is Type definition of Structure size 8 struct_temp_set temp Type is Member of type float Offset 0 struct_temp_set humid Type is Member of type int Offset 4 To display any type mismatches detected in the user program during program loading along with the address of the symbol that has the mismatch Symbol Display Warnings 2 mismatches getOpInput ...

Страница 422: ... macro is deleted the debugger requests confirmation Entering y after the symbol name provides automatic confirmation of the request This option is useful in command files The debugger lets you add a debugger symbol with the same name as a target module s local symbol or a predefined macro s local symbol If you do add a debugger symbol with same name as a local symbol you must specify the entire s...

Страница 423: ...er_settings in module updateSys Symbol Remove updateSys alter_settings In this example the symbol being removed is a function which contains other symbols The debugger prompts you with the message This symbol has a sub tree Delete with sub tree Y N Enter Y to delete the symbol and its sub tree If you respond with N the command is canceled To delete all symbols in all modules Symbol Remove Chapter ...

Страница 424: ...dow Active command activates the specified window The border of the active window is highlighted The Code window is active by default within the high level and low level screens Chapter 9 Debugger Commands Window Active 402 ...

Страница 425: ...d Status windows cannot be made active See Also Window Cursor Window Delete Window Erase Window New Window Resize Window Screen_On Window Toggle_View Examples To make the high level Backtrace window active Window Active High_Level Backtrace To make the assembly Code window active Window Active Assembly Code To make user window 57 active Window Active User_Window 57 Chapter 9 Debugger Commands Wind...

Страница 426: ...nly user defined windows and the standard I O window window No 20 may be specified with this command See Also Window Active Window Delete Window Erase Window New Window Resize Window Screen_On Window Toggle_View Examples To move the cursor to line 5 column 22 in the Stdio window Window Cursor 20 Position 5 22 To move the cursor to line 3 column 0 in user window 57 Window Cursor 57 Position 3 0 Cha...

Страница 427: ...and you delete all three windows the screen will be deleted as well See the Displaying Screens and Displaying Windows sections of the Viewing Code and Data chapter for more information about window and screen numbers Predefined debugger windows and screens cannot be removed Files opened with the File User_Fopen command may also be closed with this command See Also File User_Fopen File Window_Close...

Страница 428: ...ndow is cleared Only user defined windows and the standard I O screen window No 20 can be cleared This command is primarily for use within macros See Also Window Active Window Cursor Window Delete Window New Window Resize Window Screen_On Window Toggle_View Examples To clear all displayed information in the Stdio window Window Erase 20 To clear all displayed information in user window 57 Window Er...

Страница 429: ... window size and location on the screen Window coordinates 0 0 correspond with the upper left corner of the screen Note When making new window be careful not to enter coordinates that will result in a window that will cover the status line and command line On a standard 80 column by 24 row terminal display a row coordinate may be between 0 and 23 However creating a window whose bottom row coordina...

Страница 430: ...than the screen boundary For example the command Window New 15 Assembly 36 1 39 80 will fail if you have an 80 column by 40 row screen The command Window New 15 Assembly 36 0 39 79 will work Alternate Window Views To create alternate views of a user defined window follow the procedure outlined below 1 Execute the Window New command to define a window with specific size parameters 2 Execute the Win...

Страница 431: ...ith upper left corner at coordinates 5 5 and the lower right corner at coordinates 10 20 Window New 55 High_Level 5 5 10 20 To move the high level status line window to the top of the display in the standard interface Window New 5 High_Level 0 0 3 78 For this command to execute the high level window must be displayed and the difference between the bottom row coordinate and top row coordinate 3 0 m...

Страница 432: ...zing it press M and use the cursor control keys to move the window on the screen Press the Return key to save the new coordinates Press CTRL C or Esc Esc to restore the previous coordinates If an alternate window view is selected the size alterations are made to the alternate view Note The Window Resize command can be used to alter the size of any existing window including the predefined debugger ...

Страница 433: ... in the high level mode Likewise when you display the assembly level screen the debugger is placed in the low level mode See Also Window Active Window Cursor Window Delete Window Erase Window New Window Resize Window Toggle_View Example To activate the Assembly level screen and place the debugger in low level mode Window Screen_On Assembly Chapter 9 Debugger Commands Window Screen_On 411 ...

Страница 434: ...ically this is an enlarged view of the window If you do not specify a window number or if you specify 0 the active window is the default When you execute the Window Toggle_View command the display alternates between the two views of the window Chapter 9 Debugger Commands Window Toggle_View 412 ...

Страница 435: ...o Window Active Window Cursor Window Delete Window Erase Window New Window Resize Window Screen_On Examples To display the alternate view of the active window Window Toggle_View To display the alternate view of the high level Code window Window Toggle_View High_Level Code To display the alternate view of user window 57 Window Toggle_View User_Window 57 Chapter 9 Debugger Commands Window Toggle_Vie...

Страница 436: ...Chapter 9 Debugger Commands Window Toggle_View 414 ...

Страница 437: ...10 Expressions and Symbols in Debugger Commands A description of the expressions and symbols you can use in debugger commands 415 ...

Страница 438: ...mands Expression elements Formatting expressions Symbolic referencing Debugger commands use standard C operators and syntax This chapter describes the elements of C expressions and how expressions are structured It also discusses memory and variable referencing Chapter 10 Expressions and Symbols in Debugger Commands 416 ...

Страница 439: ...ss ranges line numbers Debugger commands allow any legal C expression The following paragraphs describe elements of C expressions used in debugger commands Operators The debugger supports most standard C language operators and special debugger operators C Operators C operators include arithmetic operators relational operators assignment operators and structure union and array operators The followi...

Страница 440: ...The debugger also supports C operators and Debugger Operators The debugger uses some characters as special debugger operators These debugger operators and their descriptions are listed in the following table Debugger Operators Operator Description References the contents of a memory location For example Expression Display_Value 0x20b0 Identifies a line number For example Program Run Until 82 Chapt...

Страница 441: ...A constant is a fixed quantity Constants may be integers floating point values or character string constants Integer Constants An integer constant may be defined as a sequence of numeric characters optionally preceded by a plus or minus sign If unsigned the debugger assumes the value is positive Positive integer constants may range between 0 and 2 31 1 When a constant is negative its two s complem...

Страница 442: ...name By default the debugger interprets integer constants as decimal values The Configuring the Debugger chapter describes how to change the default radix for assembly level values Note You cannot use binary numbers when the radix is hexadecimal The debugger truncates values larger than that which can be contained in an element of an expression or command The debugger extends values less than that...

Страница 443: ...cision values internally Floating point constants specified on the debugger command line must have the following syntax sign integer_part fractional_part exponent where sign is an optional plus or minus sign integer_part consists of one or more decimal digits is a decimal point fractional_part may be zero or more decimal digits exponent is an optional exponent which is letter E or e followed by an...

Страница 444: ...ts in debugger expressions if your compiler places the constant in the absolute file Non printable characters Some non printable characters may be embedded in both character strings and character constants enclosed in double quotation marks by using the escape sequences listed in the table which follows Escape sequences are indicated by a backslash The backslash is interpreted as a character in ch...

Страница 445: ...lue xnumber must be entered in the format xnn where nn is a two digit hexadecimal value For example x0f not xf Note The debugger automatically terminates character strings enclosed in quotation marks with a null character However when you use a character string with a Memory Assign or Memory Block_Operation Fill Search or Test command the debugger uses only the characters within the quotation mark...

Страница 446: ... that were defined in the source program can be passed to the debugger and referenced during a debugging session Note that preprocessor names are not symbols The compiler includes all program symbol information in the resulting output object module file by default When you load an executable file for debugging the debugger places all program symbols into the debugger symbol table by default The de...

Страница 447: ...complex user commands Patch your source code temporarily Display information in user defined windows A macro is similar to a C function It has a name return type optional arguments optional macro local symbols and a sequence of statements There are two types of macro symbols Macro names Macro local symbols Macro Names Macro names identify a macro You assign macro names with the Debugger Macro Add ...

Страница 448: ...es line numbers by default Line number references must be preceded by a pound sign For example Program Run Until 82 When you refer to a source line number the debugger translates it to the address of the first instruction generated by the compiler for that C statement If a C source line did not generate executable code a reference to that line number actually refers to the next line that did gener...

Страница 449: ...nge of memory bounded by two addresses You specify an address range with a starting address two periods and an ending address These addresses can be actual memory locations line numbers symbols or expressions that evaluate to addresses in memory You can also specify a byte offset as the ending address parameter If you specify a byte offset the debugger adds the specified number of bytes to the sta...

Страница 450: ...code as bytes starting at memory location tick_clock and ending at 20 bytes past tick_clock Memory Display Byte tick_clock 20 To map memory to RAM starting at memory address 3000h and ending 0fffh bytes after address 3000h Memory Map Write_Read 3000h 0fffh Chapter 10 Expressions and Symbols in Debugger Commands Addresses 428 ...

Страница 451: ...on These keywords are very similar to the C language conditional statements You cannot redefine keywords or use them in any other context The debugger keywords are listed below IF ELSE FOR WHILE DO BREAK CONTINUE RETURN Chapter 10 Expressions and Symbols in Debugger Commands Keywords 429 ...

Страница 452: ...sions Examples of legal and illegal source language code expressions in high level mode are shown below Legal 80 main Illegal 80 3 main 10 With several commands the size of an expression can be specified by size qualifiers The size qualifiers are explained in the Debugger Commands chapter You may use C classes in expressions Floating point calculations follow the rules of C Single precision number...

Страница 453: ...ressions and ASCII character strings enclosed in quotation marks For several commands each value in an expression string can be changed to the size specified by the size qualifiers If you change the size the debugger pads elements that do not fit evenly Examples of expression strings are shown in the following table Expression String Examples String Results 1 2 abc 3 4 time mac1 1xyz123 Values 1 a...

Страница 454: ...ns in a C source program have a storage class that defines how the variable or function is created and accessed The storage classes are extern global static automatic register C preprocessor symbols are not available to the debugger The following paragraphs describe each storage class used in a C source program Extern global Global variables in a C program are declared outside of a function and ar...

Страница 455: ...ween function calls You can access an automatic local variable when it is local to the current function or when its function is on the stack Use the stack level prefix stack_level to access an automatic variable in a function on the stack Register Register variables are also declared inside a function and are accessible only to that function Storage for these variables is allocated in a specific h...

Страница 456: ...gned 16 bits unsigned 32 bits unsigned 0 to 255 0 to 65535 0 to 4294967295 High Level Scalar Data Types Type Size Range char unsigned char short int unsigned short int int unsigned int long unsigned long enum pointer float double 8 bits signed 8 bits unsigned 16 bits signed 16 bits unsigned 32 bits signed 32 bits unsigned 32 bits signed 32 bits unsigned 8 32 bits unsigned 32 bits unsigned 32 bits ...

Страница 457: ...erts the data type When a specific type is required by a command the value is converted by the debugger according to the rules of C Type Casting Type casting forces the conversion of a debugger symbol or expression to a specified data type The debugger converts the resulting value of the expression to the specified data type as if the expression was assigned to a variable of that type The debugger...

Страница 458: ...364 Expression Display_Value Q S int_val causes int_val to be displayed as abcd Note that the expression evaluates to an address because the Q S type cast is semantically synonymous with the C type cast char I A This type cast coerces an expression into an instruction address For example assuming the symbol int_val has a value of 0x400 Breakpt Instr I A int_val sets an instruction breakpoint at ad...

Страница 459: ... its symbol table for x using the following priority A variable local to the current macro if any A variable local to the current function if any A variable static to the current module if any A global variable or debugger symbol Referencing Symbols Symbols are qualified and therefore referenced according to their context Context in the debugger is defined by a symbol tree and if applicable by a m...

Страница 460: ...list of multiple program trees If two or more executable files with the same name are loaded the debugger appends an underscore and number to one of the files to make the root names unambiguous For example loading two a out x files would result in the creation of two program trees with root names a_out and a_out_1 Whenever the PC is pointing to the code space of a program the root name of the prog...

Страница 461: ...l modules with multiple code sections If assembly language modules have more than one code section the debugger breaks the module down into sub modules For example if the source file myfile s had three code sections the modules myfile myfile_2 and myfile_3 would appear in the program s symbol tree This module separation only affects the address ranges of the module not the scoping i e all symbols ...

Страница 462: ...tr a_out mod1 func1 Breakpt Instr mod1 func1 Set a breakpoint at the entry point to function func1 in module mod1 in program root a_out Set a breakpoint at the entry point to function func1 in module mod1 in the current root Symbol Display Default a_out mod1 func1 Symbol Display Default mod1 func1 Display symbols scoped under function func1 in module mod1 in program root a_out Display symbols scop...

Страница 463: ... current root and all symbols scoped under x x may be a variable function or module name Breakpt Instr x 18 Set a breakpoint at line 18 of module x Symbol Display Default x y Display symbol information for local variable y in function x or function y in module x in the current context Symbol Display Default x y Display symbol information for local variable y in function x or function y in module x...

Страница 464: ... the first element of the array Breakpt Access a 3 A breakpoint is set at the address specified in a 3 not the address of a 3 Breakpt Access a 3 A breakpoint is set at the address of a 3 Stack References When a function is invoked in C space is allocated on the stack for local variables If one function calls another function all information is saved on the stack to continue execution when the call...

Страница 465: ...nesting level preceded by an at sign For example the command Program Run Until 1 executes the program until the current function returns to its caller To refer explicitly to a local variable in a nested function specify the function nesting level followed by a backslash and then the name of the variable For example the command Expression Display_Value 3 str references the local variable str of the...

Страница 466: ...Chapter 10 Expressions and Symbols in Debugger Commands Symbolic Referencing 444 ...

Страница 467: ...11 Predefined Macros 445 ...

Страница 468: ...Debugger Macros table and are described on the following pages The following predefined debugger macros provide services to the SIMIO system and internal debugger functions They are not designed for use by the debugger user These names will be displayed if you check the debugger s predefined macro list using the Symbol Display command bbaunload hpsimio hp_redirect hpnosimio hpioctl hpeofkbd hpiore...

Страница 469: ...bol Get read a key from the keyboard Check keyboard for availability of key Search for character in memory Clear memory bytes Copy characters from memory Set the value of characters in memory Open a UNIX file for reading and or writing Write a value to the simulated memory mapped outport port Read from a system file Read from an I O port not implemented in this product Get the register value using...

Страница 470: ...he breakpoint address used by the debugger and the following values for breakpoint type 1 The cause of the breakpoint is unknown 0 A breakpoint did not cause this macro call 1 The breakpoint was caused by a read from the address 2 The breakpoint was caused by a write to the address 3 The breakpoint was caused by an access read write status unknown of the address 4 The breakpoint was caused by an i...

Страница 471: ...dress int reason reason break_info address Expression Printf Breakpoint at 8x Reason d n address reason return 1 Program Run Until main Program Step Breakpt Read i print_info Breakpt Write k print_info Breakpt Access j print_info Program Run the debugger will display the breakpoint address and type value in the journal window Chapter 11 Predefined Macros break_info 449 ...

Страница 472: ...d addr Description The byte macro returns a byte value of the memory contents at the specified address The value of the expression addr is computed and used as the address Diagnostics The byte value of the memory contents at the specified address is returned Chapter 11 Predefined Macros byte 450 ...

Страница 473: ...o the journal window of the debugger Example The following command file segment defines two global debugger symbols and includes the definition of a user defined macro that uses close Symbol Add int infile Symbol Add int outfile Debugger Macro Add int close_files infile outfile int infile file descriptor to close int outfile file descriptor to close close input file infile close infile if infile 1...

Страница 474: ...dr void addr Description The dword macro returns a LONG 4 byte value of the memory contents at the specified address The value of the expression addr is computed and used as the address Diagnostics The LONG value of the memory at that address is returned Chapter 11 Predefined Macros dword 452 ...

Страница 475: ...d format character where parm is the associated integer value level can be used to indicate the severity of the error by its value The following explains the values available for level and the associated action taken by error 1 text is displayed in the journal window 2 text is displayed in the journal window and the macro halts program execution 3 An error box pops up text is displayed within the ...

Страница 476: ...um int vp_num Description The macro fgetc returns the next character in the file associated with the window number vp_num The window number must be a result of the File User_Fopen command The value 1 is returned on end of file Chapter 11 Predefined Macros fgetc 454 ...

Страница 477: ...le to be opened mode is a string that specifies the mode in which the file is opened Valid modes are r Open file for reading only w Open file for reading and or writing existing file contents are erased a Open file for appending Diagnostics If successful a window number is returned The error code 27 indicates that the window is already open or that the window number is out of range The error code ...

Страница 478: ...gument must coincide with the symbol address for the macro to return the symbol name the macro will not return a symbol name if the symbol storage space starts elsewhere but spans the argument address Diagnostics Returns the symbol name associated with the address if one exists otherwise it returns a null string Example Symbol Add foo tab Address 0x1000 Expression Printf s getsym 0x1000 foo Chapte...

Страница 479: ...uivalent to the target program reading from the inport which will advance the input source If no inport exists at the port address value is read from the the journal window If a port exists at the port address value is read from the source specified when the inport was created Diagnostics If an error occurs inport returns a 0 if inport completes normally it returns a 1 Example Memory Inport Assign...

Страница 480: ...gnostics Returns one of the following four values depending on the status of the symbol Value Meaning 1 Symbol does not exist 0 Symbol not currently active cannot be referenced 1 Symbol currently active part of the local procedure 2 Symbol available on the stack not part of the local procedure Example Symbol Add foo tab Address 0x1000 Expression Printf i isalive foo 1 because symbol is defined and...

Страница 481: ...om the keyboard Synopsis unsigned short key_get Description The macro key_get reads a key from the keyboard It returns only after a key is available The return value is the value of the key Chapter 11 Predefined Macros key_get 459 ...

Страница 482: ..._stat Description The key_stat macro checks the keyboard to see if a key is available to read It returns 0 if no key is available The first pending key is returned if any keys are available Diagnostics The value 1 is returned if the macro fails Chapter 11 Predefined Macros key_stat 460 ...

Страница 483: ...ter byte_value in the first count bytes of memory area str1 Diagnostics The memchr macro returns a pointer to the first occurrence of character byte_value in the first count characters in memory area str1 If byte_value does not occur memchr returns a NULL pointer For debugger variables 1 0xFFFFFFFF is returned if byte_value does not occur Chapter 11 Predefined Macros memchr 461 ...

Страница 484: ... bytes Synopsis char memclr dest count char dest unsigned count Description The memclr macro sets the first count bytes in memory area dest to zero Diagnostics The memclr macro returns dest Chapter 11 Predefined Macros memclr 462 ...

Страница 485: ...emory Synopsis char memcpy dest src count char dest char src unsigned count Description The memcpy macro copies count characters from memory area src to dest Diagnostics The memcpy macro returns dest Chapter 11 Predefined Macros memcpy 463 ...

Страница 486: ...memset dest byte_value count char dest char byte_value unsigned count Description The memset macro sets the first count characters in memory area dest to the value of character byte_value Diagnostics The memset macro returns dest Chapter 11 Predefined Macros memset 464 ...

Страница 487: ... modes are read only write only read write no delay append create truncate 0 1 2 4 8 256 HP UX or 512 SunOS 512 HP UX or 1024 SunOS These modes may be combined be adding the appropriate values together This macro is an interface to the UNIX system call open 2 Refer to the HP UX Reference Manual for detailed information Diagnostics If the system call to open 2 is successful the system file descript...

Страница 488: ...outfile Debugger Macro Add int open_files infile outfile char infile file to read from char outfile file to write to open input file in read only mode infile open infile 0 if infile 1 return 0 open failed create output file in read write mode outfile open outfile 258 if outfile 1 return 0 open failed return 1 both files were opened successfully Chapter 11 Predefined Macros open 466 ...

Страница 489: ...port destination If no outport exists at the port address value is written to the journal window If a port exists at the port address value is written to the destination specified when the outport was created Diagnostics If an error occurs outport returns a 0 if the macro ends normally it returns a 1 Examples Memory Outport Assign Byte 3 Destination_Is File tmp junk Debugger Macro Call outport 3 1...

Страница 490: ... of bytes read is returned Otherwise 1 is returned and a system generated error message is written to the journal window of the debugger Example The following command file segment defines two global debugger symbols and includes the definition of a user defined macro that uses read Symbol Add int infile Symbol Add int outfile Debugger Macro Add int foo infile outfile int infile file descriptor to ...

Страница 491: ...s returned by the macro Diagnostics If the string does not contain a valid register name an unknown value will be returned and the debugger will display an error message in the debugger error window Examples To display the value of register D0 Symbol Add char reg_name 10 Debugger Macro Call strcpy reg_name D0 Expression Display_Value reg_str reg_name or Expression Display_Value reg_str D0 or Expre...

Страница 492: ...Show the software version number for the debugger product Synopsis void showversion Description The showversion macro lists the software version number for your debugger product Chapter 11 Predefined Macros showversion 470 ...

Страница 493: ...rc char dest src Description The strcat macro appends a string to the end of another string The string in src is appended to the string in dest and a pointer to dest is returned Diagnostics No checking is done on the size of dest Chapter 11 Predefined Macros strcat 471 ...

Страница 494: ...tion The strchr macro returns a pointer to the first occurrence of the character byte_value in the string str1 if byte_value occurs in str1 Diagnostics If the character byte_value is not found strchr returns a NULL pointer For debugger variables 1 0xFFFFFFFF is returned if byte_value does not occur Chapter 11 Predefined Macros strchr 472 ...

Страница 495: ...example because an ASCII A is 41 hexadecimal and an ASCII B is 42 hexadecimal A is less than B The strings str1 and str2 are compared and a result is returned according to the following relations relation result s1 s2 s1 s2 s1 s2 negative integer zero positive integer Diagnostics Strings are assumed to be NULL terminated or to be within the array boundaries The comparison is always signed regardle...

Страница 496: ...escription The strcpy macro copies src to dest until the NULL character is moved Copying from the right parameter to the left resembles an assignment statement A pointer to dest is returned Diagnostics No checking is done on the size of dest Chapter 11 Predefined Macros strcpy 474 ...

Страница 497: ... to be identical The strings str1 and str2 are compared and a result is returned according to the following relations relation result s1 s2 s1 s2 s1 s2 negative integer zero positive integer Diagnostics Strings are assumed to be NULL terminated or to be within the array boundaries because the comparison is limited to the number of stated characters The comparison is always signed regardless of how...

Страница 498: ...char str1 Description The strlen macro returns the length of a string It returns the length of str1 excluding the NULL character Diagnostics If str1 is not properly terminated by a NULL character the length returned is invalid Chapter 11 Predefined Macros strlen 476 ...

Страница 499: ...he synopsis above specifies the maximum number of characters to be compared The strings str1 and str2 are compared and a result returned according to the following relations relation result s1 s2 s1 s2 s1 s2 negative integer zero positive integer Diagnostics Strings are not required to be NULL terminated or to fit within the array boundaries because the comparison is limited to the number of state...

Страница 500: ...alse Any C expression resulting in a value may be used Example Program Run Until 3 17 printf until i 3 x y The command above sets temporary breakpoints at line numbers 3 and 17 in the current module and at entry to the function printf When any one of these locations is encountered by the executing program the debugger will stop and check the until conditional statements If the variable i is equal ...

Страница 501: ...mand program execution will halt when the stated expression is true and will continue when the stated expression is false Any C expression resulting in a value may be used Example Breakpt Instr strcpy when str 0 This command sets a breakpoint at the entry point of the routine strcpy Each time the breakpoint occurs the when macro is executed The macro causes program execution to stop when the byte ...

Страница 502: ...word addr void addr Description The word macro returns a WORD 2 byte value of the memory at the specified address The value of the expression addr is computed and used as the address Diagnostics The WORD value of the memory at that address is returned Chapter 11 Predefined Macros word 480 ...

Страница 503: ...of bytes written is returned Otherwise 1 is returned and a system generated error message is written to the journal window of the debugger Example The following command file segment defines two global debugger symbols and includes the definition of a user defined macro that uses write Symbol Add int infile Symbol Add int outfile Debugger Macro Add int foo infile outfile int infile file descriptor ...

Страница 504: ...Chapter 11 Predefined Macros write 482 ...

Страница 505: ...12 Debugger Error Messages A list of the error messages generated by the debugger 483 ...

Страница 506: ...bugger displays an error message and a pointer to the location where it detected the error This chapter lists and describes the error messages and warnings issued by the debugger These errors are listed numerically with possible error solutions Chapter 12 Debugger Error Messages 484 ...

Страница 507: ...ption for the command and enter the command again with the correct argument specification 8 Invalid argument The argument specified is not valid for this command Check command syntax and re enter the command with a valid argument 9 Unexpected separator encountered The argument separator is not valid in this context Check the syntax and enter the correct separator 10 Unknown expression character Th...

Страница 508: ... errors include invalid value missing operand missing operator and unknown operand combination 15 Invalid filename The filename specified could not be created Valid filenames are dependent upon your host computer system 16 Invalid line number The line number specified is not valid Line numbers must be preceded with a pound sign and must be in a valid range This error will occur if you enter a poun...

Страница 509: ... operand type that is not allowed for this operator Operators must match operands according to the C language specifications 22 Upper bound less than lower bound An attempt was made to specify a lower bound that is greater than the upper bound The upper bound must be greater than the lower bound 23 Upper bound missing An attempt was made to specify a lower bound without an upper bound The upper bo...

Страница 510: ... be used in expressions as casts and must be enclosed in parentheses 29 Unknown special key A key was pressed that the debugger does not recognize 30 Start line invalid The starting line for the Program Find_Source command may be omitted or may be any valid line optionally within a module 31 Invalid exception vector You tried to specify an exception vector that is invalid In a Program Interrupt Ad...

Страница 511: ...ther Two switches of the same group were given Only one switch per group may be specified 53 Invalid switch given for this command The specified qualifier is not associated with the specified command Check the command syntax and re enter the command 54 Value too large A value that is out of range was specified Values must be in the valid range for the command 55 Instruction expressions are invalid...

Страница 512: ...tory or in the search directories Check the current directory for the filename that was specified A typing error may have occurred 61 Structure member not found The specified structure member does not exist in the specified structure Check the structure definition for the member that was specified A typing error may have occurred 62 Numeric addresses not allowed in this mode An attempt was made to...

Страница 513: ... Memory Map Guarded commands can only act on Write_Read areas 70 Arguments do not match any Read_Only or Guarded area The arguments specified with a Memory Map Write_Read command do not match the corresponding Memory Map Read_Only or Memory Map Guarded command The arguments must match exactly Entering a Memory Map Show command gives a map of Read_Only and Guarded areas 71 Address range contains un...

Страница 514: ...hat was previously defined Another name should be used 78 Cannot create this symbol An error occurred when trying to create the symbol Check that it is valid as a symbol name 79 Symbol is not a module An attempt was made to enter a symbol when a module was expected 80 Invalid stack level This error indicates that a stack level was specified that is greater than the current stack nesting 81 Not a s...

Страница 515: ...ros to obtain more memory 93 Invalid memory register address An attempt was made to read or write to inaccessible target memory Target memory that is protected cannot be read from or written to 94 Source is not available for this module An attempt was made to access source code in an assembly language module Use the Debugger Level command or the F3 function key to switch to assembly level mode to ...

Страница 516: ... some of the lines 100 No available windows This error indicates that the numbers allocated for user defined windows have all been used Some windows must be deleted before creating another user defined window 101 Cannot open file An attempt was made to open a file that does not exist 102 Local variable not alive A local variable was specified but the function containing the variable is not active ...

Страница 517: ...ready defined This error indicates that a local variable has been defined twice in a macro definition One definition of the variable must be deleted 110 This argument not defined This error indicates that an argument was declared that was not defined on the command line with the Debugger Macro Add command 111 This macro is in use already Macros cannot be called recursively 112 This is not allowed ...

Страница 518: ...en defined 119 Cannot get address of register or constant An attempt was made to find the address of a register or constant One example is Expression Display_Value a1 121 Cannot open command file for reading This error indicates that the command file specified cannot be found 122 Include file name too long This error indicates that the filename specified including its pathname is too long to be ha...

Страница 519: ...eters were used in the macro definition 128 Cannot show built in macros This error indicates that predefined macros cannot be shown with the Debugger Macro Display command They have no text 129 Runtime error in macro This error indicates that an error occurred when executing a macro 130 Command not implemented in simulator version This error indicates that the command entered will not work in this...

Страница 520: ... file specified to read commands from is open and being used as a log file Turn off logging with the File Log OFF command or choose another name for the command file 141 Miscellaneous error This is a message from the emulator which was not processed by the debugger All available error information is displayed on the screen Any one of a number of error messages may be displayed on your screen One p...

Страница 521: ...o value This error message is returned when certain commands are attempted on voids 147 Invalid suboption This suboption does not work with this command Refer to the Debugger Commands chapter of this manual for valid suboptions for various commands 148 Invalid option This option does not work with this command Refer to the Debugger Commands chapter of this manual for valid options for various comm...

Страница 522: ...154 Invalid type for macro argument This is an invalid type for the macro argument Refer to the chapter on macros for more information on valid types for macro arguments 155 Stopped by user The execution of this command was halted by the user 156 Not a logical expression The expression entered is not a logical expression Refer to the Expressions and Symbols in Debugger Commands chapter for more in...

Страница 523: ...alify with more local class The referenced C member function may be one of several function which have the same name Use a class name to be more specific 163 Cannot currently access via virtual base class 164 Too many parameters in a define constant Chapter 12 Debugger Error Messages 501 ...

Страница 524: ...Chapter 12 Debugger Error Messages 502 ...

Страница 525: ...13 Debugger Versions Information about how this version of the debugger differs from previous versions 503 ...

Страница 526: ...he debugger character set New symbol matching options Options have been added to allow you to control the case sensitivity for debugger symbols This is particularly useful if your language tools output only uppercase symbol names To change the case sensitivity setting set the Symbol Lookup option in the Settings Debugger Options dialog box New object file formats The ability to read and generate s...

Страница 527: ... Reload Program Load Options_Set See the command line help for details on these commands Note that the Breakpoints Delete pulldown now uses the Breakpt Erase command rather than the Breakpt Delete command so that the cut buffer should contain the address of the breakpoint rather than the number of the breakpoint when deleting This allows deleting break points in the same fashion as they are set HP...

Страница 528: ... symbols The previous limit was 64K symbols Each symbol uses 128 bytes of memory If so many symbols are loaded that your host operating system runs out of swap space the practical limit may be less than 16 million symbols More Global Symbols The maximum number of global symbols that can be read from an HP MRI IEEE 695 file has been increased from 8000 to 64K symbols Radix Option Side Effects Input...

Страница 529: ...cro editing The debugger s old standard interface may still be used New Product Number The old product number of this debugger was HP 64360 for HP 9000 Series 300 computers The new number is HP B1466 New Reserved Symbols ENTRY is the address of the first executable statement in a function For example func1 ENTRY is the first executable statement of func1 If you set a breakpoint at func1 ENTRY rath...

Страница 530: ...reference C Support The debugger now supports C name mangling de mangling and object instance breakpoints for the Microtec Research Inc C compiler Simulated I O Changes The debugger s simulated I O features are now compatible with the emulation interface s simulated I O Simulated I O in the debugger emulator now requires the setting up of simulated I O polling and addresses in the emulator configu...

Страница 531: ...Part 5 Installation Guide ...

Страница 532: ...Part 5 510 ...

Страница 533: ...14 Installation How to install the debugger software on your computer 511 ...

Страница 534: ... is running on the host computer the debugger has a graphical interface that provides pull down and pop up menus point and click setting of breakpoints cut and paste on line help customizable action keys and pop up recall buffers etc The debugger also has a standard interface for several types of terminals terminal emulators and bitmapped displays When using the standard interface commands are ent...

Страница 535: ...ll of the products on the tape However to save disk space or for other reasons you can choose to install selected filesets C Compiler Installation Some older versions of HP C Cross Compilers will overwrite the file HP64000 bin db68k making the graphical interface unavailable If you encounter this problem install the C compiler before you install the debugger software Chapter 14 Installation Instal...

Страница 536: ...m Administration Tasks manual for detailed information concerning updating your system Motif OSF For HP 9000 Series 700 workstations you must also have the Motif 1 1 dynamic link libraries installed They are installed by default so you do not have to install them specifically for this product but you should consult your HP UX documentation for confirmation and more information Hardware and Memory ...

Страница 537: ...on If the PROTECT light is not on remove the tape and make sure the tape s write protect screw points to SAFE If the BUSY light is not on check that the tape is installed correctly in the drive and that the drive is operating correctly 5 When the BUSY light goes off and stays off start the update program by entering etc update at the HP UX prompt 6 When the HP UX update utility main screen appears...

Страница 538: ...u press the softkey Select Item again Answer the last prompt with y It takes about 20 minutes to read the tape 9 When the installation is complete read tmp update log to see the results of the update Chapter 14 Installation To install software on an HP 9000 system 516 ...

Страница 539: ...our system see the Sun Installing SunOS manual System V software To find out whether the System V environment is already installed on your system check that the directory usr 5bin exists For instructions on installing System V see the Sun Installing SunOS manual System V IPC facilities semaphores To find out whether the IPC facilities are installed on your system type ipcs For instructions on inst...

Страница 540: ...ppings in the ttyswrc file in your HOME directory 2 Remove or comment out the following line from your xinitrc file xmodmap e keysym F1 Help If any of the other keys F1 F8 are remapped using xmodmap comment out those lines also 3 Add the following to your profile or login file stty erase H setenv KEYMAP sun The erase character needs to be set to backspace so that the Delete key can be used for del...

Страница 541: ...irectory usr openwin demo type setenv KEYMAP xterm 2 9 Reminder If you are using OpenWindows add usr openwin bin to the end of the PATH definition and add the following line to your profile setenv OPENWINHOME usr openwin Chapter 14 Installation To install the software on a Sun SPARCsystem 519 ...

Страница 542: ...not required to execute the interface but as a practical matter you must use some sort of window manager with the X server If you are using an HP workstation start the X server and the Motif window manager by entering x11start If you are using a Sun workstation enter usr openwin bin openwin Consult the X Window documentation supplied with the operating system documentation if you do not know about...

Страница 543: ...iable that causes the X resource manager to read a file of customized resources For ease of use choose the Xdefaults file as your merge file To merge the file Xdefaults with the X resource database enter xrdb merge Xdefaults at the HP UX prompt Customized resources will be merged with the X resource database and will be available for retrieval by the Graphical User Interface To enable the graphica...

Страница 544: ...nment variable must be set before the debugger s graphical interface will start Consult the X Window documentation supplied with the UNIX system documentation for an explanation of the DISPLAY environment variable Set the HP64000 environment variable if you installed the software in a directory other than usr hp64000 that is if you told the installation script to use a path other than Modify the P...

Страница 545: ...et the display variable by typing export DISPLAY myhost 0 0 If you installed the HP 64000 software in the root directory enter export HP64000 usr hp64000 export PATH PATH HP64000 bin If you installed the software in the directory users team enter export HP64000 users team usr hp64000 Chapter 14 Installation To set up your software environment 523 ...

Страница 546: ...ile in the HP64000 lib X11 app defaults subdirectory by entering ls HP64000 lib X11 app defaults HP64_Debug at the HP UX prompt Finding this file verifies that you loaded the correct fileset and also verifies that the customize scripts executed because this file is created from other files during the customize process 2 Examine HP64000 lib X11 app defaults HP64_Debug near the end of the file to co...

Страница 547: ...testing create more complete test suites and measure your level of testing breakpoint A location in the program at which execution should stop cascade menu A secondary menu that appears when you select an item from a pull down menu click To press and immediately release a mouse button The term comes from the fact that pressing and releasing the buttons of most mice makes a clicking sound command f...

Страница 548: ...alyzer window emul700dmn The UNIX background process which coordinates the actions and message traffic of the major emulation interfaces emulation memory Memory provided by the emulator to be used in place of target system memory emulation monitor A program that is executed by the emulation processor that allows the emulation controller to access target system resources For example when you displa...

Страница 549: ...r graphical interface The debugger interface program that uses graphics oriented software such as windows menus and icons to make interaction easy host shell A UNIX command interpreter iconify The act of turning a window into an icon journal file A file that contains commands entered during a debug session and any output generated by the debugger Journal files contain everything that is written to...

Страница 550: ... control that simulates a real life pushbutton Use the pointer and mouse to push the button and immediately start an action raw keyboard I O mode The I O mode in which each keystroke produces a character that is sent to the target program that is reading from the keyboard recall buffer A text entry field which remembers its previous value resource See X resource scheme file A file that contains X ...

Страница 551: ... trace analysis SPA The HP Software Performance Analyzer standard interface The traditional debugger interface designed for use with several types of terminals terminal emulators and bitmapped displays When using the standard interface commands are entered from the keyboard startup file A file that contains information regarding debugger options and screen configurations state file A file that con...

Страница 552: ... window inside the debugger s display area See also X window working directory The current directory from which the debugger loads and saves files X resource A piece of data that controls an element of appearance or behavior in an X application X server A program that controls all access to input devices typically a mouse and a keyboard and all output devices typically a display screen It is an in...

Страница 553: ...file 525 absolute files 79 80 access status pseudoregister as 72 144 action keys 7 525 custom 242 operation 50 with command files 242 with entry buffer 49 50 activating windows 14 active window changing 131 description of 131 displaying the alternate view of 132 viewing information in 133 134 add symbol 120 address operator 29 addresses 427 428 assembly level code 427 code 427 data 427 displaying ...

Страница 554: ...on 147 description of 146 display bad stack frames 217 frame status characters 147 function name 147 function nesting level 146 halting at stack level 99 module name 147 batch mode option 211 BBA See Branch Validator bindings mouse 9 11 blocks comparing 182 copying 181 filling 182 Branch Validator 117 525 break on access to a variable 30 break_info macro 448 449 breakpoint window address field 97 ...

Страница 555: ...270 Breakpt Erase command 271 Breakpt Instr command 272 273 Breakpt Read command 274 Breakpt Write command 275 button names 9 11 byte macro 450 bytes changing 180 C C compiler installation 513 C operators 417 C source code displaying 137 C breakpoints 92 93 272 browse command 157 394 classes 394 430 displaying class members 154 displaying member values 154 functions 92 93 137 inheritance 394 objec...

Страница 556: ...ources 237 classes C displaying members of 154 clear breakpoints 94 95 click 525 client X 234 248 clock cycles pseudoregister cycles 100 close macro 451 code addresses 427 code patching deleting C source lines from your program 178 inserting lines of C code into your program 178 patching a line 177 color scheme 236 240 255 column numbers 426 ComFile debugger status 67 Command debugger status 67 co...

Страница 557: ... description 415 444 evaluating symbols 441 explicit stack references 443 expression elements 417 423 expression strings 431 floating point constants 421 forming expressions 430 global extern storage classes 432 hexadecimal constants 420 identical module names 438 identifiers 424 implicit stack references 442 integer constants 419 keywords 429 legal characters allowed in symbols 424 line numbers 4...

Страница 558: ...35 type conversion 435 command line 7 525 command line recall operation 64 Command Recall dialog box operation 60 copy and paste to from entry buffer 49 displaying 31 editing entry area with keyboard 64 editing entry area with pop up menu 60 editing entry area with pushbuttons 59 entering commands 58 entry area 527 executing commands 58 help 61 mapping 61 recalling commands with command line recal...

Страница 559: ...le programs for the debugger 72 77 compiler h option effects of 73 concurrent usage model 526 configuration file 526 configuration debugger 213 244 constants 419 character 422 character string 422 floating point 421 hexadecimal 420 integer 419 control blocking of reads 168 control character functions list of 40 using 40 control program execution with breakpoints 90 99 cooked mode 526 copy block of...

Страница 560: ...nd 276 Debugger Execution Display_Status command 277 Debugger Execution IO_System command 278 280 Debugger Execution Load_State command 281 Debugger Execution Reset_Processor command 282 Debugger Execution Save_State command 283 Debugger Help command 286 Debugger Host_Shell command 284 285 Debugger Level command 287 Debugger Macro Add command 288 290 Debugger Macro Call command 291 Debugger Macro ...

Страница 561: ...s See breakpoints deleting demand loading symbols 83 demonstration program description 11 dialog boxes Command Recall operation 51 60 debugger options 215 definition 526 Directory Selection operation 51 54 Entry Buffer Recall operation 48 51 File Selection operation 51 53 how to use 51 macro operations 191 directories displaying current directory 143 Directory Selection dialog box operation 51 54 ...

Страница 562: ...26 emulation monitor 526 emulator 526 enable simulated I O 166 End Shift_Home Key Functions 134 end debugging session 34 engine execution 527 entering debugger commands 37 39 70 from the keyboard 62 entries X resource 243 entry area command line 527 entry buffer 7 527 address copy and paste to 47 clearing 46 copy and paste from 49 copy and paste to 46 editing 49 Entry Buffer Value Selection dialog...

Страница 563: ...bugger status 67 executing UNIX commands from within the debugger 115 execution controlling 84 89 run from current program counter address 86 run from start address 86 run until stop address 87 execution engine 527 exiting the debugger 34 explicit stack references 443 Expression C_Expression command 307 Expression Display_Value command 308 310 Expression Fprintf command 311 315 Expression Monitor ...

Страница 564: ... file commands summary of 263 editing 174 175 editing at address 175 editing at program counter 175 environment dependent 73 journal 208 log 204 logging commands to start 204 logging commands to stop 206 macro 195 playback command file 206 saving window contents 135 source file location 78 startup 232 233 329 330 state 104 fill block of memory 182 floating point constants 421 fopen macro 455 foreg...

Страница 565: ...dware HP 9000 memory needs 514 HP 9000 minimum performance 514 HP 9000 system requirements 514 SPARCsystem memory needs 517 SPARCsystem minimum performance 517 SPARCsystem minimums overview 517 help command line 61 help index 55 to use 33 window 65 hexadecimal changing default radix 218 constants 420 effects of radix 218 296 506 high level screen description of 124 displaying 126 moving status win...

Страница 566: ...o 457 input ports 108 110 input scheme 236 255 insert lines of C code into your program 178 installation at a glance 512 513 SPARCsystem specific instructions 517 519 instance name X applications 251 X resource 249 integer constants 419 interpret keyboard reads as EOF 169 interrupts defining a simulated interrupt 100 removing a simulated interrupt 101 simulating 100 101 inverse video 224 isalive m...

Страница 567: ...68 label scheme 236 240 254 LANG environment variable 254 level stack 99 libraries Motif for HP 9000 700 514 line numbers 299 426 lines in main display area 238 literals radix 218 load additional programs 82 load programs 79 80 using the db68k command 79 using the program load command 79 load symbols 81 loading and executing programs 71 73 118 log files 204 definition 527 for log file window 158 n...

Страница 568: ... 191 194 defining interactively 191 193 defining outside the debugger 194 definition 527 deleting 202 dialog box 191 displaying source code of 201 do statement 190 editing 194 else statement 190 example of when 268 273 275 finding commands 61 if statement 190 limits 188 loading 195 local symbols 425 maximum number of lines in a macro 289 names 425 patching C source with 177 178 predefined 445 447 ...

Страница 569: ...mory map read only 105 Memory Assign command 334 335 Memory Block_Operation Copy command 336 Memory Block_Operation Fill command 337 338 Memory Block_Operation Match command 339 340 Memory Block_Operation Search command 341 342 Memory Block_Operation Test command 343 344 Memory Display command 345 346 Memory Hex command 347 Memory Inport Assign command 348 350 Memory Inport Delete command 351 Memo...

Страница 570: ...g to commands 61 pull down operation with keyboard 44 pull down operation with mouse 42 43 Microtec compiler 77 middle button 9 modify registers 183 module names 439 module names identical 438 module support 72 monitor window description of 155 more display 224 More prompt 134 Motif HP 9000 700 requirements 514 mouse button names 9 choosing menu items 42 43 mouse button names 10 11 move assembly l...

Страница 571: ...imizing modes effects of 74 using 74 options 214 radix 218 296 506 saving 329 330 outport macro 467 overloaded C functions 93 137 P paging screen 224 patch See also code patching definition 528 Paused debugger status 67 PC See program counter PITS cycle 528 platform differences 10 11 HP 9000 memory needs 514 HP 9000 minimum performance 514 SPARCsystem memory needs 517 SPARCsystem minimum performan...

Страница 572: ... byte 450 close 451 dword 452 error 453 fgetc 454 fopen 455 getsym 456 inport 457 isalive 458 key_get 459 key_stat 460 memchr 461 memclr 462 memcpy 463 memset 464 open 465 466 outport 467 read 468 reg_str 469 showversion 470 strcat 471 strchr 472 strcmp 473 strcpy 474 stricmp 475 strlen 476 strncmp 477 until 478 when 479 word 480 write 481 482 predefined windows 129 Index 550 ...

Страница 573: ... memory location 91 Program Find_Source Next command 373 Program Find_Source Occurrence command 374 375 Program Interrupt Add command 376 377 Program Interrupt Remove command 378 Program Load command 379 381 Program Pc_Reset command 382 Program Run command 383 385 Program Step command 386 387 Program Step Over command 388 389 Program Step With_Macro command 390 program stepping 25 program symbols ...

Страница 574: ... variables 183 read macro 468 read only memory 105 Reading debugger status 68 recall buffer 528 initial content 243 recalling commands with command line recall 64 commands with dialog box 60 entry buffer entries 48 redirect I O 169 referencing symbols 437 reformat screens 226 reg_str macro 469 register window description of 143 registers changing 183 list of 145 monitoring 156 viewing 143 remove b...

Страница 575: ...s 190 revisions debugger interface 69 root names 437 root symbol 438 RTM instruction 72 run from current program counter address 86 from start address 86 programs 84 89 until stop address 87 S save window and screen settings 232 scheme files 235 528 scheme files for X resources 252 254 color scheme 236 240 255 custom 240 255 input scheme 236 255 label scheme 236 240 254 platform scheme 236 256 siz...

Страница 576: ...sion control commands summary of 262 setting keyboard I O mode to raw or cooked 167 settings 214 See also options saving 329 330 shell 527 forking 114 showversion macro 470 simulate program interrupts 100 101 simulated I O 529 check resource usage 171 communication with the debugger 164 connections to host system 164 control address buffers 164 description of 163 disabling 167 display 165 enabling...

Страница 577: ...lling software installation for SPARCsystems 517 519 software probe 529 source code displaying 137 in assembly display 221 location of files 78 patching 176 179 SPA 529 SPARCsystems installing software 517 519 minimum system requirements overview 517 SunOS minimum version 517 special casting 436 special symbols simulated I O 166 specify source file location 78 speed setting step 220 stack displayi...

Страница 578: ...finition 529 loading 233 name of 143 s option 233 state saving 104 state files 104 529 status entry on status line 67 moving status window 227 status line 7 67 69 529 viewing 142 stderr reserved symbol 166 stdin reserved symbol 166 stdio See standard I O See also stdin stdout stdout reserved symbol 166 step over functions 26 85 step speed setting 220 step through a program 84 stepping 25 sticky sl...

Страница 579: ...ng members 153 subroutines See functions subwidows activating 14 SunOS minimum version 517 switching between high level and assembly level screens 126 Symbol Add command 391 393 Symbol Browse command 394 Symbol Display command 395 399 Symbol Remove command 400 401 symbolic information only option 81 symbolic referencing 432 444 with explicit roots 439 without explicit roots 441 symbols assembly co...

Страница 580: ...UX minimum version 514 OSF Motif HP 9000 700 requirements 514 SPARCsystem overview 517 SunOS minimum version 517 T template macro 192 token 525 trace See trace measurement trace events definition 530 trace measurement 530 triggers 530 trigger See trace measurement triggers type casting 435 type conversion 435 U unknown module in backtrace window 147 until macro 478 user program symbols simulated I...

Страница 581: ...4 view window description of 143 viewing text 16 W W indicator character 68 wait state pseudoregister wait_state 89 what s new in this version 69 when macro 479 example 268 273 275 while statement 190 widget resource See X resource Window Active command 402 403 Window Cursor command 404 Window Delete command 405 Window Erase command 406 Window New command 407 409 Window Resize command 410 Window S...

Страница 582: ... predefined 129 register 143 resizing 226 scrolling 16 setting behavior of 223 settings saving 232 stack 130 view 143 working with 129 136 X 530 See also X windows windows journal 325 word macro 480 words changing 180 Working debugger status 68 working directory 530 workstation HP 9000 memory needs 514 HP 9000 minimum performance 514 SPARCsystem memory needs 517 SPARCsystem minimum performance 517...

Страница 583: ...255 Debug Color 255 Debug Input 255 Debug Label 254 Debug Large 255 Debug Small 255 defined 248 definition 530 general form 249 instance name for applications defined 251 instance name for widgets defined 249 loading order 253 modifying resources generally 236 258 RESOURCE_MANAGER property 253 scheme file system directory 255 scheme files debugger s graphical interface 254 scheme files named 254 s...

Страница 584: ...Index 562 ...

Страница 585: ...members Warranty This Hewlett Packard system product is warranted against defects in materials and workmanship for a period of 90 days from date of installation During the warranty period HP will at its option either repair or replace products which prove to be defective Warranty service of this product will be performed at Buyer s facility at no charge within HP service travel areas Outside HP se...

Страница 586: ...ts resulting from improper or inadequate maintenance by Buyer Buyer supplied software or interfacing unauthorized modification or misuse operation outside of the environment specifications for the product or improper site preparation or maintenance No other warranty is expressed or implied HP specifically disclaims the implied warranties of merchantability and fitness for a particular purpose Excl...

Отзывы: