HP B1476 68020 Скачать руководство пользователя страница 54

To display the address of a variable  

You can use the C address operator (&) to display the address of a program
variable.

Position the mouse pointer in the entry buffer.

Type "&" in the entry buffer so that it contains "&num_checks".

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  

30

Содержание B1476 68020

Страница 1: ...User s Guide HP B1476 68020 030 Debugger Emulator ...

Страница 2: ...ced 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 Microtec is a registered trademark of Microtec Research Inc SunOS SPARCsystem OpenWindows and SunView are trademarks of Sun Microsystems Inc UNIX is a registered trademark of UNIX System Laboratories Inc in the U S A and o...

Страница 3: ...ct at the time the manual was issued Many product updates and fixes do not require manual changes and manual corrections may be done without accompanying product changes Therefore do not expect a one to one correspondence between product updates and manual revisions Edition 1 B1476 97006 July 1992 Certification and Warranty Certification and warranty information can be found at the end of this man...

Страница 4: ...executes View assembly language code with source lines View registers and stack contents Step through programs by C or C source lines or 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 Collect microprocessor bus level dat...

Страница 5: ...formation in separate windows on the debugger s main display Access on line help information Quickly enter commands using the guided syntax of the standard interface With the Standard Interface You Can Use the debugger with a terminal or terminal emulator Quickly enter commands using guided syntax command recall and command editing View source code monitored data registers stack contents and backt...

Страница 6: ...tarted Part 2 User s Guide How to use the debugger to solve your problems Part 3 Concept Guide Background information 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 15 To run until main 16 To scroll the Code window 17 To display a function 18 To run until a line 19 To edit the program 20 To display init_system again 21 To set a breakpoint 21 To run until the breakpoint 22 To patch code using a macro 23 To delete a single breakpoint 25 To delete all breakpoints 25 To step through a program 26 To run until a stac...

Страница 8: ...40 The Demonstration Program 40 To copy the demonstration files 41 To start the debugger 42 To enter commands 43 To activate display area windows 43 To display main 44 To display a subroutine 44 To set a breakpoint 45 To run the demo program 45 To step through the program 46 To step over functions 46 To delete a breakpoint 46 To display variables in their declared type 47 To display the address of...

Страница 9: ...om the entry buffer to the command line entry area 66 To use the action keys 67 To use dialog boxes 68 To access help information 72 Using the Command Line with the Mouse 73 To turn the command line on or off 74 To enter a command 75 To edit the command line using the command line pushbuttons 76 To edit the command line using the command line pop up menu 77 To recall commands 77 To get help about ...

Страница 10: ...rough programs 100 To step over functions 101 To run from the current PC address 102 To run from a start address 102 To run until a stop break address 103 Using Breakpoints 105 To set a memory access breakpoint 105 To set an instruction breakpoint 107 To set a breakpoint for a C object instance 109 To set a breakpoint for overloaded C functions 110 To set a breakpoint for C functions in a class 11...

Страница 11: ... the debugger 124 Using simulator and emulator debugger products together 125 Using the Debugger with the Branch Validator 126 To unload Branch Validator data from program memory 126 5 Viewing Code and Data Using Symbols 130 To add a symbol to the symbol table 130 To display symbols 131 To display symbols in all modules 132 To delete a symbol from the symbol table 132 Displaying Screens 134 To dis...

Страница 12: ...ay register contents 152 To display the function calling chain stack backtrace 153 To display all local variables of a function at the specified stack backtrace level 157 To display the address of the C object invoking a member function 158 Using Expressions 159 To calculate the value of a C expression 159 To display the value of an expression or variable 160 To display members of a structure 161 ...

Страница 13: ...s The Trace Function 184 To start a trace using the Code pop up menu 190 To start a trace using the command line 190 To stop a trace in progress 191 To display a trace 192 To specify trace events 193 To delete trace events 194 To specify storage qualifiers 194 To specify trigger conditions 196 To halt program execution on the occurrence of a trigger 197 To remove a storage qualification term 198 T...

Страница 14: ...To fill a block of memory with values 216 To compare two blocks of memory 216 To re initialize all program variables 217 To change the contents of a register 217 8 Using Macros and Command Files Using Macros 221 To display the Macro Operations dialog box 225 To define a new macro interactively using the graphical interface 225 To use an existing macro as a template for a new macro 226 To define a ...

Страница 15: ...General Debugger Options 249 To display the Debugger Options dialog box 249 To list the debugger options settings 249 To specify whether command file commands are echoed to the Journal window 250 To set automatic alignment for breakpoints and disassembly 250 To set backtrace display of bad stack frames 251 To specify demand loading of symbols 252 To select the interpretation of numeric literals de...

Страница 16: ...d a startup file 268 Setting X Resources 270 To modify the debugger s graphical interface resources 272 To use customized scheme files 276 To set up custom action keys 278 To set initial recall buffer values 279 To set up demos or tutorials 280 10 Configuring the Emulator To start the Emulator Configuration dialog box 285 To modify a configuration section 286 To store a configuration 287 To examin...

Страница 17: ...y map terms 308 To modify the emulator pod configuration 316 To disable target system interrupts 317 To preset the interrupt stack pointer and Program Counter 317 To set the target memory access size 319 To modify the debug trace options 320 To break the processor on a write to ROM 320 To define the software breakpoint vector 321 To trace background or foreground operation 322 To configure the ana...

Страница 18: ...set 338 Scheme files augment other X resource files 338 You can create your own scheme files if you choose 340 Scheme files continue the load sequence for X resources 340 You can force the debugger s graphical interface to use certain schemes 340 Resource setting general procedure 342 Part 4 Reference 12 Debugger Commands How Pulldown Menus Map to the Command Line 348 How Popup Menus Map to the Co...

Страница 19: ...ell 376 Debugger Help 378 Debugger Level 379 Debugger Macro Add 380 Debugger Macro Call 383 Debugger Macro Display 384 Debugger Option Command_Echo 385 Debugger Option General 386 Debugger Option List 389 Debugger Option Symbolics 390 Debugger Option Trace 392 Debugger Option View 393 Debugger Pause 396 Debugger Quit 397 Expression C_Expression 399 Expression Display_Value 400 Expression Fprintf 4...

Страница 20: ...nd_Source Next 448 Program Find_Source Occurrence 449 Program Load 451 Program Pc_Reset 454 Program Run 455 Program Step 458 Program Step Over 460 Program Step With_Macro 462 Symbol Add 463 Symbol Browse 466 Symbol Display 467 Symbol Remove 472 Trace Again 474 Trace deMMUer 475 Trace Display 477 Trace Event Clear_All 483 Trace Event Delete 484 Trace Event List 485 Trace Event Specify 486 Trace Eve...

Страница 21: ...Commands Expression Elements 523 Operators 523 Constants 525 Symbols 530 Program Symbols 530 Debugger Symbols 531 Macro Symbols 531 Reserved Symbols 532 Line Numbers 532 Addresses 533 Code Addresses 533 Data and Assembly Level Code Addresses 533 Address Ranges 533 Keywords 535 Forming Expressions 536 Expression Strings 537 Symbolic Referencing 538 Storage Classes 538 Data Types 539 Special Casting...

Страница 22: ...560 close 561 cmd_forward 562 dword 564 error 565 fgetc 566 fopen 567 key_get 568 key_stat 569 memchr 570 memclr 571 memcpy 572 memset 573 open 574 pod_command 576 read 578 reg_str 579 showversion 580 strcat 581 strchr 582 strcmp 583 strcpy 584 stricmp 585 strlen 586 strncmp 587 until 588 when 589 word 590 write 591 Contents xxii ...

Страница 23: ... Simulated I O Changes 613 Support for 68030 with MMU 613 Part 5 Installation Guide 18 Installation Installation at a Glance 618 Supplied interfaces 618 Supplied filesets 619 Emulator Analyzer Compatibility 619 To install software on an HP 9000 system 620 Required Hardware and Software 620 Step 1 Install the software 621 To install the software on a Sun SPARCsystem 624 Required Hardware and Softwa...

Страница 24: ...34 To verify the software installation 635 To remove software 636 Configuring Terminals for Use with the Debugger 637 To configure HP terminals or bit mapped displays 641 To configure the DEC VT100 terminal 643 To configure the VT220 terminal 645 To set the TERM environment variable 648 To set up control sequences 649 To resize a debugger window in an X Window larger than 24 lines by 80 columns 65...

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

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

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

Страница 28: ...dard interface for several types of terminals terminal emulators and bitmapped displays When using the standard interface commands are entered from the keyboard If you are using the debugger s standard interface please skip to the chapter Getting Started with the Standard Interface Some advanced commands are not well suited to menus Those commands are entered through the command line The command l...

Страница 29: ...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...

Страница 30: ...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 ...

Страница 31: ...fer 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 information in the active window Status Line Displays t...

Страница 32: ... 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 ...

Страница 33: ...ou have 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 Chapter 1 Getting Started with the Graphical Interface ...

Страница 34: ...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 ...

Страница 35: ...with a different clock rate or the HP 64748 68020 emulator the information displayed in some windows on your screen will be different 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 te...

Страница 36: ... detailed information on installing your emulator 3 Find out where the debugger software is installed If it is not installed under usr hp64000 then use HP64000 wherever usr hp64000 is printed in this chapter 4 Check that usr hp64000 bin and are in your PATH environment variable Type echo PATH to see the value of PATH 5 If the debugger software is installed on a different kind of computer than the ...

Страница 37: ...you do not know the name of your emulator see To find the logical name of your emulator in the Installation chapter of this manual The Startdebug script will ask you whether it should copy the demo files to another directory Or if you have installed the emulator analyzer and Software Performance Analyzer interfaces you can use the following command to start all of the interfaces Startall emul68k N...

Страница 38: ...ebugger which executes the command file mycmd com and loads the absolute file ecs x See the Loading and Executing Programs chapter for more details Chapter 1 Getting Started with the Graphical Interface To start the debugger 14 ...

Страница 39: ......

Страница 40: ...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 16 ...

Страница 41: ...oll 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 pull down menu item to move larger distances Chapter 1 Getting Started with the Graphical Interface...

Страница 42: ...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 18 ...

Страница 43: ...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 19 ...

Страница 44: ...tead of 73 The debugger makes it easy to change the source code 1 Place the cursor over the 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 the Xdefaults demo file Chapter 1 Getting Started with the Graphical In...

Страница 45: ...load programming cycle To set a breakpoint We want to run until just past the 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 li...

Страница 46: ...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...

Страница 47: ...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...

Страница 48: ...r PC 39 Return value indicates continuation logic 1 continue 0 break return 0 4 Exit the editor 5 Click on the Attach button in the dialog box The plus sign in front of line 38 indicates that a macro has been attached to a breakpoint at that line 6 Click on the Run Xfer action key to run the program Chapter 1 Getting Started with the Graphical Interface To patch code using a macro 24 ...

Страница 49: ...reviously set at line 42 in init_system 1 Position the mouse over line 42 2 Click the right mouse button to delete the breakpoint The breakpoint window shows the breakpoint has been deleted The asterisk in front of line 42 disappears To delete all breakpoints 1 Position the mouse pointer in the Breakpoint window 2 Hold down the right mouse button to select Delete All Breakpoints from the Breakpoin...

Страница 50: ...see the 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 i...

Страница 51: ...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...

Страница 52: ...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 28 ...

Страница 53: ...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 29 ...

Страница 54: ...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 30 ...

Страница 55: ...by clicking on the Run action key When the program stops the code window shows that the program stopped at the next reference to the variable num_checks Due to the latency of the emulation analyzer the processor may halt up to two instruction cycles after the breakpoint has been detected Try running the program a few more times to see where it stops Notice that num_checks is passed by reference to...

Страница 56: ...mmand token 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 Using the command line enter Expression Printf 010d num_checks In this e...

Страница 57: ...on 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 33 ...

Страница 58: ...ns that the program is executing 4 Wait for the status line to show TRC Cmplt then press Ctrl C in the debugger window 5 Select Window Trace to see the bus states which occurred after the call to update_system The trace listing will be displayed in the Trace Mode debugger window If an emulator analyzer X window is active it will display the trace listing You can scroll through the trace to see mor...

Страница 59: ...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 35 ...

Страница 60: ...he emulator so that other users on your system can use it This completes your introduction to the 68020 030 debugger 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 Getti...

Страница 61: ...2 Getting Started with the Standard Interface How to get started using the debugger s character based interface 37 ...

Страница 62: ...r 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 Display area Status line Command line Command tokens Command look ahead 38 ...

Страница 63: ... the debugger prompt and executed by pressing the Return key Command tokens are placed on the command line by typing a single letter typically the first uppercase letter of the token The Tab and Shift Tab keys allow you to move the cursor on the command line forward or backward The Clear line key clears from the cursor position to the end of the line The Ctrl U key clears the whole command line Co...

Страница 64: ...the Installation chapter The emulator name emul68k is used in the examples in this chapter If you have given your emulator a different logical name in the HP 64700 emulator device table usr hp64000 etc 64700tab net use your emulator name or lan address in the examples See the HP 64700A Card Cage Installation Service Manual for detailed information on installing your emulator Note Some commands are...

Страница 65: ...irectory is the one in which you wish to create the subdirectory for the debugger demo files Then enter the command mkdir mydirectory where mydirectory is the name of your debugger demo subdirectory 2 Change to the debugger demo subdirectory cd mydirectory 3 Copy the demo files cp r usr hp64000 demo debug_env emulator All files that you need to run the demonstration program should now be in the wo...

Страница 66: ... option tells the debugger how to set up memory mapping for the program The c cmdfiles debug Cmd_dbstart option tells the debugger to execute the Cmd_dbstart com command file The ecs020 argument tells the debugger to load the ecs020 x absolute file Note Start the 68030 EC030 debugger emulator using the command db68030 t e emul68k C Config c cmdfiles debug Cmd_dbstart ecs030 This command starts exe...

Страница 67: ...d is still visible on the command line press Ctrl E to clear to the end of the command line before pressing Return To activate display area windows Notice there are several windows in the main display area of the debugger The different windows contain different types of information from the debugger The active window has the thicker border It is in the active window that the scroll bar and the PAG...

Страница 68: ...s command all you need to type is P then D then main then Return The main function is displayed Use the UP ARROW key to see the main statement To display a subroutine Notice that main calls update_system Enter the following command Program Display_Source update_system The update_system function is displayed Use the UP ARROW key to see the update_system statement Chapter 2 Getting Started with the ...

Страница 69: ... next to the location of the breakpoint The dot in the first column of the previous lines show the source lines associated with that breakpoint To run the demo program Using the command line enter Program Run The journal window shows that a break occurred and which breakpoint it was Notice that the source file line at which the breakpoint was set is now in inverse video The inverse video line show...

Страница 70: ...ions You can either step through functions or step over functions When you step over a function it is executed as a single program step Using the command line enter Program Step Over To delete a 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...

Страница 71: ...er Expression Display_Value current_temp In the Journal window the current value of the variable is displayed in its declared type int To display the address of a variable You can use the C address operator to display the address of a program variable Using the command line enter Expression Display_Value current_temp The result is the address of the variable current_temp The address is displayed i...

Страница 72: ...ndow To break on an access to a variable You can also set breakpoints on a read a write or any access of a variable This helps to locate defects due to multiple functions accessing the same variable Suppose you want to break on the access of the variable current_temp 1 Set the access breakpoint Breakpt Access current_temp 2 Run the program Program Run When the program stops after approximately ten...

Страница 73: ...tures and arrays in memory as well as ranges of memory locations that encompass several variables Using the command line enter Memory Display Byte current_temp The debugger displays a block of memory starting at the address of the variable current_temp The C address operator is used because the Memory Display command is an assembly level command and expects a memory address as its argument Chapter...

Страница 74: ... The Expression C_Expression command calculates the value of a C expression or modifies a C variable if the C expression contains the assignment operator This command recognizes variable types and the assignment expression specified behave according to the rules of C Using the command line enter Expression C_Expression current_temp 99 Notice that the value of current_temp in the Monitor window has...

Страница 75: ... introduction to the 68020 030 debugger 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 and so on refer to the Reference part of this manual Chapter 2 Getting Started with the Standard Interface To end the debugging session 51 ...

Страница 76: ...Chapter 2 Getting Started with the Standard Interface To end the debugging session 52 ...

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

Страница 78: ...Part 2 54 ...

Страница 79: ...3 Entering Debugger Commands How to enter debugger commands using the mouse or the keyboard 55 ...

Страница 80: ...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 from the keyboard When us...

Страница 81: ...e 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 screen...

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

Страница 83: ...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...

Страница 84: ...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...

Страница 85: ... 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...

Страница 86: ... 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...

Страница 87: ... 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...

Страница 88: ... the display to the entry buffer you must add a trailing h to make the interface interpret it as a hex value when you use the entry buffer contents with a command Text pasted into the entry buffer replaces that which 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 pas...

Страница 89: ...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 ...

Страница 90: ...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 ...

Страница 91: ... 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...

Страница 92: ...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...

Страница 93: ... 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 3 Entering Debugger Commands Using Menus the Entry Buffer and Action Keys 69 ...

Страница 94: ... dialog box Label 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...

Страница 95: ...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...

Страница 96: ...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 3 Entering Debugger Commands...

Страница 97: ...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 3 Entering Debugger Commands Using the Command Line...

Страница 98: ...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...

Страница 99: ... 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...

Страница 100: ...ft 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 Forward pushbutton becomes half toned and unresponsive when the cursor reaches the end of the command string Similarly the Backup pushbutton becomes half to...

Страница 101: ... 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...

Страница 102: ...e entries for the Command Recall dialog box and define the maximum number of entries by setting X resources refer to the Setting X Resources chapter See To use dialog boxes 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 hel...

Страница 103: ...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...

Страница 104: ...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...

Страница 105: ...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...

Страница 106: ...lp window is context sensitive When you display the help window the cursor is located on the last command 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 th...

Страница 107: ...mand you need help with and press Return to display information on that command Press the F5 function 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 3 Entering Debugger Commands Using the Command Line with the Keyboard 83 ...

Страница 108: ...in the following format STATUS Status J L W CPU MODULE module BREAK TRC Trc_status R Debugger Status The Status entry Status on the status line shows what type of operation the debugger is doing The possible types of debugger operations are Command The debugger is accepting a debugger command Define The debugger is accepting a macro definition Execute The debugger is executing target environment i...

Страница 109: ...l indicator J indicates that everything appearing in the Journal window is being written to a journal file 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 Emulated The CPU entry indicates whic...

Страница 110: ... will be used as the trigger in the next trace measurement Cmplt A trace measurement has completed DataOK The trace buffer contains valid data Halted The Trace Halt command was used to halt the trace Idle No trace measurement has been executed during the current debug session Setup A trace measurement has been set up specified and will start on the next program run or program step command This sta...

Страница 111: ... that your mouse buttons are not being redefined by your window manager If you are using mwm to redefine your mouse buttons delete the redefinition from your mwmrc file If you are using an older window manager such as mwm look in usr hp64000 lib X11 HP64_schemes HP UX Debug Input Copy the line HP64_Debug whichButton Button5 to your Xdefaults file Change the 5 to a 3 Chapter 3 Entering Debugger Com...

Страница 112: ...Chapter 3 Entering Debugger Commands Viewing Debugger Status 88 ...

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

Страница 114: ...he compiler to generate HP 64000 file formats Use the default settings which generate executable files in the HP MRI IEEE 695 file format required by the debugger The debugger extracts all symbolic information from the executable x file Using Environment Dependent Files The HP 64903 B1461 and HP 64907 B1478 C Cross Compilers provide environment dependent files that support the HP 64747A 748A emula...

Страница 115: ... 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 in Memory The default compiler settings automatically create register variables for statics and frequently used variables Some debugger functions such as breakpoints will not work with register variables The compiler option Wc F tu...

Страница 116: ...he debugger Microtec s language tools are quite similar to the HP language tools The input syntax and code generated by the HP and Microtec assemblers linkers and librarians are identical with few exceptions The language tools available from Microtec are the mcc68k C compiler the ccc68k C compiler the asm68k assembler the lnk68k linker and the lib68k librarian Using the Microtec Commands For instr...

Страница 117: ... 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 local symbols in absolute file by default but lnk68k does not The command line flag fi and option H also set the d flag which will cause lnk68k to generate lo...

Страница 118: ..._DEBUG_PATH is defined the debugger only searches for the files in the path s specified in HP64_DEBUG_PATH in the order in which they are listed The character can be included in the path to cause the debugger to search the location of the source files recorded in the absolute file If HP64_DEBUG_PATH is not defined the debugger searches for source files in the following sequence 1 their location at...

Страница 119: ...ams When starting the debugger enter the executable file name as the last term in the db68k command line db68k e emul68k abs_file Or Select File Load Executable then use the File Selection dialog box to select the executable file Or Using the command line enter Program Load Default file_name When you load an absolute file the debugger 1 Removes all previous program symbols 2 Removes all previously...

Страница 120: ...gram Only then use the File Selection dialog box to select the absolute file Or Using the command line enter Program Load New Code_only No_Pc_Set absolute_name Enter the name of the absolute file whose code is to be loaded and press the Return key The code will be loaded without loading symbols or resetting the PC If you are re loading a program you may need to restore some debugger settings for e...

Страница 121: ...ute_file Enter the name of the absolute file whose symbols are to be loaded and press the Return key Only symbolic information is loaded from the absolute file To append programs Using the command line enter Program Load Append Select either All Code_Only or Symbols_Only Then select either Pc_Set or No_Pc_Set Finally enter the name of the absolute file to be appended and press the Return key All b...

Страница 122: ...ing the initial load of the x file Symbol information for global 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...

Страница 123: ...ether they were defined referenced in a C or assembly source module Examples To specify demand loading of symbols when starting the debugger db68k e emul68k d RETURN Chapter 4 Loading and Executing Programs Loading Programs and Symbols 99 ...

Страница 124: ... 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...

Страница 125: ... the program counter is the location of the next line to be executed If a breakpoint is encountered single stepping is halted You can also use function keyF7 to single step 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 in...

Страница 126: ...until The program encounters a permanent 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 Chapter 4 Loading and Executing Programs Ste...

Страница 127: ...inates normally Running from a start address in high level mode may cause unpredictable results if the compiler startup routine is bypassed To run until a 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 a...

Страница 128: ... emulator implements instruction breaks using software breakpoints Therefore break addresses cannot be specified for addresses in target ROM Examples To run the program until either line 20 or line 90 is encountered whichever occurs first Program Run Until 20 90 To run from the current program counter address until the break address update_state_of_system is encountered twice Program Run Until upd...

Страница 129: ...akpoint information 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 rea...

Страница 130: ...t limit exceeded will be displayed on your screen If this happens you must delete an existing analysis breakpoint before you can enter a new one Due to the latency of the emulation analyzer the processor will halt from 0 to 2 instruction cycles after the breakpoint is detected Due to the processor s prefetch feature it is possible for hardware breaks to occur on addresses of instructions that are ...

Страница 131: ...ver 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 Breakpoint from the menu Or Enter the instruction address into the entry buffer then select Breakpoints Set Instruction Or Using the command line enter Breakpt Instr addr Enter the address of the instruction...

Страница 132: ...l to be transferred to the emulation monitor stopping the program Because a BKPT instruction must replace the instruction at a memory location software breakpoints can only be set in Emulation RAM Emulation ROM Target system RAM Software breakpoints cannot be set in target ROM Software breakpoints cannot be used to detect data accesses Note The default setting of the debugger option Align_Bp align...

Страница 133: ...cuted If you answer yes to the configuration question Break processor on write to ROM you are not permitted to set breakpoints in areas mapped as target ROM Examples To set an instruction breakpoint at line 82 of the current module Breakpt Instr 82 To set a breakpoint for a C object instance Use the dot or arrow operator to specify the object and the member function This allows you to set a breakp...

Страница 134: ...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 breakpoint for the C class Examples To set breakpoints for all mem...

Страница 135: ... Delete Breakpoint Or Enter the breakpoint number into the entry buffer the 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 breakpoint The brkpt_nmbr is the number of the breakpoint displayed in the debugger...

Страница 136: ... Breakpoints from the Breakpoints window pop up menu Or Using the command line enter Breakpt Clear_All And press the Return key To display breakpoint information Select Window Breakpoints Or Using the command line enter Window Active Breakpoint And press the Return key Chapter 4 Loading and Executing Programs Using Breakpoints 112 ...

Страница 137: ...kpoint number The debugger assigns a breakpoint number when you execute a breakpoint command The debugger uses this number as a label to reference or clear each breakpoint Breakpoint address The breakpoint address ADDRESS shows the memory location of the breakpoint The debugger displays the address as a hexadecimal value Module function The module function field MOD FNCT displays either the name o...

Страница 138: ...hat type of breakpoint is set instruction read write or access In assembly level mode the debugger sets instruction breakpoints on microprocessor instruction addresses In high level mode the debugger sets instruction breakpoints on source line numbers The debugger flags instruction breakpoints with A assembly level or H high level When switching between modes these flags are useful for differentia...

Страница 139: ...s 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 t...

Страница 140: ...set to Monitor Or Using the command line enter Debugger Execution Reset_Processor And press the Return key Resetting the processor resets the microprocessor to its initial state and leaves the microprocessor running in the monitor To reset the program counter to the starting address Select Execution Set PC to Transfer Or Chapter 4 Loading and Executing Programs Restarting Programs 116 ...

Страница 141: ...lized 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 The debugger retains symbol information You do not have to reload symbol information if symbol addresses have not changed Fo...

Страница 142: ...as in the simulator when the CPU state was saved The debugger simulator does not save symbolic information 3 Load the save file Using the command line enter Debugger Execution Load_State Enter the name of the file from which the CPU state should be loaded and press the Return key The memory contents and register values saved with the debugger simulator Debugger Execution Save_State command are res...

Страница 143: ...e debugger emulator because the simulated I O initialization may not have occurred Examples To restore memory contents and register values saved in save file session1 sav Debugger Execution Load_State session1 Chapter 4 Loading and Executing Programs Loading a Saved CPU State 119 ...

Страница 144: ...MMU you should use the emulator s graphical user interface along with the debugger s graphical user interface The HP B1479 MC68030 Graphical User Interface provides additional commands to help you design and test programs which use the MMU In addition the 68020 030 Graphical User Interface User s Guide discusses MMU programming and deMMUer operation in detail Restrictions when using the MMU The fo...

Страница 145: ... the deMMUer by entering the following command on the debugger s command line Trace deMMUer Load Verbose 4 Enable the deMMUer by entering the following command on the debugger s command line Trace deMMUer Enable After the deMMUer is loaded any change to the MMU will make the deMMUer out of date If you change the MMU remember to re load the deMMUer The target program will be interrupted while the d...

Страница 146: ...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...

Страница 147: ...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 4 Loading and Executing Program...

Страница 148: ... interface will set the program counter to the transfer address by default Loading an executable in the emulator interface does not set the program counter To start the emulation interface from the debugger Proceed with your debugging session until you get to the point where you need to use an emulator analysis feature If you are using the graphical interface choose File Emul700 Emulator Analyzer ...

Страница 149: ...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 save 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 4 Loading and Executing Pr...

Страница 150: ...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...

Страница 151: ...am was loaded with Demand_Load On the Memory Unload_BBA command will generate a BBA file with incomplete information See the Debugger Option General command description in this manual for more information on the Demand_Load option Chapter 4 Loading and Executing Programs Using the Debugger with the Branch Validator 127 ...

Страница 152: ...Chapter 4 Loading and Executing Programs Using the Debugger with the Branch Validator 128 ...

Страница 153: ...5 Viewing Code and Data How to find and display source code and memory contents 129 ...

Страница 154: ...al to variables defined in a C or assembly 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 named EOF of ...

Страница 155: ...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 updateSys in the current module Symbol Display Default updateSys Symbol Display Default updateSys ecs updateSys Type is High level module Code section 00001436 thru 00001C...

Страница 156: ...ult 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 symbol current_targets in function alter_settings Symbol Remove alte...

Страница 157: ...To delete all symbols in module updateSys Symbol Remove updateSys To delete all symbols in all modules Symbol Remove Chapter 5 Viewing Code and Data To delete a symbol from the symbol table 133 ...

Страница 158: ... 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 containing t...

Страница 159: ...ly 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 breakpoint error hel...

Страница 160: ...reen_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 5 Viewing Code and Data To display the high level screen 136 ...

Страница 161: ...ct Window Simio 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 5 Viewing Code and Data To display the standard I O scr...

Страница 162: ...e 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 5 Viewing Code and Data To display the next screen activate a screen 138 ...

Страница 163: ...splays 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 Chapter 5 View...

Страница 164: ... 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 n are replac...

Страница 165: ...e 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 backtrac...

Страница 166: ...w 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 assembly level code window W...

Страница 167: ...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 5 Viewing Code and Data...

Страница 168: ...ta 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 current stack ...

Страница 169: ... 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_Close 99 ...

Страница 170: ... action key 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 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 give the nam...

Страница 171: ...rce Find Back Or using the 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 Chapter 5 Viewin...

Страница 172: ...rce Next Direction Select either 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 5 Viewing Code and Data To find next occurrence of a string 148 ...

Страница 173: ...xecute these instructions To generate code that will run interchangeably in both the debugger emulator and debugger simulator use the C compiler s floating point library routines These libraries contain routines that do not use FPU instructions thereby allowing them to execute properly in both debugging environments 68851 Memory Management Unit The debugger does not support the 68851 MMU To displa...

Страница 174: ...ction 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 variable name without naming the function the debugge...

Страница 175: ...g 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 5 Viewing Code and Data To display current ...

Страница 176: ...ce data is displayed a trace status character may be displayed in front of the trace line The following table defines the trace status characters Trace List Status Characters Character Description The indicated trace line is the trigger condition The indicated trace line is in the middle of a C statement that is not the first assembly language statement in the C source statement The data in the tr...

Страница 177: ... Registers window is available only within the assembly level screen If the emulator analyzer graphical interface is active Window Registers will display registers in the emulator window Note The information displayed in the register window varies with different microprocessors See the Reserved Symbols chapter for more information about debugger variables To display the function calling chain stac...

Страница 178: ...hen setting a breakpoint For example to cause the program to execute until it returns to the second nested function enter the command Program Run Until 2 Another way to execute until a stack level is reached is to choose Run Until Stack Level in the Backtrace window pop up menu Return Address The return address field displays the return address of the calling function Frame Status Character One of...

Страница 179: ...g of question marks Function Name If the return address of a function is inside a known function the debugger displays the function name If the address is outside of all known functions the function field in the backtrace window will display unknown This is the case with the compiler startup module crt0 because it is assembly code and contains no debug information Backtrace Information Whenever a ...

Страница 180: ... of the calling function This address is the address shown at level 1 the module and function shown are based on this address Nesting levels 2 through n Nesting levels 2 through n are always based on existing stack frames A stack frame is generated for each frame on the stack based on saved frame pointers Nesting levels are generated until backtracing of the stack encounters a zero frame pointer T...

Страница 181: ...receded 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 variables at stack level 1 position the cursor over 1 in the Backtrace window and hold the right mouse button Move the mouse to Disp Vars at Stack Level and release the button Or use the command line to en...

Страница 182: ...oked 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 5 Viewing Code and Data To display the address of the C object invoking a member fun...

Страница 183: ... 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 the C vari...

Страница 184: ... 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 item which is its address Examples T...

Страница 185: ...seconds 20 To display the name of the current program module Expression Display_Value module To display the name of the current program function Expression Display_Value function To display members of a structure 1 Copy 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 Ex...

Страница 186: ...g the command line enter Symbol Display Options Search_all End_Options class_name This will display the type size protection and overloading of each member of class_name Example To display the members of class C enter Symbol Display Options Search_all End_Options C To display the values of all members of a C object Enter the name of the C object in the entry buffer and select Display Var Expressio...

Страница 187: ...fer and select Display Var Expression To monitor variables Enter the variable to be monitored in the entry buffer and click on the Monitor action key Or Enter the variable to be monitored in the entry buffer and select Display Monitor Or Using the command line enter Expression Monitor Value Enter the variable to be monitored and press the Return key The monitor window displays monitored variable e...

Страница 188: ... just as you would a variable Example To monitor the value of register D2 enter D2 in the entry buffer and select Display Monitor Or using the command line enter Expression Monitor Value D2 To discontinue 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 mon...

Страница 189: ...nu Or Using the command line enter Expression Monitor Clear_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 5 Viewing Code and Data To disc...

Страница 190: ...ly 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 the string in double quotes to...

Страница 191: ...ction Examples 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 temperature with a precision of 2 Expression Printf The value of temperature is 2f n temperature Chapter 5 Viewing Code and Data To print formatted output to journal windows 167 ...

Страница 192: ...d 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 eithe...

Страница 193: ...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 when a wor...

Страница 194: ...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_humid Memory Display Byte current_hu...

Страница 195: ...rmation on using the C SIMIO libraries Your programs can also use SIMIO bymeans of user written assembly code If you are developing programs that use SIMIO from assembly code refer to the Simulated I O User s Guide for a complete description of SIMIO protocol This chapter shows you how to Enable simulated I O Disable simulated I O Set the keyboard I O mode Redirect I O Check resource usage Increas...

Страница 196: ...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 Simulated I O Connections The SIMIO system supports three types of I O connections These are Keyboard and display UNIX files UNIX processes Display and Keyboard The debugger provides a window named std...

Страница 197: ...ecute UNIX commands the debugger can communicate with other host system I O devices such as printers plotters modems etc For more information on using UNIX processes refer to the description of the exec_cmd function in the Environment Dependent Routines chapter of the 68020 C Cross Compiler Reference or 68030 C Cross Compiler Reference manual Special Simulated I O Symbols User Program Symbols The ...

Страница 198: ...Execution IO_System Enable When SIMIO is enabled polling for simio command begins In the debugger emulator the host computer periodically reads the memory in the emulator or target system to detect simio commands issued by the user code SIMIO behavior in the debugger is identical to that described in the Simulated I O User s Guide with the exception that only one control address is supported by th...

Страница 199: ... the characters from the final line and the carriage return character are passed as input If program execution is interrupted by entering Ctrl C before the line is entered the characters on the input line are lost See also To set the keyboard I O mode to raw To set the keyboard I O mode to raw Using the command line enter Debugger Execution IO_System Mode Raw In the Raw mode each character you typ...

Страница 200: ...r the line to be composed and entered When set in RAW mode the keyboard can be read in a blocking or non blocking manner based on the value of the control flag O_NDELAY 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 compiler supplied routine startup This routine opens streams stdin stdout and stderr See also The cha...

Страница 201: ...t 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 line enter Program Pc_Reset When the target program starts execution from the normal compiler startup address the standard C startup libraries open the fol...

Страница 202: ...o 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 dev simio keyboard dev simio display users project errorfile Program Pc_Reset 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_Syste...

Страница 203: ... limit is 40 in file stdio h using an editor on your system 3 Change to directory usr hp64000 env hp64748 src for 68020 or usr hp64000 env hp64747 src for 68030 EC030 using the cd command 4 Recompile file startup c using the command cc68020 Ouc startup c Or cc68030 Ouc startup c 5 Archive file startup o using the command ar68k r startup env a or ar68030 r startup env a Chapter 5 Viewing Code and D...

Страница 204: ... Caution Compiler startup files compiled with the modified stdio h header file will run only in the debugger environment Emulators which do not have the debugger interface do not support the increased number of open SIMIO file descriptors Call to the SIMIO function open will fail in this environment if 12 file descriptors have already been allocated Chapter 5 Viewing Code and Data To increase file...

Страница 205: ...ogram stops hangs while reading from the keyboard with the O_NDELAY flag set or if programs do not appear to be getting proper input from the keyboard check the keyboard mode setting Chapter 5 Viewing Code and Data If problems occur when using simulated I O 181 ...

Страница 206: ...Chapter 5 Viewing Code and Data If problems occur when using simulated I O 182 ...

Страница 207: ...6 Making Trace Measurements How to use the debugger to trace the execution of a program in the emulator Chapter 6 Making Trace Measurements 183 ...

Страница 208: ...race measurements using the Code window pop up menu Using this menu you can trace states before and after a line of code is executed If you need to make a simple trace measurement skip the details which follow and turn to To start a trace using the Code pop up menu You can make complex trace measurements using the command line Trace command You can tell the debugger exactly which states to store b...

Страница 209: ... can also specify the logical NOT of an address or data value Status Values Status values are the types of bus activities such as Read or write operations Memory access size Function codes Cycle types You can also specify the logical NOT of a status value Trace Trigger A trigger specifies the bus events that cause the debugger to make a trace measurement The debugger lets you trigger on the detect...

Страница 210: ...he following limitations on resources available for trace specifications One range resource Eight event resources Seven sequence terms If you enter a range value that can be expressed as a don t care value for example address 0x100 to 0x1ff the debugger uses one of the eight event resources rather than the range resource Complex event specifications such as combinations of Is and Not terms can use...

Страница 211: ...the trace line The following table defines the trace status characters Trace List Status Characters Character Description The indicated trace line is the trigger condition The indicated trace line is in the middle of a C statement that is not the first assembly language statement in the C source statement The data in the trace buffer line does not match the data in memory The trace line may be a p...

Страница 212: ...or the trace function may capture monitor activity as well as your target program activity Limitations when Triggering on C Variables The emulator s analysis hardware watches bus cycles and triggers on specified bus values However bus cycles do not always map directly to C variables This limitation takes two forms The first form occurs when an access to a C variable requires multiple bus cycles In...

Страница 213: ...er appear on the address bus Similarly a write indirect through a wild pointer pointing to address 0x1004 will overwrite part of foo without the address of foo appearing on the bus This limitation can be overcome by specifying an address range when triggering on a symbol that you suspect is being modified by a wild pointer Limitations when Triggering on Instruction Fetches Instructions located on ...

Страница 214: ...ode near the line you selected You can choose any one of the following Trace after will trace what happens after the selected line is executed Trace before will trace what happens before the selected line is executed Trace about will trace what happens before and after the selected line is executed Trace until will trace what happens before the selected line is executed When the selected line is r...

Страница 215: ...ction behavior is determined by your specification The debugger must be in command mode your target program is halted and the word Command is displayed on the status line in order for you to enter a trace command To stop a trace in progress Using the command line enter Trace Halt And press the Return key If the trace trigger specification is defined to be Trace Trigger Never the trace function wil...

Страница 216: ...nd the raw uninterpreted data collected by the trace function The Line s option allows you to specify a range of lines in the trace buffer to be copied to a specified debugger window or the first state to be displayed in the trace window Examples To view source lines their corresponding assembly language instructions and data read and write cycles Trace Display Modules Source Assembly Data To copy...

Страница 217: ...specification and in the storage qualification specification The event definition can be address values data values status values or a logically AND ed combination of the above Examples Address event To define event 1 to be the address of function update_state_of_system Trace Event Specify 1 Tab Address Is update_state_of_system Status event To define event 2 to be any bus cycle corresponding to a...

Страница 218: ...een You cannot delete events that are assigned as storage qualifiers or trigger terms You can however modify these events by entering a new specification Examples To delete event 2 Trace Event Delete 2 To specify storage qualifiers Using the command line enter Trace StoreQual Event event_nmbr Enter the number of the event previously defined with the Trace Event Specify command and press the Return...

Страница 219: ... update_state_of_system along with the two bus cycles immediately preceding the accesses Trace StoreQual Address Is update_state_of_system Tab Prestore The prestore operation helps you determine what instructions caused an access to a variable or function Note that in the preceding example we defined the qualifying event in the Trace StoreQual command rather than using an event defined previously ...

Страница 220: ...er than using an event defined previously with the Trace Event Specify command When you define the qualifying event in the Trace Trigger command you can specify only a single event You cannot use an OR ed combination of events a sequence of events or multiple occurrences of an event as the trigger condition Examples Trigger on a single event To trigger on the occurrence of a call to function updat...

Страница 221: ...To halt program execution on the occurrence of a trigger Enter the keyword BrkOnTrg in your trace trigger specification to halt program execution on occurrence of the trigger condition Examples To break on a write to memory location current_humid Trace Trigger Event 3 Tab BrkOnTrg PosnTrig End When you start your program the debugger will execute the program until the trigger condition is detected...

Страница 222: ...n specification but remain defined To remove a trigger term Using the command line enter Trace Trigger Never And press the Return key This command restores the trace trigger to its default value Events in trigger terms defined with the Trace Event Specify command are disabled as trigger terms but are not removed as events The Trace Trigger Never command causes the trace function to never trigger T...

Страница 223: ... trace data written to a variable 1 Define trace event 1 to be a write access to the range of addresses corresponding to the variable Trace Event Specify 1 Tab Address Is variable sizeof variable 1 Tab Status Is Write By using the sizeof operator we can specify an address range the size of the variable to ensure that we capture all bytes of variable 2 Assign variable as the trigger and storage qua...

Страница 224: ...ne trace event 1 to be a write access to the range of addresses corresponding to the variable Trace Event Specify 1 Tab Address Is variable sizeof variable 1 Tab Status Is Write 2 Assign the variable as the trigger and storage qualification terms Trace Trigger Event 1 Trace StoreQual Event 1 Tab Prestore Note that we added the Prestore keyword to the Trace StoreQual command The Prestore keyword in...

Страница 225: ... writing a particular value in a variable To trace events leading up to writing the value 0 zero to the element seconds in a structure pointed to by time perform the following steps 1 Define event 1 to be the write of a data value of 0 to the least significant word of the integer value seconds Trace Event Specify 1 Tab Address Is time_struct seconds Tab Data Is 0 Tab Status Is Write 2 Assign event...

Страница 226: ...he trace function The trace function can be used to execute a complex breakpoint in your target program Example 1 Define event 6 to be a write of value 0x3c 60 decimal to the least significant word of the integer value seconds Trace Event Specify 6 Tab Address Is time_struct seconds Tab Data Is 0x3c Status Is Write 2 Define event 7 to be a write to the least significant word of the integer value m...

Страница 227: ...sembly Data Note that the minutes count is updated at line 0 in the trace display The trigger specification has allowed us to see the program activity leading up this event Press the Return key or F7 function key to scroll through the data source line by source line Note that the highlighted line in the code window tracks the first line displayed in the trace display Press the F6 function key to c...

Страница 228: ...press CTRL C to halt program execution and enter command mode 6 Stop the trace measurement Trace Halt 7 Display the trace information Trace Display Modules Assembly The display should show entries and exits of modules and the assembly code that was captured in the trace buffer The code should consist of only LINK and UNLK instructions Note This method of viewing entries and exits of modules may no...

Страница 229: ... using 16 bit memory you need to make fetches appear to be on longword boundaries Use the command line Debugger Option Trace Fetch_Align command to mask the fetch addresses Chapter 6 Making Trace Measurements If tracing is not triggered as expected 205 ...

Страница 230: ...Chapter 6 Making Trace Measurements If tracing is not triggered as expected 206 ...

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

Страница 232: ...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 line of code as...

Страница 233: ...he 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 session ...

Страница 234: ...ce 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 Monitor wi...

Страница 235: ...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 breakpoint line...

Страница 236: ...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 will run unt...

Страница 237: ...ert 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 7 Editing Code and Data To patch C source code by deleting lines 213 ...

Страница 238: ...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 Chapter 7 Editi...

Страница 239: ...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 memory...

Страница 240: ... 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 at addre...

Страница 241: ...y 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 the name ...

Страница 242: ...or 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 7 Editing Code and Data To change the contents of a register 218 ...

Страница 243: ...8 Using Macros and Command Files How to use macros and command files to make debugging easier 219 ...

Страница 244: ...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...

Страница 245: ...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...

Страница 246: ...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 ...

Страница 247: ... 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 ...

Страница 248: ...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...

Страница 249: ... 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 ...

Страница 250: ...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 ...

Страница 251: ...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...

Страница 252: ...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...

Страница 253: ...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...

Страница 254: ...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 ...

Страница 255: ...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...

Страница 256: ...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 ...

Страница 257: ...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...

Страница 258: ...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...

Страница 259: ... 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...

Страница 260: ...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 8 Using Macros and Command Files Using Macros 236 ...

Страница 261: ...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...

Страница 262: ...the commands 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 loggi...

Страница 263: ...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...

Страница 264: ... the debugger The command_file must end with the com extension db68k e emulator_id 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 8 Usin...

Страница 265: ...mouse pointer must be within the interface window Example To start executing command from the file cmdfile1 com File Command cmdfile1 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 command file Abort_Read cause...

Страница 266: ...ournal_file option to the db68k command when starting the debugger The debugger appends the file extension jou to journal_file db68k e emulator_id 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 command...

Страница 267: ...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...

Страница 268: ... 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...

Страница 269: ...d 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 e emulator c command_file Chapter 8 Using Macros and Command Files Using Command Files 245 ...

Страница 270: ...Chapter 8 Using Macros and Command Files Using Command Files 246 ...

Страница 271: ...9 Configuring the Debugger How to change the appearance and behavior of the debugger Chapter 9 Configuring the Debugger 247 ...

Страница 272: ...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 9 Configuring the Debugger 248 ...

Страница 273: ...s 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 Or Using the command line enter Debugger Option List And press the Return key The following information is displayed Debugger Option List Processor 68EC030 Intermixed On Assem_Symbols On Chapter 9 Configuring th...

Страница 274: ...mmands are echoed to the Journal window Using the command line enter Debugger Option Command_Echo Select On or oFF and press the Return 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 togg...

Страница 275: ...matically aligned To set backtrace display of bad stack frames In the Debugger Options dialog box click on the Frame Stop button to toggle display of bad stack frames Or Using the command line enter Debugger Option General Frame_Stop Select On or oFF and press the Return key On Only consecutive valid stack frames are displayed oFF All stack frames including bad frames are displayed Chapter 9 Confi...

Страница 276: ... the command select mouse button down on the button for Input Radix or Output Radix Release the button to select Decimal or Hex Or Using the command line enter Debugger Option General Radix Select Decimal or Hex and press the Return key If you select Hex any number you want interpreted as decimal must be terminated with a T for example specify 32 as 32T Binary numbers are not available when you se...

Страница 277: ...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 9 Configuring the Debugger Setting the General Debugger Options 253 ...

Страница 278: ...mbols in assembly code In the Debugger Options dialog box click on the Assembly Symbols button to toggle assembly symbol display Or Using the command line enter Debugger Option Symbolics Assem_symbols Select On or oFF and press the Return key On Symbols are displayed instead of addresses wherever possible oFF Addresses are displayed Chapter 9 Configuring the Debugger Setting the Symbolics Options ...

Страница 279: ...and press the Return key On Assembly code is intermixed with C source code oFF Only C source code is displayed To enable parameter checking in commands and macros In the Debugger Options dialog box click on the Check Parameters button to toggle parameter checking Or Using the command line enter Debugger Option Symbolics Check_Args Select On or oFF and press the Return key Chapter 9 Configuring the...

Страница 280: ... assignment is made the debugger warns you if the assignment contains a C type mismatch oFF The debugger does not perform any argument checking Chapter 9 Configuring the Debugger Setting the Symbolics Options 256 ...

Страница 281: ...Breakpoint window display behavior In the Debugger Options dialog box hold the command select mouse button down on the Breakpoint Window button Release the button to select On or Swap Or Using the command line enter Debugger Option View Breakpt_Window Select On or Swap and press the Return key On The Breakpoint window is displayed at all times Swap The Breakpoint window is only displayed when you ...

Страница 282: ...indow is only displayed when you activate the View window or when you enter the Debugger Execution Display_Status command breakpoints To specify the standard I O window display behavior In the Debugger Options dialog box hold the command select mouse button down on the Stdio Window button Release the button to select On or Swap Or Using the command line enter Debugger Option View Stdio_Window Sele...

Страница 283: ...ions dialog box hold the command select mouse button down on the Highlighting button Release the button to select Inverse or Half Bright Or Using the command line enter Debugger Option View Highlight Select Half_Bright or Inverse and press the Return key To display information a screen at a time more In the Debugger Options dialog box hold the command select mouse button down on the More List Mode...

Страница 284: ...and 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 To store timing information when tracing In the Debugger Options dialog box select a Trace Counts option Or Using the command line enter Debugger Option Trace Count Select Time or Nothing and press Return Chapter 9 Configuring the Debugger Setting ...

Страница 285: ...ng In the Debugger Options dialog box select a Fetch Mask option Or Using the command line enter Debugger Option Trace Fetch_Align Select Byte Word or Long and press Return Fetch addresses will be masked so that all fetches on the selected boundary size can trigger traces Chapter 9 Configuring the Debugger Setting the Display Options 261 ...

Страница 286: ...se 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 window is at ...

Страница 287: ...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 resized The difference between the bottom row coordinate and top row coordinate must be ...

Страница 288: ...d the normal view and alternate view dimensions are set identically The debugger allocates a buffer with enough memory to contain the entire window Therefore the window with the largest dimensions normally the alternate view should be defined first to allocate sufficient memory To display a user defined screen use the Window Screen_On command or press function key F6 Caution When making a new wind...

Страница 289: ... User_Screen screen_nmbr Enter the user screen number and press the Return key Examples To display user screen 4 Window Screen_On User_Screen 4 To erase standard I O and user defined window contents Using the command line enter Window Erase user_window_nmbr Enter the user window number the standard I O window number is 20 whose contents you wish to clear and press the Return key If you do not spec...

Страница 290: ...he 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 remove a user defined screen that has three windows numbers 50 55 and 73 Window Delete 50 Window Delete 55 Window Delete 73 Chapter 9 Configuring the Debugger Modifying Display Area Windows 266 ...

Страница 291: ...g sessions or file db68030 rc for 68030 debug sessions in the current directory Or Use the menu select 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 Or Using the command line enter File Startup startup_file Enter the name of the file in which the startup i...

Страница 292: ...392a or hp2392A terminal types File Startup 2392 To load a startup file Use the s startup_file option to the db68k command when starting the debugger db68k e emulator_id s startup_file RETURN The debugger s startup options and window specifications are configured as described in startup_file The startup_file must end with the rc extension and can be created only from within the debugger If no star...

Страница 293: ...able defaults will be used Examples To start the debugger and load the state saved in the startup file my_state rc db68k e emul68k s my_state rc RETURN Chapter 9 Configuring the Debugger Saving and Loading the Debugger Configuration 269 ...

Страница 294: ...cal 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 For example usr lib X11 app defaults HP64_Debug in HP UX or usr openwin lib X11 app defaults HP64_Debug in SunOS 2 The XAPPLRESDIR HP64_Debug file The XAPPLRESDIR envi...

Страница 295: ...emes note the dot in the directory name Scheme files group resource specifications for different displays computing environments and languages This section shows you how to Modify the debugger s graphical interface resources Use customized scheme files Set up custom action keys Set initial recall buffer values Set up demos or tutorials Refer to the X Resources and the Graphical Interface chapter f...

Страница 296: ... 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...

Страница 297: ...n 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 proc 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 more ...

Страница 298: ...plication defaults file that is saved as usr hp64000 lib X11 HP64_schemes old HP64_Debug 2 Modify the temporary file Modify the resource that defines the behavior or appearance that you wish to change For example to change the number of lines in the main display area to 36 vi HP64_Debug tmp Search for the string HP64_Debug lines You should see lines similar to the following The lines and columns s...

Страница 299: ...rdb command to add the resources to the RESOURCE_MANAGER property For example xrdb merge nocpp HP64_Debug tmp Otherwise if the RESOURCE_MANAGER property does not exist append the temporary file to your HOME Xdefaults file For example cat HP64_Debug tmp HOME Xdefaults 4 Remove the temporary file 5 Start or restart the debugger s graphical interface After you have completed the above steps you must ...

Страница 300: ...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 ...

Страница 301: ...t 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 Refer to the previous To customize debugger s graphical interface resources section for more...

Страница 302: ... 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 means to repeat the previous operation whether it came from a pull down a dialog a pop up or another action key...

Страница 303: ...DB_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 debug dir...

Страница 304: ...emo appears in the pull down menu demoPopupSub indexFile Xdemo Index topics Specifies the file containing the list of topic and file pairs demoPopup textColumns 30 Specifies the width in characters of the demo topic list pop up demoPopup listVisibleItemCount 10 Specifies the length in lines of the demo topic list pop up demoTopic About demos Specifies the default topic in the demo pop up selection...

Страница 305: ...tion buffer The mechanism for providing demos and tutorials in the graphical interface is identical The following steps show you how to set up demos or tutorials in the debugger s graphical interface 1 Create the demo or tutorial topic files and the associated command files Topic files are simply ASCII text files You can use I to produce inverse video in the text U to produce underlining in the te...

Страница 306: ...48A 3 Set the enableDemo or enableTutorial resource to True 4 Define the demo index file by setting the demoPopupSub indexFile or tutorialPopupSub indexFile resource For example demoPopupSub indexFile users guest gui_demos index You can use absolute paths for example users guest Index paths relative to the directory in which the interface was started for example mydir indexfile or paths relative t...

Страница 307: ...10 Configuring the Emulator How to configure the emulator for your target system 283 ...

Страница 308: ...rce allocation is called the emulator configuration There are three ways to configure the emulator Load a configuration file into the emulator Change the configuration using the Emulator Configuration dialog box Change the configuration using the Debugger Execution Environment Modify_Config command from the command line The Emulation Configuration dialog box is available both in the debugger emula...

Страница 309: ...may be left running while you are using the debugger Examples The Emulator Configuration main menu is shown below Clicking on one of these lines selects a particular configuration section Clicking this button presents the questions for the selected configuration section Clicking this button stores the current configuration Clicking this button exits the Emulator Configuration dialog box Clicking t...

Страница 310: ...Use the command line in the Emulator Configuration window to answer the configuration questions Each configuration section presents a window similar to the following The menu bar Configuration help text display area Emulator status and error message line Command line text entry area Pushbutton softkeys Command control and cursor control pushbuttons Chapter 10 Configuring the Emulator 286 ...

Страница 311: ...ing question of a configuration section you are asked if you want to return to the main menu In order for the emulator to recognize any configuration changes the configuration must be stored To store a configuration When answering the configuration questions choose File Store from the pull down menu and use the File Selection dialog box to name the configuration file From the Emulator Configuratio...

Страница 312: ...entally change one of the configuration items don t worry As long as you do not click on Apply to Emulator any changes you make will not be saved Just click on Yes when the debugger asks Your changes will be lost Exit configuration To change the configuration directory context When answering the configuration questions choose File Directory from the pull down menu and use the Directory Selection d...

Страница 313: ...Emulator Configuration dialog box main menu click on the Help button To exit the Emulator Configuration dialog box When answering the configuration questions choose File Exit from the pull down menu or type CTRL x and click Yes in the confirmation dialog box From the Emulator Configuration dialog box main menu click the Exit button and click Yes in the confirmation dialog box Any modifications mad...

Страница 314: ...onfiguration file no C option is given and the emulator is locked at startup the configuration saved when you left the emulator locked is used No default configuration is loaded If you do not specify the C option and the emulator is not locked the debugger searches for a default configuration file in the following sequence 1 configuration file default EA in the current directory 2 configuration fi...

Страница 315: ...8A or usr hp64000 inst emul 64747A Examples The following examples show a few ways to load a configuration file db68k e test C srwcfg EA Run the debugger using emulator test and configuration file srwcfg EA db68k e m68020 Run the debugger using emulator m68020 and use the default configuration file named default EA in the current working directory If default EA does not exist in the current direct...

Страница 316: ...ne Or Edit a configuration file using a text editor If you use a text editor to create a configuration file be use to give the file a name with the file extension EA The EA file extension tells the debugger that the file is an ASCII configuration file If an error occurs when loading a configuration file Load a different configuration file Or 1 Exit the debugger 2 Modify the configuration file usin...

Страница 317: ...se any legal file name The configuration you have created will be saved in two files each with the name you specify as follows filename EA is an ASCII version of the configuration file that is saved when you modify the configuration You can make changes to this file outside the emulation environment by using a text editor filename EB is a binary version of the configuration file that is created fr...

Страница 318: ...y the blocks that require it Emulation Monitor The emulation monitor is used to implement some emulator features For example display or modification of emulation or target system memory is done by the monitor You can choose either a foreground or background monitor and the base address where the monitor resides See the book Concepts of Emulation and Analysis that you received with your HP emulator...

Страница 319: ...o real time runs these ignore commands that temporarily interrupt execution of your target program This is important for systems that require nonstop real time execution of the target program You can disable the processor cache memory The emulation bus analyzer can t trace instructions or data that are fetched from the cache This can make trace displays difficult to interpret When you disable the ...

Страница 320: ...mulator to remain in the reset state after you complete the configuration process or you can have it begin executing in the monitor In the General Items configuration section answer the question Enter monitor after configuration yes means that the emulator will break to the monitor from reset when you finish the configuration session This is the default no means that the emulator will remain reset...

Страница 321: ......

Страница 322: ...ocessor will always access external memory for instructions and data The analyzer will be able to capture all bus cycles this will improve readability of the trace list Processor performance will be reduced yes means maximum processor performance will be obtained If you are making analyzer trace measurements you may need to experiment to find suitable trigger combinations The emulator uses the CDI...

Страница 323: ...it state for synchronous and burst mode accesses to target system memory Answer the question Is speed of external clock faster than 25 MHz yes for clock speeds above 25 MHz This is the default This ensures that emulation memory has enough time to respond to the memory access Otherwise emulator operation will be erratic no for clock speeds below 25 MHz Emulation memory accesses will be made without...

Страница 324: ...Unit The MC68030 MMU can manage a program that occupies a large space in logical virtual memory while running it from a much smaller space in physical memory Answer the question Enable the MMU yes lets the MMU of the MC68030 control placement of the program in physical memory space With a valid entry in the translation control register the target system will be able to enable and disable the MMU d...

Страница 325: ...f the translation tables in the emulation processor MMU Refer to Mapping The Foreground Monitor For Use With The MC68030 MMU at the end of this chapter for instructions on how to modify the translation tables or transparent translation registers in the MC68030 MMU Answer the question Monitor type with MMU enabled foreground selects the default foreground monitor that is supplied with your emulator...

Страница 326: ...itor There are two selections you can make when choosing a foreground monitor One is the foreground monitor that is resident in the emulator If this monitor doesn t meet your needs you can modify the monitor source code supplied with the emulator and save it under a different name such as myforeground To select it you will choose the user_foreground monitor Within the next few questions you will t...

Страница 327: ...nd monitor skip to question 4 If you choose the background monitor for the MC68030 EC030 with MMU disabled and you would like to have it read a byte from the target system periodically answer the question Do you want periodic read accesses while in background monitor yes proceeds to the next configuration question which allows you to specify the address to be read no disables periodic background m...

Страница 328: ...reground monitor code such as myforeground 5 Interrupt Priority question If you selected the foreground or user_foreground monitor type you need to answer the question Interrupt priority level for default foreground monitor or Interrupt priority level for user foreground monitor Enter a number from 0 to 7 in answer to the above question Set the interrupt priority level low enough to allow your tar...

Страница 329: ...und monitor or the MC68020 emulator with any monitor type you must set the base address where the monitor will be loaded Answer the question Monitor s base address Enter a hexadecimal address on a 4 Kbyte boundary XXXXX000h Background monitor When you select the background monitor the emulator uses overlay memory to load the monitor This overlaymemory doesn t use any processor memory space You mig...

Страница 330: ...ck of dual port emulation memory It resets the memory map and creates a map term at the address you specified when you answered the Monitor s base address question You can t delete or alter this map term by using the map configuration commands Instead you must change the monitor configuration by modifying your answers to the monitor configuration questions If you did not change the monitor type bu...

Страница 331: ...able the interlock and the monitor is in an address range where the target system does not return DSACK or STERM the emulator will stop If this happens use the Execution Reset to Monitor command to reset the processor Then disable the interlock Remember that emulation monitor bus cycles are visible to the target system except when you are using the MC68030 EC030 with a background monitor If you di...

Страница 332: ...a 256 byte block is allocated starting at the lower address To specify an address beginning on a 256 byte boundary enter an address ending in 00 To specify an address ending on a 256 byte boundary enter an address ending in FFH Because of the way the emulation memory system is designed the amount of memory used by each map term corresponds to the nearest block size available not the amount specifi...

Страница 333: ... is 32 bits wide In addition to the 4K of dual port memory there are also two memory sockets on the probe This memory is not dual ported the monitor is used to read and write the locations when you display or modify this memory The bus width for this memory is 32 bits You can install 256 Kbyte or 1 Mbyte SRAM memory modules in these sockets The following table lists the possible installation combi...

Страница 334: ...tallation 2 is not recommended because it does not allocate blocks as well as installation 3 2 If you look down at the component side of the probe with the cables leading towards you memory slot 0 is to your left and memory slot 1 is to your right Illustrations in the 68020 030 Graphical User Interface User s Guide manual identify the locations of slot 0 and slot 1 Chapter 10 Configuring the Emula...

Страница 335: ...m ROM guarded Guarded memory attribute Attributes control specific functionality on a term by term basis Attributes can be the following dp places this block in the special 4 Kbyte block of dual ported emulation memory on the probe Dual ported memory can be accessed by the host controller without the emulation monitor program which means that your program executes uninterrupted during the access d...

Страница 336: ...emory block the target DSACK and BERR signals and STERM for the MC68030 EC030 are ignored on accesses to that block If you specify the ci attribute MC68030 EC030 emulator only the CIIN cache inhibit input line is asserted for accesses to that memory block This prevents instructions or data from that memory block from being loaded into the processor cache memory If you need to disable caching for a...

Страница 337: ... Target Memory dp Use dual port memory Yes1 No dsi Interlock DSACKs and STERM Yes No ci Inhibit caching Yes Yes dp_dsi Use dual port memory and interlock DSACKs and STERM Yes1 No dp_ci Use dual port memory and inhibit caching Yes1 No dsi_ci Interlock DSACKs and STERM and inhibit caching Yes No dp_dsi_ci Use dual port memory interlock DSACKs and STERM and inhibit caching Yes1 No 1 Only valid for th...

Страница 338: ...arded map type to do this The emulator will break to monitor and display a message when a guarded memory access occurs Delete a particular memory map term by entering delete term where term is in the range 1 7 or Remove all memory map terms and reset the map by typing delete all If you want to add a term that overlaps an address range that is already represented by an existing term you must either...

Страница 339: ... used the dual port emulation RAM the first map term that will fit is assigned to that memory In this example that is the last term you defined the range from 50000 500ff The entire 4 Kbyte block is reserved though you specified only a 256 byte range Two 64K blocks and one 128K block are used from the other emulation memory leaving two 64K blocks and one 128K block One of the 64K blocks is used fo...

Страница 340: ...0 EC030 You can use function codes when mapping memory For example you might want to map separate ranges for user and supervisor function codes 1000 thru 1fffh supervisor emulation ram 1000 thru 1fffh user emulation ram Then to load programs named supprog x and userprog x into the supervisor and user memory spaces you would use the commands load supprog fcode s load userprog fcode u To modify the ...

Страница 341: ... interrupts are always disabled during background monitor execution The foreground monitor also disables interrupts during certain critical routines such as monitor entry and exit You can enable interrupts during the remainder of foreground execution See the section on selecting and configuring the emulation monitor earlier in this chapter To preset the interrupt stack pointer and Program Counter ...

Страница 342: ...ou must change it to a valid even address 2 Answer the question Reset value for Program Counter Enter a 32 bit hexadecimal address for the initial value of the PC This value usually should correspond to the value loaded at offset 4 of your vector table The default value is 0ffffffff hex which is invalid You must change it to a valid even address This configuration item is provided as a convenience...

Страница 343: ...esses Answer the question User memory access size bytes to have the monitor use byte data type for accesses to target memory words to have the monitor use word data type for accesses to target memory longs to have the monitor use long word data type for accesses to target memory If you see messages advising of a mismatch between memory access size and the amount of data supplied when you modifymem...

Страница 344: ... write to ROM If your program writes to a location mapped to emulation ROM there is probably a logic error You can have the emulator stop execution of your target program when this event occurs Answer the question Break processor on write to ROM yes to cause the emulator to break into the monitor when a write to emulation or target ROM is detected no to ignore any writes to emulation or target ROM...

Страница 345: ...mulator in these target systems you may want to choose a different breakpoint vector number to implement software breakpoints in your emulator Regardless of the BKPT vector number you choose the emulator will process it as follows When you define a breakpoint the emulator saves the instruction at the address where the breakpoint is to be set and then writes a BKPT instruction at that address When ...

Страница 346: ...e interaction of the target system and the emulator Answer the question Trace background or foreground operation foreground to trace only target program cycles This includes the foreground monitor background to trace only emulation monitor cycles and only if you are using the background monitor both to trace both target program cycles and emulation background monitor cycles Chapter 10 Configuring ...

Страница 347: ...the question Set the analyzer speed slow for a data rate less than or equal to 16 67 MHz fast for a data rate between 16 67 and 20 MHz veryfast for a data rate between 20 and 25 MHz The worst case situation occurs during a zero wait state burst cycle The data rate for burst cycles is given by the equation Data Rate Processor Clock Rate 1 number of wait states To determine the correct answer to thi...

Страница 348: ...equires one wait state for synchronous burst accesses over 25 MHz The resulting data rate is 20 MHz so you answer the configuration question as follows Set analyzer speed fast Note that you can use only the nothing debugger trace option You cannot count time because the analyzer clock speed is too high To modify the simulated I O configuration The Softkey Interface provides a simulated I O capabil...

Страница 349: ...inate measurements with associated instruments The interactive measurement specification defines these trigger connections Answer the question Modify interactive measurement specification yes to review and or change the interactive measurement specification no to bypass the interactive measurement specification and skip to saving the configuration file If you answer yes to this question you will s...

Страница 350: ...monitor is located Modify the mapping tables in the MMU to maintain a 1 1 mapping of the memory address space where the foreground monitor is located Make sure the mappings used for the foreground monitor are not write protected Use one of the two transparent translation registers TT0 or TT1 to control the block where the foreground monitor is located You must remember to set the Read Write Mask b...

Страница 351: ...emember that the tables are located in physical address space You must enter your modification commands by using physical addresses Select an address space to contain your foreground monitor that is higher than the address space used for your target program and I O This will optimize deMMUer resources by using them first to reverse translate your target address space If you are mapping page sizes ...

Страница 352: ...or TT1 and the first address must begin on a 4 Kbyte boundary hexadecimal number ending in 000H Examples To map the foreground monitor to 1 1 address space beginning at 0800 0000H by using TT0 configure the base address Monitor s base address 08000000h Then set register TT0 to 08008777h This will map 8000000 8ffffff transparently 1 1 This is a 16M block the smallest that can be specified in a tran...

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

Страница 354: ...Part 3 330 ...

Страница 355: ...11 X Resources and the Graphical Interface An introduction to X resources 331 ...

Страница 356: ...e of data that controls the operation or appearance of an X Windows application A resource may apply to an application 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...

Страница 357: ... be blue To put this all together a resource string for the foreground color for 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 sh...

Страница 358: ...mplete 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 list...

Страница 359: ... 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 but...

Страница 360: ... file in the user s HOME directory The system directory for application default files is HP UX usr lib X11 app defaults SunOS usr openwin 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 The name of the file...

Страница 361: ...e resources specified by the user override the default resources in the application default file However there are more than two places in which applications look for resource specifications when starting up The following is a list of the standard places in order that an application looks to find resources 1 The application default file The application default file for the graphical interface is c...

Страница 362: ...help topic menu by choosing Help General Topic and selecting the X Resources Setting topic To further assist you with setting X resources there is also another topic on the help menu pull down that you should use Choose Help X Resource Names to display the class and instance name for the graphical interface in a dialog box From the dialog box you can also display all widget class and instance name...

Страница 363: ...olor scheme for black and white displays This file is chosen if the display cannot produce at least 16 colors Debug Color Defines the color scheme for color displays This file is chosen if the display can produce 16 or more colors Debug Input Defines the button and key bindings for the mouse and keyboard Debug Large Defines the window dimensions and fonts for high resolution display 1000 pixels or...

Страница 364: ...bug Label XAPPLRESDIR HP64_schemes platform Debug scheme Just as XAPPLRESDIR can point to a system wide app defaults file so can it point to a set of system wide scheme files 8 HOME HP64_schemes Debug Label HOME HP64_schemes platform Debug scheme Please note the dot in the HP64_schemes directory name You can force the debugger s graphical interface to use certain schemes Five application specific ...

Страница 365: ...indings Values can be Input or the name of a custom scheme file HP64_Debug sizeScheme Chooses the large or small scheme for fonts and sizes Values can be Large Small or the name of a custom scheme file HP64_Debug labelScheme Chooses a different label scheme for fixed text Again this resource is affected by the LANG variable Values can be Label LANG if this environment variable is set and there is ...

Страница 366: ...pplication specific resource you should look in the HP64_Debug file for information about that resource If the RESOURCE_MANAGER property exists as is the case with HP VUE copy the complete HP64_Debug file or just the part you are interested in to a temporary file Modify the resource in your temporary file and save the file Then merge the temporary file into the RESOURCE_MANAGER property with the x...

Страница 367: ...lternative directories and make the modifications there If you are using XAPPLRESDIR make sure the variable is set and exported Save the file If the debugger s graphical interface is currently executing you must exit the application and restart it to see the results of your change Chapter 11 X Resources and the Graphical Interface 343 ...

Страница 368: ...Chapter 11 X Resources and the Graphical Interface 344 ...

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

Страница 370: ...Part 4 346 ...

Страница 371: ...12 Debugger Commands Detailed descriptions of command line commands 347 ...

Страница 372: ...alyzer Term File Edit File File Edit At Location File Edit At PC Location File Term File Exit Window File Exit Locked File Exit Released Debugger Directory Change_Working Program Context Set Debugger Execution Environment Load_Config Program Load Default Program Load New Code_Only No_Pc_Set Program Load New Symbols_Only No_Pc_Set File Command filename File Startup File Startup filename N A Memory ...

Страница 373: ...n Expression Display_Value Expression Monitor Value Symbol Display Default Symbol Display Options Data macros End_Options Symbol Display Options Functions labels End_Options Symbol Display Options Modules End_Options Symbol Browse N A Modify Emulator Config Modify C Expression Modify Memory Modify Memory at Modify Register Debugger Execution Environment Modify_Config Expression C_Expression variab...

Страница 374: ...ete All Breakpoints Edit Call Macro Breakpt Instr Breakpt Read Breakpt Write Breakpt Access Breakpt Delete Breakpt Clear_All N A Window Window Active window name Settings High Level Debug Settings Assembly Level Debug Settings Debugger Options Settings Command Line Debugger Level High_Level Debugger Level Assembly N A N A Chapter 12 Debugger Commands 350 ...

Страница 375: ...d Trace About Trace Trigger Address Is line_number Status Is CycTyp Fetch PosnTrig Center Trace Until Trace Trigger Address Is line_number Status Is CycTyp Fetch BrkOnTrg PosnTrig End Default window pop up Command Line Highlight Toggle Window Window Active window_name Window Toggle_View Remove Window N A Breakpoint window pop up Command Line Delete Breakpoint Breakpt Delete brkpt_nmbr Delete All B...

Страница 376: ...level Run Until Stack Level Program Run Until level Status Line Popup Command Line Command Line On Off N A Remove Temporary Message N A Command Line Popup Command Line Forward Tab Tab Backward Tab Shift Tab Execute Command Return Clear to End of Line Ctrl E Clear Entire Line Ctrl U Command Line On Off N A Chapter 12 Debugger Commands 352 ...

Страница 377: ...ebugger Directory Debugger Execution Display_Status Debugger Execution Environment Debugger Execution IO_System Debugger Execution Load_State Debugger Execution Reset_Processor Debugger Host_Shell Debugger Level Debugger Macro Add Debugger Macro Call Debugger Macro Display Debugger Option Debugger Pause Debugger Quit Access debugger on line help Display or change present working directory Display ...

Страница 378: ...nitoring specified variables Monitor variables 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 File Error_Command File Journal File Log File Startup File User_Fopen File Window_Close Read in and process a command ...

Страница 379: ...k_Operation Search Memory Block_Operation Test Memory Display Memory Register Memory Unload_BBA Change the values of memory locations Copy a memory block Fill a memory block with values Compare two blocks of memory Search a memory block for a value Examine memory area for invalid values Display memory contents Change the contents of a register Unload BBA data from program memory Chapter 12 Debugge...

Страница 380: ...iables of a function Display all local variables of a function at the specified stack backtrace level Display C source code Find first occurrence of a string Find next occurrence of a string Simulate an interrupt Cancel all pending interrupts Load an absolute file for debugging Reset the program starting address Start or continue program execution Execute a number of instructions or lines Execute ...

Страница 381: ...w Stop the current trace Specify the bus conditions to be stored captured Specify a previously defined event to be stored captured List the current storage qualification terms Disable current storage qualification terms store everything Specify the bus conditions to be used to trigger start a trace Specify a previously defined event to be used as the trigger List the current trigger terms in the V...

Страница 382: ...1 Suspends program execution Sometimes execution may stop a few instructions past the instruction causing the access This is called skid 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 th...

Страница 383: ... time The Breakpt Access command sets up a trace with the trigger at the end of the trace buffer using the current storage qualification You can display the trace after the break occurs to see the cycles leading up to the break See Also Breakpt Clear_All Breakpt Delete Breakpt Instr Breakpt Read Breakpt Write Program Run Program Step Examples To set a breakpoint on accesses of addresses assign_vec...

Страница 384: ...ars removes all defined breakpoints See Also Breakpt Access Breakpt Delete Breakpt Instr Breakpt Read Breakpt Write Program Run Program Step Examples To remove all defined breakpoints Breakpt Clear_all Chapter 12 Debugger Commands Breakpt Clear_All 360 ...

Страница 385: ...umbers 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 Instr Breakpt Read Breakpt Write Program Run Program Step Examples To delete breakpoint number 2 Breakpt Del...

Страница 386: ...ition of the function to use You can also specify the argument type of the function definition in parentheses after the function name in the Breakpt Instr command Note The debugger emulator cannot set instruction breakpoints on address locations in target ROM You can attach a macro to a breakpoint using the optional macro_call parameter See the Using Macros and Command Files chapter The debugger p...

Страница 387: ...eakpoint information See Also Breakpt Access Breakpt Clear_All Breakpt Delete Breakpt 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 i...

Страница 388: ...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...

Страница 389: ...nd 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 Chapte...

Страница 390: ...ter with a directory name the debugger makes that directory the current working directory Changing the working directory will change the current working directory in all interfaces connected to the emulator 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 projec...

Страница 391: ... 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...

Страница 392: ...ace Perf Software Performance Analyzer BMS Broadcast Message Server the Softbench Gateway Debug Debugger This sends a command back to the debugger you are using UI_name An interface described by a string The command will be forwarded to an interface specified by a debugger or target string array char If an interface of the type specified is currently running the command will be executed there and ...

Страница 393: ...with the Debugger Execution Environment Load_Config config_file command because the configuration file name must be enclosed in quotation marks However you may use shell environment variables See Also The Configuring the Emulator chapter for detailed information on the modify configuration command Example To load the emulation configuration file mycnfig from within the debugger Debugger Execution ...

Страница 394: ...xecution Environment Modify_Config command starts a process which allows you to modify the current emulator configuration See Also The Configuring the Emulator chapter in this manual Chapter 12 Debugger Commands Debugger Execution Environment Modify_Config 370 ...

Страница 395: ...ed I O system Remember you also need to configure the emulator for simulated I O polling and addresses 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...

Страница 396: ...d 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 program is Ctrl C which is used to interrupt the debugger s execution of the ...

Страница 397: ...oject errorfile Debugger Execution IO_System Stdio_Redirect dev simio 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...

Страница 398: ...gger Execution Save_State command If you do not specify a file name save_file the debugger uses the default file db68k sav for the 68020 and the file db68040 sav for the 68030 Example To restore memory contents and register values saved in save file session1 Debugger Execution Load_State session1 Chapter 12 Debugger Commands Debugger Execution Load_State 374 ...

Страница 399: ...rity 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 6 The cache control register is set to 0 7 Any pending interrupt or exception is cleared 8 Registers A0 A6 and D0 D7 are set to 0 9 The emulator breaks into the emulation monitor Note Memory is not reinitialized by the Debugger Execution Reset_Processor command Therefore C variab...

Страница 400: ...n 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 ...

Страница 401: ...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 12 Debugger Commands Debugger Host_Shell 377 ...

Страница 402: ...f 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 desir...

Страница 403: ...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...

Страница 404: ...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 ...

Страница 405: ...ain 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 For...

Страница 406: ... 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 ...

Страница 407: ... 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 12 Debugger Commands Debugger Macro Call 383 ...

Страница 408: ...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...

Страница 409: ...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 1...

Страница 410: ...top Controls stack walking Demand_Load Enables disables demand loading of symbols Radix Interprets numbers as decimal or hex Step_Speed Specifies the stepping speed Use the Debugger Option List command to display the current option values To permanently change any option default values first use the Debugger Option command to change the value s and then use the File Startup Chapter 12 Debugger Com...

Страница 411: ...a and Align_Bp is set to On their alignment may be incorrect Make sure the Align_Bp option is set to oFF to prevent breakpoint alignment problems 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 frame...

Страница 412: ...ny number you want interpreted as decimal must be terminated with a T for example specify 32 as 32T Binary numbers are not available when Radix is set to hexadecimal Floating point and enumeration type values are not affected by the radix option The Output parameter lets you specify whether the output of the Expression Display_Value Expression Monitor Value and Program Context Expand command is di...

Страница 413: ...ption View Examples To list the current debugger option settings in the Journal window Debugger Option List Debugger Option List Processor 68020 Intermixed On Assem_Symbols On Step_Speed 0 Radix Decimal_Input Decimal_Output Stdio_Window Swap Check_Args oFF Align_Bp oFF Breakpt_Window Swap More On Highlight Inverse Frame_Stop oFF Command_Echo oFF View_Window Swap Demand_Load oFF Amt_Scroll 1 Trace_...

Страница 414: ... option default values first use the 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 Assem_Symbols The Assem_Symbols option causes symbols instead of memory addresses to be displayed in the disassembled code whenever possible Symbol names are placed to the right of...

Страница 415: ...ted the debugger warns you when an assignment is made which contains a C type mismatch This option is off by default 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 expression...

Страница 416: ...Align option allows you to trigger a trace on an instruction s address which never appears on the bus For example this might happen when an instruction for a processor with a 32 bit bus lies between longword boundaries The Fetch_Align operation masks address values so that they appear to occur on the boundaries appropriate for the processor s bus width Defaults are Count Nothing and Fetch_Align Lo...

Страница 417: ...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 12 Debugger Commands Debugger Option Vie...

Страница 418: ... 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 optio...

Страница 419: ... 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 Bre...

Страница 420: ...auses 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 12 Debugger Commands Debugger Pause 396 ...

Страница 421: ... to the emulator If this is the only interface using the emulator the emulator will be left locked Locked Option The Locked option lets you lock the emulation hardware and a connected target system so that other users cannot access the hardware until it is explicitly released This option will cause all interfaces connected to the emulator to disconnect Released Option The Released option releases ...

Страница 422: ...te the debugging session and release the emulator hardware so that other users can access it Debugger Quit Released To terminate the debugging session and lock the emulator hardware so that other users cannot access it Debugger Quit Locked Chapter 12 Debugger Commands Debugger Quit 398 ...

Страница 423: ...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_Ex...

Страница 424: ...it signed decimal numbers 32 bit signed decimal numbers 16 bit signed decimal numbers 8 bit characters unsigned hexadecimal numbers if not printable 32 bit unsigned numbers Name of Enumerator constant enumerator value if name not defined All elements All members All characters as typed in by double quotes 8 bit hexadecimal 16 bit hexadecimal 32 bit hexadecimal 32 bit floating point 64 bit floating...

Страница 425: ...e following statement displays it as a four character array Expression Display_Value char 4 count To display the contents of a character array as a string cast the variable using the quoted string cast as shown in the following example Expression Display_Value Q S buf If the type of the expression is unknown it defaults to type byte See the Expressions and Symbols in Debugger Commands chapter for ...

Страница 426: ... hours 4 minutes 0 seconds 20 Expression Display_Value time To display the name of the current program module Expression Display_Value module To display the name of the current program function Expression Display_Value function Chapter 12 Debugger Commands Expression Display_Value 402 ...

Страница 427: ..._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 th...

Страница 428: ... 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 The...

Страница 429: ...int 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 Reserved Symbols 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...

Страница 430: ... 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 paramet...

Страница 431: ... 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 12 Debugger Commands Expression Fprintf 407 ...

Страница 432: ... 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 12 Debugger Commands Expression Monitor Clear_All 408 ...

Страница 433: ...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...

Страница 434: ...ger 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 All expressions monitored with this command are displayed according to their type as follows Type Display Format Chapter 12 Debugger Commands Expression Moni...

Страница 435: ...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 array Expression Monitor Value char 4 count If the type of the expression is unknown it defaults to type byte Only 17 lines can be displayed in the data window By default a single line is us...

Страница 436: ... 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 monitor the contents of string buf Expression Monitor Value Q S buf Chapter 12 Debugger Commands Expression Monitor Value 412 ...

Страница 437: ...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...

Страница 438: ... 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 12 Debugger Commands Expression Printf 414 ...

Страница 439: ...f 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 ...

Страница 440: ...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...

Страница 441: ...ing file File Journal Append opens an existing file New information is appended to the end of the existing file File Journal oFF closes the journal file A window number 29 is assigned to the journal file so that output can be written to that file using the Expression Fprintf command See Also Expression Fprintf Examples To make and open journal file debug1 jou for writing File Journal On debug1 To ...

Страница 442: ...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...

Страница 443: ...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 12 Debugger Commands File Log 419 ...

Страница 444: ...u saved will be the default parameters in that debugging session A startup file has an extension of rc appended to the end of it If you do not specify a startup file name the startup options are saved in a file named db68k rc Or db68030 for the 68030 EC030 You can modify default debugger startup option values with the Debugger Option command and window parameters with the Window commands The follo...

Страница 445: ...ormation Window sizes user windows and window locations You can specify a command file to be executed when the debugger starts If you specify a command file it executes after the debugger is started Command files may perform other operations at startup such as I O port setup and macro definition See Also Debugger Option File Command Window New Window Resize Examples To save the current set of debu...

Страница 446: ...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 12 Debugger Commands File Startup 422 ...

Страница 447: ...or 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 Windo...

Страница 448: ...e 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 12 Debugger Commands File User_Fopen 424 ...

Страница 449: ... 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 12 Debugger Commands File Window_Close 425 ...

Страница 450: ...on string elements will be truncated or padded as required based on the size qualifier Memory values can 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 ne...

Страница 451: ...mmand recognizes variable types and the specified expressions behave 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 memo...

Страница 452: ... Block_Operation Match Memory Block_Operation Search Memory Block_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...

Страница 453: ...cify a single expression value the debugger fills the memory area with that value If you enter an expression string the debugger 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 ...

Страница 454: ...lock_Operation Match Memory Block_Operation Search Memory Block_Operation Test Memory Register 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 12 Debugger Co...

Страница 455: ... 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...

Страница 456: ... 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 5...

Страница 457: ...ze 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 ...

Страница 458: ...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 S...

Страница 459: ... 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...

Страница 460: ...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 t...

Страница 461: ...l 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 in...

Страница 462: ...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 The alternate view of the Journal window is displayed if more than two lines are copied to the display See Also Expre...

Страница 463: ...ger displays contents of the specified register in binary 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 A complete list of the reserved words that you can use with this...

Страница 464: ...odified and the next register will be displayed pc 0x000010B8 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 To set the value of the lower 32 bits of the CPU root pointer to 0x000174B4 Memory Register CRP_L 0x000174B4 Chapter 12 Debugger Commands Memory Register 440 ...

Страница 465: ...spec file for processor processor The Memory Unload_BBA command unloads basis branch analysis BBA information from program memory The BBA preprocessor b option must be used at compile time in order for this information to exist in program memory The file name bbadump data is used as the default name of all dump files if none is specified in the command Once this information has been unloaded it ca...

Страница 466: ...All To dump_file The Memory Unload_BBA All To dump_file command unloads branch analysis information associated with all absolute files loaded into dump_file Memory Unload_BBA Load_File load_file The Memory Unload_BBA Load_File command unloads only basis branch information associated with the specified absolute file load_file into the file bbadump data This command lets you run bbarep without speci...

Страница 467: ...ch analysis information associated with absolute file a out x into file bbadump data Memory Unload_BBA Load_file a out 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 12 Debugger Commands Memory Unload_BBA 443 ...

Страница 468: ...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...

Страница 469: ...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...

Страница 470: ...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 12 Debugger Commands Program Context Set 446 ...

Страница 471: ...ev 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_...

Страница 472: ...ile 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 for...

Страница 473: ...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...

Страница 474: ...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 12 Debugger Commands Program Find_Source Occurrence 450 ...

Страница 475: ...emoves all previous program symbols removes all previously set breakpoints resets the program counter PC loads the full symbol set loads the executable module New Append Parameters The New parameter loads a new program removing any old program that may have been loaded The New parameter optionally allows you to load the Chapter 12 Debugger Commands Program Load 451 ...

Страница 476: ... The optional root parameter root allows you to specify an alternate name for the root of the symbol tree The base address base_addr allows PC relative code to be shifted upon loading The section list section enables partial loading of absolute file sections i e prog data const etc The symbols for all sections will be reloaded Resetting Program Variables To reset static and global program variable...

Страница 477: ...ile ecs remove all existing program symbols reset the program counter and load the full symbol set Program Load Default ecs To load only the program image of the prog section of absolute file ecs without resetting the program counter Program Load New Code_Only No_Pc_Set ecs prog Chapter 12 Debugger Commands Program Load 453 ...

Страница 478: ...ogram Run or Program Step command to restart execution at the beginning of the program The command does not clear breakpoints 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 12 Debugger Commands Program Pc_Reset 454 ...

Страница 479: ...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 12 Debugger Commands P...

Страница 480: ...n causes the program to run until either line 20 or line 90 is encountered whichever occurs first Note The debugger emulator implements instruction breaks using software breakpoints Therefore break addresses cannot be specified for addresses in target ROM 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...

Страница 481: ...m execution at the current program 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 12 Debugger Commands Program Run 457 ...

Страница 482: ...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...

Страница 483: ...nction 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 instruc...

Страница 484: ...e debugger executes one 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 Progra...

Страница 485: ...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...

Страница 486: ...alue 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 12 Debug...

Страница 487: ...pe is an 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...

Страница 488: ...xed location 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 Als...

Страница 489: ...arge for 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 12 Symbol Add 465 ...

Страница 490: ...mmand displays 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 12 Symbol Browse 466 ...

Страница 491: ...Symbol Display The Symbol Display command displays symbols and associated information in the Journal window Chapter 12 Symbol Display 467 ...

Страница 492: ...bols with 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 m...

Страница 493: ...es in which 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 0000143...

Страница 494: ...ction 00001122 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 s...

Страница 495: ...ngs Root 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 ge...

Страница 496: ...e when a 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 ...

Страница 497: ...mbol alter_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 ...

Страница 498: ...e next program run or step command If no trace has been previously specified this command is equivalent to entering a Trace Trigger Never command and states are collected until you enter a Trace Halt command Example To start a new trace using the last trace specification Trace Again Chapter 12 Trace Again 474 ...

Страница 499: ...command reads the MMU registers and MMU tables and loads the deMMUer with the appropriate information to reverse translate physical addresses to logical addresses The Verbose option shows a list of the physical addresses that can be translated by the deMMUer Enable The Trace deMMUer Enable command turns on the deMMUer Physical addresses on the emulation bus will be translated to logical addresses ...

Страница 500: ...ser Interface User s Guide Examples To translate physical to logical addresses make sure that the MMU has been set up then enter Trace deMMUer Load Verbose Trace deMMUer Enable To stop translating physical to logical addresses enter Trace deMMUer Disable Chapter 12 Trace deMMUer 476 ...

Страница 501: ... Trace Display command displays trace information in the specified window If no window is specified the trace output will go to the Trace Mode window and the debugger willl enter trace mode Chapter 12 Trace Display 477 ...

Страница 502: ...forward in the trace window The F7 function key scrolls the trace list up or down in the Trace Mode window and updates the Code window so that the highlighted line corresponds to the new first line displayed in the Trace Mode window The F8 function key toggles the top line high level module identification on or off to allow an extra line of trace information to be displayed The top line high level...

Страница 503: ...other than the View window The following values are valid window numbers for trace output 1 10 24 28 29 50 256 high level Journal window assembly level Journal window View window log file journal file user defined windows Line s keyword Use the Line s keyword to specify a range of lines to be copied from the trace buffer to the specified window For example to copy lines 110 through 90 from the tra...

Страница 504: ...tion fetches Assembly Displays assembly language instructions Information is displayed symbolically when possible Data Displays address value and read write status for data accesses Information is displayed symbolically when possible Raw Display the frame number address data and status for a bus cycle with no interpretation of the data Displaying status information Status information is displayed ...

Страница 505: ...rt DSACK 16 bit port DSACK 32 bit port Synchronous termination 68030 68EC030 only 68030 MMU tablewalk log phy Tablewalk cycle for 68030 MMU Logical address Physical address Other Berr Rtry bgnd Halt Bus error cycle Retry cycle Background monitor cycle Halt cycle 68020 only Data size Byte Word Long 3byt 1 byte 2 bytes 4 bytes 3 bytes Trace status character When trace data is displayed a trace statu...

Страница 506: ...evel source statement The data field in the trace buffer line does not match the data in memory The trace line may be a prefetch Examples To display source lines their corresponding assembly language instructions and data read and write cycles Trace Display Modules Source Assembly Data To copy the raw data in lines 20 through 20 of the trace buffer to a log file you have opened Trace Display Lines...

Страница 507: ...lear_All command clears removes all specified events that are not used by the trigger or store qualifier See Also Trace Event Delete Examples To clear remove all defined trace events Trace Event Clear_All Chapter 12 Trace Event Clear_All 483 ...

Страница 508: ...s removes a previously defined event specification You cannot delete an event that is used by the trigger or store qualifier See Also Trace Event Clear_All Trace Event Specify Examples To delete event 2 Trace Event Delete 2 Chapter 12 Trace Event Delete 484 ...

Страница 509: ...window The definition includes address data and status The command used to define the event is listed as well as an indication if the event is used by the trigger or qualifier See Also Trace Event Specify Examples To list the definition of event 3 in the View window Trace Event List 3 Chapter 12 Trace Event List 485 ...

Страница 510: ...Trace Event Specify command defines an event detectable bus condition to be used for trace qualifying or triggering The event number event_nmbr must be a number between 1 and 30 inclusive Bus Chapter 12 Trace Event Specify 486 ...

Страница 511: ...event is defined as the specification that follows If you use the keyword Not the event is defined as the logical NOT of the specification that follows that is any condition that does not match the specification For example if you enter the specification Trace Event Specify 1 Tab Address Is 0x10b6 0x123d event 1 is defined to be any address in the range 0x10b6 through 0x123d If you enter the speci...

Страница 512: ... keywords are used to specify the status condition Read specifies read operation Write specifies write operation Size specifies access size byte word or long FnCde specifies function code data or program supervisor or user mode CycTyp specifies cycle type Fetch or CPU Addresses specified witha a CycTyp of Fetch will be masked to the size specified by Debugger Option Trace Fetch_Align See Also Trac...

Страница 513: ...nt 3 to be a write access of variable current_humid Trace Event Specify 3 Tab Address Is current_humid Tab Status Is Write If an 8 bit wide I O port at 0fxxx0010h has a data valid bit at bit 3 you can specify a trace event when the data valid bit is read by entering Trace Event Specify 5 Tab Address Is 0f0000010 0xf000ffff Tab Data Is 0x8 0xff Chapter 12 Trace Event Specify 489 ...

Страница 514: ...ed and whether or not the event is being used specified in a Trace Trigger or Trace StoreQual definition See Also Trace Event Specify Trace Trigger Event Trace StoreQual Event Examples To list the currently defined events and their status used or not used Trace Event Used_List Chapter 12 Trace Event Used_List 490 ...

Страница 515: ...he trace currently being executed If a trace is not in progress this command has no effect After executing this command you can display any trace data collected See Also Trace Again Examples To stop the current trace Trace Halt Chapter 12 Trace Halt 491 ...

Страница 516: ...Trace StoreQual The Trace StoreQual command immediately specifies the bus conditions to be stored captured in the trace buffer Bus conditions may be address values Chapter 12 Trace StoreQual 492 ...

Страница 517: ...ification that follows that is any bus cycles that do not match the specification are stored in the trace buffer For example if you enter the specification Trace StoreQual Address Is 0x10b6 0x123d the storage qualifier is defined to be any address in the range 0x10b6 through 0x123d If you enter the specification Trace StoreQual Address Not 0x10b6 0x123d the storage qualifier is defined to be any a...

Страница 518: ...operly for the address See the description of the Debugger Execution Environment Unrestricted command Status values Status conditions are the types of bus activities you wish to specify The following keywords are used to specify the status condition Read specifies read operation Write specifies write operation Size specifies access size byte word or long FnCde specifies function code data or progr...

Страница 519: ...race Fetch_Align Examples To store accesses to update_state_of_system along with the two bus cycles immediately preceding the accesses Trace StoreQual Address Is update_state_of_system Prestore To store only instruction fetches with an opcode value of 4e5x where x is a don t care value Trace StoreQual Data Is 0x4e50 0xfff0 Tab Status Is CycTyp Fetch The don t care condition is specified by specify...

Страница 520: ... be a single event or a logically OR ed combination of events Prestore Specifying Prestore in your storage qualifier definition causes the trace function to store up to two instruction fetch cycles preceding the qualified condition being stored This lets you view the instructions leading up to the qualified state See Also Trace StoreQual Trace StoreQual List Trace StoreQual None Examples To store ...

Страница 521: ...To store only states matching event 1 or event 2 defined with the Trace Event Specify command Trace StoreQual Event 1 Tab Or 3 Chapter 12 Trace StoreQual Event 497 ...

Страница 522: ...isplays the current storage qualification definition in the View window See Also Trace StoreQual Trace StoreQual event Examples To list the current storage qualification definition in the View window Trace StoreQual List Chapter 12 Trace StoreQual List 498 ...

Страница 523: ...one command causes the trace function to store all bus cycles no trace qualification See Also Trace StoreQual Trace StoreQual event Examples To store all bus cycles no trace qualification Trace StoreQual None Chapter 12 Trace StoreQual None 499 ...

Страница 524: ...Trace Trigger Chapter 12 Trace Trigger 500 ...

Страница 525: ...he specification that follows are used as the trigger event If you use the keyword Not the trigger is defined as the logical NOT of the specification that follows that is any bus cycle that does not match the specification is the trace trigger For example if you enter the specification Trace Trigger Address Is 0x10b6 0x123d the trigger is defined to be any address in the range 0x10b6 through 0x123...

Страница 526: ...rite specifies write operation Size specifies access size byte word or long FnCde specifies function code data or program supervisor or user mode CycTyp specifies cycle type Fetch or CPU Addresses specified witha a CycTyp of Fetch will be masked to the size specified by Debugger Option Trace Fetch_Align Breaking on triggers Enter the BrkOnTrg keyword to cause the user program to halt when the trig...

Страница 527: ...g the current storage qualification You can display the trace after the break occurs to see the cycles leading up to the break See Also Breakpt Access Breakpt Read Breakpt Write Trace Trigger Event Trace Trigger List Trace Trigger None Debugger Option Trace Fetch_Align Examples To trigger the trace measurement on entry into function update_state_of_system and position the trigger state in the cent...

Страница 528: ... ed combination of events a specified number of occurrences of an event or combination of events or a sequence of the preceding conditions The complexity of the specification is limited by the analyzer Event Number Each event that you define using the Trace Event Specify command is assigned an event number between 1 and 30 This number event_nmbr is used to assign an event to be a trigger term Chap...

Страница 529: ...to halt when the trigger term is detected PosnTrig The PosnTrig keyword is used with the Start Center and End keywords to specify the position of the trigger condition in the trace buffer Start The Start keyword specifies the start of the trace buffer as the trigger position Center The Center keyword specifies the center of the trace buffer as the trigger position End The End keyword specifies the...

Страница 530: ...defined with the Trace Event Specify command Trace Trigger Event 1 Tab Or 3 To trigger on the fifth occurrence of event 3 following an occurrence of event 1 events 1 and 3 must have been previously defined with the Trace Event Specify command Trace Trigger Event 1 Tab Then 3 Tab Count 5 Chapter 12 Trace Trigger Event 506 ...

Страница 531: ...mmand displays the current trigger definition in the View window See Also Trace Trigger Trace Trigger List Trace Trigger None Examples To list the current trigger definition in the View window Trace Trigger List Chapter 12 Trace Trigger List 507 ...

Страница 532: ...ace using the Trace Halt command Collection starts on the next program run or step command See Also Trace Halt Examples To collect states continuously until the trace is stopped using the Trace Halt command Trace Trigger Never Collection starts on the next program run or step command Chapter 12 Trace Trigger Never 508 ...

Страница 533: ... The Window 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 12 Window Active 509 ...

Страница 534: ...r Help and 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 12 Window Activ...

Страница 535: ...sition Only 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...

Страница 536: ...windows 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 Wind...

Страница 537: ...fined window 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 W...

Страница 538: ... both the 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...

Страница 539: ... greater 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 Execut...

Страница 540: ...screen with 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 coordina...

Страница 541: ...hout resizing 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 ...

Страница 542: ...s placed 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 12 Window Screen_On 518 ...

Страница 543: ...ndow Typically 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 12 Window Toggle_View 519 ...

Страница 544: ... See Also 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 12 Window Toggle_View 520 ...

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

Страница 546: ...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 13 Expressions and Symbols in Debugger Commands 522 ...

Страница 547: ...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...

Страница 548: ...ft to right Left to right Left to right Left to right Right to left Left to right C Operators 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 Chapter 13 Expressions and Symbols in Debugger Commands Expression Elements 524 ...

Страница 549: ...ymbol Symbol Display Default ecs symbol tree root Identifies a character constant Identifies a character string constant Qualifies a symbol reference For example Program Run Until updateSys 20 Specifies an executable file as the root of a symbol tree The specified file must be loaded into the debugger For example Program Context Set ecs main Constants A constant is a fixed quantity Constants may b...

Страница 550: ...l 0x 0X b B t T h H 2 10 16 0 1 0 9 0 9 A F a f Hexadecimal constants starting with the letters A through F or a through f must be prefixed with a zero Otherwise the debugger attempts to interpret the value as a symbol name By default the debugger interprets integer constants as decimal values To change the radix default to hexadecimal you can use the Debugger Option General Radix Hexadecimal comm...

Страница 551: ...s all floating point constants as double precision 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 ex...

Страница 552: ...n 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 character strings enclosed in single quotation marks Any characters other than those list...

Страница 553: ...he 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 marks null characters are not added ...

Страница 554: ... 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...

Страница 555: ...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 ...

Страница 556: ...ault 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 generate executable code To...

Страница 557: ...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...

Страница 558: ...ing at address 10d0 hex Memory Display Byte 82 0x10d0 To display code as bytes starting at memory location tick_clock and ending at 20 bytes past tick_clock Memory Display Byte tick_clock 20 Chapter 13 Expressions and Symbols in Debugger Commands Addresses 534 ...

Страница 559: ...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 13 Expressions and Symbols in Debugger Commands Keywords 535 ...

Страница 560: ...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...

Страница 561: ...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...

Страница 562: ...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...

Страница 563: ...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...

Страница 564: ...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 ...

Страница 565: ...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...

Страница 566: ...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...

Страница 567: ... 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...

Страница 568: ...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...

Страница 569: ...l references will resolve to the last loaded module Assembly level 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 ...

Страница 570: ... mod1 in the current root Breakpt Instr 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 pr...

Страница 571: ... 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...

Страница 572: ... 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...

Страница 573: ...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...

Страница 574: ...Chapter 13 Expressions and Symbols in Debugger Commands Symbolic Referencing 550 ...

Страница 575: ...14 Reserved Symbols 551 ...

Страница 576: ...r the 68020 030 debugger emulator Symbols identified with an asterisk are used only with the 68030 processor Reserved symbols cannot be deleted by the user Note that reserved symbols may be entered in either upper or lower case characters Chapter 14 Reserved Symbols 552 ...

Страница 577: ...nction name HLPC High Level Program Counter line number 32767 I Interrupt Mask 7 ISP Interrupt Stack Pointer 0xFFFFFFFF M Master Interrupt Flag 1 MMUSR MMU Status Register 68030 only 0xEE47 MODULE Pointer to current module name MSP Master Stack Pointer 0xFFFFFFFF N Negative Flag 1 PC Program Counter 0xFFFFFFFF ROOT Name of root of symbol tree represented by PC S Supervisor State Flag 1 SFC Source ...

Страница 578: ...Reserved Symbols Symbol Meaning Maximum Value VBR Vector Base Address 0xFFFFFFFF X Extend Flag 1 Z Zero Flag 1 Chapter 14 Reserved Symbols 554 ...

Страница 579: ...15 Predefined Macros 555 ...

Страница 580: ...le 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 emul_special hpsimio hp_redirect hpnosimio hpioctl hpeofkbd hpioreport h...

Страница 581: ...a user window 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 Pass a command to the emulator terminal interface Read from a system file Get the register value using the register name in the string Show the software v...

Страница 582: ...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...

Страница 583: ...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 15 Predefined Macros break_info 559 ...

Страница 584: ...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 15 Predefined Macros byte 560 ...

Страница 585: ...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...

Страница 586: ...terfaces that are currently supported are Emul Emulator analyzer interface If several emulator interfaces are sharing the emulator the command will be forwarded to the most recently started interface Perf Software Performance Analyzer BMS Broadcast Message Server the Softbench Gateway Debug Debugger This sends a command back to the debugger you are using If an interface of the type specified is cu...

Страница 587: ...terface compile the following function into your target program void send_command ui cmd char ui cmd return Then set a breakpoint with a macro call Breakpoint Instr send_command ENTRY cmd_forward ui cmd When execution reaches the first statement in send_command the command cmd will be sent to user interface ui Execution will halt if ui was not attached and will continue otherwise Chapter 15 Predef...

Страница 588: ...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 15 Predefined Macros dword 564 ...

Страница 589: ...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 ...

Страница 590: ...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 15 Predefined Macros fgetc 566 ...

Страница 591: ...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 ...

Страница 592: ...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 15 Predefined Macros key_get 568 ...

Страница 593: ..._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 15 Predefined Macros key_stat 569 ...

Страница 594: ...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 15 Predefined Macros memchr 570 ...

Страница 595: ... 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 15 Predefined Macros memclr 571 ...

Страница 596: ...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 15 Predefined Macros memcpy 572 ...

Страница 597: ...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 15 Predefined Macros memset 573 ...

Страница 598: ... 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...

Страница 599: ...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 15 Predefined Macros open 575 ...

Страница 600: ...r diagnostic purposes Use of this macro to send terminal interface commands that change the state of the emulator or analyzer may produce unexpected and UNSUPPORTED behavior Diagnostics If the command produces no error this macro returns a one 1 Otherwise the macro returns a zero 0 and the debugger displays the error or errors in the debugger error window Make sure that the response string is larg...

Страница 601: ...sp 100 Debugger Macro Call pod_command ver resp Expression Printf s resp To send the emulator help command and ignore output Debugger Macro Call pod_command help 0 To send an invalid command to the emulator Debugger Macro Call pod_command silly 0 Chapter 15 Predefined Macros pod_command 577 ...

Страница 602: ... 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 ...

Страница 603: ...cs 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 To display the value of register D1 Expression Display_Value reg_str D1 To displ...

Страница 604: ...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 15 Predefined Macros showversion 580 ...

Страница 605: ...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 15 Predefined Macros strcat 581 ...

Страница 606: ...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 15 Predefined Macros strchr 582 ...

Страница 607: ...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...

Страница 608: ...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 15 Predefined Macros strcpy 584 ...

Страница 609: ... 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...

Страница 610: ...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 15 Predefined Macros strlen 586 ...

Страница 611: ...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...

Страница 612: ...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 ...

Страница 613: ...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 ...

Страница 614: ...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 15 Predefined Macros word 590 ...

Страница 615: ...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 ...

Страница 616: ...Chapter 15 Predefined Macros write 592 ...

Страница 617: ...16 Debugger Error Messages A list of the error messages generated by the debugger 593 ...

Страница 618: ...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 16 Debugger Error Messages 594 ...

Страница 619: ...ption for the command and enter the command again with the correct argument specification 8 Invalid argument expected 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 cha...

Страница 620: ... 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...

Страница 621: ...and 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 bound m...

Страница 622: ... 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...

Страница 623: ...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 in this mode An expression was used for a code address in high level mode Only a single line number or func...

Страница 624: ...rror 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 specify an invalid address value 63 Line numbers from different modules Line numbers from different modules...

Страница 625: ... 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 command without arguments gives a map of Read_Only and Guarded areas 71 Address range conta...

Страница 626: ...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...

Страница 627: ...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 ...

Страница 628: ... 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 ...

Страница 629: ...al already 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 all...

Страница 630: ...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...

Страница 631: ...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 versi...

Страница 632: ...or the log file 137 Cannot open file for logging file in use for logging The 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 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...

Страница 633: ...s 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 commands 149 No temporary breakpoints for the macro The command Program Run From addr macro will return this error because a temporary breakpoint has not been specified 150 Invalid type for this argument expecting a target address The command was expe...

Страница 634: ...nts 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 information on logical expressions and then re enter the command 157 Cannot create log file Unable to open the specified file as a journal file 159 Interrupted during I...

Страница 635: ...17 Debugger Versions Information about how this version of the debugger differs from previous versions 611 ...

Страница 636: ... HP B1476 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 rather than at func1 the local variables in func1 will be active ROOT is the name of the root of the symbol tree represented by the program counter FILE is the name of the file containing the cu...

Страница 637: ...w supports C name mangling de mangling and object instance breakpoints for the Microtec Research Inc C compiler Simulated Interrupts Removed The debugger emulator no longer supports simulated interrupts Simulated I O Changes The debugger emulator s simulated I O features are now compatible with the emulation interface s simulated I O Simulated I O now requires the setting up of simulated I O polli...

Страница 638: ...Chapter 17 Debugger Versions 614 ...

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

Страница 640: ...Part 5 616 ...

Страница 641: ...18 Installation How to install the debugger software on your computer 617 ...

Страница 642: ...terfaces is running on the host computer the debugger emulator 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 emulator also has a standard interface for several types of terminals terminal emulators and bitmapped displays When using the standard ...

Страница 643: ...u do not need the filesets for the 68030 these filesets have the 64747 prefix Likewise if you are using only the 68030 you do not need to install the filesets for the 68020 64748 prefix Emulator Analyzer Compatibility If you are using both the debugger s graphical interface and the emulator analyzer interface check that you have an up to date version of the emulator analyzer software Your emulator...

Страница 644: ...ation 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 The debugge...

Страница 645: ...interface In this case you should exclude the filesets that contain the graphical interface because You will save about 3 5 megabytes of disk space If you are using X Windows the graphical interface is the default interface If you load the graphical interface but do not use it you will have to use a special command line option each time you start the standard interface The following sub steps assu...

Страница 646: ...tions with y to confirm that you want these partitions loaded Do not mark B1471 with y if you marked it with n in the last step The debugger emulator partition will be named something like 68020 030 Series debugger emulator 8 If you plan to install and use the debugger s graphical interface do the following Mark the debugger emulator partition and the 64700 Operating Environment partition with y t...

Страница 647: ...UI fileset with n to exclude it from installation Mark all other filesets in the partition with y to confirm installation Return to the partition screen 10 From the partition screen choose the update utility softkey that starts the installation process Chapter 18 Installation To install software on an HP 9000 system 623 ...

Страница 648: ... 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 installing the IPC facilit...

Страница 649: ...dard Interface map your function keys by following the steps below 1 Copy the function key definitions by typing cp HP64000 etc ttyswrc ttyswrc This creates key mappings 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...

Страница 650: ...v KEYMAP sun 2 9 If you use xterm windows the xterm window program is located in the directory 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 18 Installation To install the software on a Sun SPARCsystem 626 ...

Страница 651: ...e communication channel Turn to the HP 64700 Series Installation Service Guide and follow the instructions for configuring the emulator to communicate via LAN RS 422 or RS 232 RS 422 and RS 232 are only supported on HP 9000 Series 300 400 machines 3 Connect the HP64700 to your host computer Turn to the HP 64700 Series Installation Service Guide and follow the instructions for connecting the emulat...

Страница 652: ...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...

Страница 653: ...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...

Страница 654: ...t 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 Also you should modify the PAT...

Страница 655: ...ou installed the software in the directory users team enter export HP64000 users team usr hp64000 For example to cause the debugger to first search the directory users proj src then the directory users proj mysrc and finally the location of the source files recorded in the absolute file export HP64_DEBUG_PATH users proj src users proj mysrc The character included in the path causes the debugger to...

Страница 656: ...ant to address If you find the emulator listed in the file note its name If the emulator is not listed you must modify the file see the next page in order for the debugger to access the emulator Examples A typical entry for a 68020 emulator connected to the LAN would appear as follows Channel Logical Processor Remainder of Information for the Channel Type Name Type IP address for LAN connections l...

Страница 657: ...or in the etc hosts file If the emulator is connected using a serial port find out the name of the computer to which the emulator is connected the device file name for the emulator the baud rate of the serial channel and the flow control protocol of the serial channel 3 Edit the usr hp64000 etc 64700tab net file and add a line for the emulator The new line should look like one of the examples give...

Страница 658: ...he etc hosts file If the emulator is connected via a LAN edit the etc hosts file to add a line consisting of the emulator s Internet Address IP Address and name Chapter 18 Installation To set up your software environment 634 ...

Страница 659: ...e in the usr lib X11 app defaults subdirectory by entering ls usr 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 usr lib X11 app defaults HP64_Debug near the end of the file to confirm that the...

Страница 660: ... example maybe you have finished a software development project and you need to make more free space on your hard disk To make removing software easier the installation script creates two files The first file is a list of all of the files installed for a certain product The list is stored by product number in the etc filesets directory The second file is the sysrm script which is stored in the HP6...

Страница 661: ...lay devices supported by the debugger The environment variable TERM is the variable which most UNIX applications such as the debugger use to customize the application for a particular terminal display or window In bin sh and bin ksh the TERM variables setting may be queried by typing echo TERM The term variable is usually set by the login process usually by etc profile See the HP UX System Adminis...

Страница 662: ... On Bit Mapped Displays you may need to set the function keys to user mode by holding down the shift key and then pressing the user key 3 TERM may be set to X hpterm hpterm hp2622 or 2392 see note following this table 4 Supported only on HP 9000 Series 300 computers RS 232 Terminals RS 232 terminals interface to HP UX bymeans of HP 98626 HP 98642 or HP 98629 RS 232 interface cards RS 232 terminals...

Страница 663: ...e primary font hp8 8x16 because the primary and alternate fonts must have the same dimensions Refer to the hpterm manual page for more information Example The following command starts an hpterm window with a primary font of hp8 8x16 and an alternate font of line 8x16 hpterm fn hp8 8x16 fb line 8x16 Bit Mapped Displays Bit mapped displays are listed by the boot up display as ITE Internal Terminal e...

Страница 664: ...t Char Delete Char 1 Roll Down 2 Prev Page 3 Unused Enter CR 0 Command Recall Clear Line DEC Terminal Top Row Function Keys F6 F7 F8 F9 F10 F11 ESC F12 BS F13 LF F14 Softkey F1 Softkey F2 Softkey F3 Softkey F4 Softkey F4 Softkey F5 Softkey F6 Softkey F7 Softkey F8 Chapter 18 Installation Configuring Terminals for Use with the Debugger 640 ...

Страница 665: ...2 Press the Config Keys key New function labels appear 3 Press the Terminal Config key 4 Use the Tab key to select fields 5 Choose the appropriate options for LocalEcho CapsLock SPOW B InhEolWrp C ReturnDef OFF OFF NO NO c r Chapter 18 Installation Configuring Terminals for Use with the Debugger 641 ...

Страница 666: ... terminal configuration options are user definable Note With bit mapped displays you may need to set the function keys to user mode by holding down the shift key and then pressing the user key Chapter 18 Installation Configuring Terminals for Use with the Debugger 642 ...

Страница 667: ... SET UP B SET UP A 1 Press SET UP to enter the setup menu 2 Press 80 132 COLUMNS to select 80 columns per line The columns per line must be set to 80 3 Press SET UP to exit SET UP A SET UP B 4 Press SET UP to enter the setup menu then press SETUP A B Chapter 18 Installation Configuring Terminals for Use with the Debugger 643 ...

Страница 668: ...e cursor at the SET UP feature to be changed 6 Press TOGGLE 1 0 to select the feature Do this for the four features shown below 7 Press SET UP to exit SET UP B Chapter 18 Installation Configuring Terminals for Use with the Debugger 644 ...

Страница 669: ...ss the Enter key Use the arrow keys to move the cursor to the Columns field This must be set for 80 columns If 80 columns is not the selection displayed press the Enter key Position the cursor at the Auto Wrap field This field must be set to Auto Wrap Position the cursor at the To Directory field Press Enter 3 Position the cursor at the General SET UP field Press Enter Position the cursor at the V...

Страница 670: ...5 Position the cursor at the To Directory field Press Enter At this point if you want to permanently save the selections you have made position the cursor to the Save field and press Enter Otherwise press SET UP to exit the menus and return to the normal operating mode Chapter 18 Installation Configuring Terminals for Use with the Debugger 646 ...

Страница 671: ...Chapter 18 Installation Configuring Terminals for Use with the Debugger 647 ...

Страница 672: ...TERM environment variable for a color bit mapped display top using the HP 98547A driver card export TERM 300h To set the TERM environment variable for a HP 2392 terminal export TERM 2392 To define and export the TERM environment variable for the VT220 terminal export TERM vt220 export TERMINFO usr hp64000 lib terminfo To define and export the TERM environment variable for the VT100 terminal export...

Страница 673: ...nds shown below after you have logged in to the system stty intr c sets intr to CTRL c stty kill u sets clear inputline to CTRL u stty quit sets quit to CTRL stty eof d sets end of file to CTRL d For the HP terminals and bit mapped displays stty erase h sets erase character to backspace For the DEC VT100 and VT220 terminals stty erase sets erase character to delete DEL Chapter 18 Installation Conf...

Страница 674: ...ronment variables are correctly set for the window that you are working in so that the debugger knows what the screen limits are By default hpterm will set the screen limits correctly when a window is created However if you change its size you should execute the command eval usr bin X11 resize from your shell See the man page for resize 1 for details about how this works Chapter 18 Installation Co...

Страница 675: ...ows and columns are not correct for your window you can set them by entering the stty command from your shell For example the command stty rows 40 columns 100 will define a window to be 40 rows by 100 columns 2 Start the debugger and load an executable file You need an executable in order to move windows in the source level screen 3 Move the status windows command line first Start with the high le...

Страница 676: ...mmand to select the alternate view 5 You may want to set the View options of the Stdio View and Breakpoint windows to On the windows swap by default See the command description for the debugger Option View command for details 6 Save your changes by executing the File Startup command For example the command File Startup YourNameHere will create a startup file named YourNameHere rc You can then use ...

Страница 677: ...ng 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 release a mouse button The term comes from the fact that pressing and releasing the buttons of most mice makes a clicking sound command file An ASCII file...

Страница 678: ...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...

Страница 679: ...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 the debugger s journal window log file A command file that is created by the debugger when you record commands macro A C ...

Страница 680: ...iately 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 resource specifications for a particular group of resources for example for a particular type of disp...

Страница 681: ...s state file A file that contains the CPU state including register values and a memory image This file is saved within a debugger session and can be loaded at a later time to return to a particular state of execution status line A line which displays debugger information such as the CPU type the current module name and the current debugger operation sticky slider A scrollbar slider which is design...

Страница 682: ...s 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 interface between application programs you run on your system and the system input and output devices X window A window on your computer s di...

Страница 683: ... command files 278 with entry buffer 66 67 activating windows 15 active window changing 141 displaying the alternate view of 142 viewing information in 143 144 active window description of 141 add bit mapped displays to HP UX 638 add configured terminals to HP UX 638 add symbol 130 adding an emulator 632 633 Address for read cycles 304 address operator 30 address ranges 533 address registers A0 A7...

Страница 684: ...r macros 223 assembly code in source display 255 assembly level code addresses 533 assembly level screen description of 135 displaying 136 assembly level status window moving 264 attribute options 311 B background monitor 302 305 653 backtrace display of bad stack frames 251 backtrace window backtrace information 155 description of 153 156 frame status characters 154 function name 155 function nes...

Страница 685: ...d 113 command argument 114 description of 113 line number field 114 module function field 113 number field 113 type field 114 breakpoints analysis 105 automatic alignment 250 C 109 110 checking definitions of 112 controlling program execution with 105 115 deleting 25 hardware 105 removing 111 112 setting 21 software 108 use macros with 232 Breakpt Access command 358 359 Breakpt Clear_All command 3...

Страница 686: ...ion 162 this pointer 158 cache address register CAAR 553 cache control register CACR 553 calling a macro 221 carry flag C 553 cascade menu 653 casting special 542 cautions target system could be damaged 297 change active window 141 changing directory context in configuration window 288 character constants 528 character string constants 528 characters non printable 528 check breakpoint definitions ...

Страница 687: ...nds to start 238 logging commands to stop 240 playback 240 command file option 240 245 command files description of 237 246 echoing commands 250 command language address ranges 533 addresses 533 534 assembly level code addresses 533 C operators 523 C operators 524 character constants 528 character string constants 528 code addresses 533 constants 525 data addresses 533 data types 539 debugger oper...

Страница 688: ...31 module names 545 non printable characters 528 operators 523 program symbols 530 referencing symbols 543 register storage classes 539 reserved symbols 532 root names 543 scoping rules 543 special casting 542 stack references 548 static storage classes 538 storage classes 538 symbol length 530 symbolic referencing 538 550 symbolic referencing with explicit roots 546 symbolic referencing without e...

Страница 689: ...n of 79 commands editing in command line entry area 76 77 81 entering 55 57 88 entering from keyboard 79 entering in command line 75 executing in command line 75 function key 57 logging to command file start 238 logging to command file stop 240 playback from command file 240 recalling with command line recall 81 recalling with dialog box 77 comments in macros 222 communication between interfaces 5...

Страница 690: ... configured terminals adding to HP UX 638 configuring terminals for use with debuggers 637 652 constants 525 character 528 character string 528 floating point 527 hexadecimal 526 integer 526 context changing directory in configuration window 288 displaying directory from configuration window 289 control blocking of reads 176 control character functions list of 58 using 58 control program execution...

Страница 691: ...ly symbolic information 97 j journal file 242 l log commands 238 s startup_file 268 debug trace options modifying 320 debugger commands summary of 353 Debugger Directory command 366 Debugger Execution Display_Status command 367 Debugger Execution Environment FwdCmd command 368 Debugger Execution Environment Load_Config command 369 Debugger Execution Environment Modify_Config command 370 Debugger E...

Страница 692: ...race specification 185 Define debugger status 84 define macros 222 225 228 interactively 225 227 define user screens and windows 264 delete all command 314 delete breakpoints 111 112 delete C source lines from your program 212 213 delete macros 236 delete symbol 132 135 delete trace events 194 deleting breakpoints See breakpoints deleting demand load symbols 98 demand loading 252 demand loading of...

Страница 693: ...ndow 142 display area 7 654 lines 274 display area windows See windows display assembly level screen 136 display blocks of memory 49 display command line 32 display help window 82 display high level screen 136 display next screen 137 140 display screens 134 display source code of macros 235 display standard I O screen 137 display user defined screen 265 display variable 27 display variables in the...

Страница 694: ...tatement 224 emul700dmn 654 emulation memory 654 emulation memory installation configurations 310 emulation monitor 654 emulator 124 654 adding 632 configuration 283 285 328 configuration introduction 284 configuring 290 enable one wait state for memory 299 installing 627 memory allocation 294 modifying pod configuration 316 monitor introduction 294 restrict commands 295 restrict to real time run ...

Страница 695: ...ry area 655 entry buffer 7 655 address copy and paste to 64 clearing 63 copy and paste from 66 copy and paste to 63 editing 66 Entry Buffer Value Selection dialog box operation 65 multi window copy and paste from 67 multi window copy and paste to 64 operation 66 recalling entries 65 setting initial value 279 symbol width and copy and paste to 64 text entry 63 with action keys 66 67 with pull down ...

Страница 696: ...e command 400 402 expression elements 523 529 Expression Fprintf command 403 407 Expression Monitor Clear_all command 408 Expression Monitor Delete command 409 Expression Monitor Value command 410 412 using 50 Expression Printf command 413 414 expression strings 537 expressions changing C variables 210 expressions forming 536 extend flag X 554 F fgetc macro 566 file comments in command 239 editing...

Страница 697: ...s 145 source file location 94 startup 267 state 118 119 fill block of memory 216 floating point constants 527 fopen macro 567 foreground monitor 294 302 306 655 types 302 foreground monitor limitations to trace 188 foreground monitor mapping for MC68030 MMU 326 328 fork a UNIX shell 122 forming expressions 536 FPU support 149 frame status character 154 Function code for read cycles 304 function ke...

Страница 698: ...erview 624 hardware breakpoints 105 hardware locking 397 help command line 78 help index 72 to use 35 help index displaying 72 help window description of 82 displaying 82 hexadecimal 252 hexadecimal constants 526 high level program counter HLPC 553 high level screen description of 134 displaying 136 high level status window moving 263 highlighting setting 259 Home Key Functions 144 Host_Shell comm...

Страница 699: ...instance name X resource 333 instruction alignment 392 integer constants 526 interface emulator configuration exiting 289 modifying a section 286 starting 285 interfaces emulator analyzer 124 interpret keyboard reads as EOF 176 interrupt mask I 553 Interrupt priority level for default foreground monitor 304 Interrupt priority level for user foreground monitor 304 interrupt stack pointer presetting...

Страница 700: ...ocessing 175 keyboard key names 10 11 keywords 535 L L indicator character 85 label scheme 272 276 339 LANG environment variable 339 level stack 115 libraries Motif for HP 9000 700 620 line numbers 532 lines in main display area 274 literals radix 252 load programs 95 96 using the db68k command 95 using the program load command 95 load symbols 97 loading and executing programs 89 91 128 locking me...

Страница 701: ...s 531 macro properties 221 macro return statements 224 macro return values 224 macro symbol types 531 macro local symbols 531 macro names 531 macro symbols 531 macro variables 223 macros 219 246 arguments 223 calling 221 calling from an expression 231 calling from within macros 231 calling on execution of a breakpoint 232 calling with debugger macro call command 230 calling with Program Step With_...

Страница 702: ...1 renaming 226 return statement 224 return values 224 saving 222 229 simulated I O 556 stopping execution 235 templates 226 using with breakpoints 232 variables in 223 while statement 224 macros containing debugger commands 224 main displaying 16 make windows active 141 making trace measurements 183 206 master stack pointer MSP 553 master interrupt flag M 553 mcc68k See Microtec memchr macro 570 m...

Страница 703: ...9000 620 SPARCsystem 624 Memory Register command 439 440 Memory Unload_BBA command 441 443 memset macro 573 menu bar 655 menus editing command line with pop up 77 hand pointer means pop up 62 pull down operation with keyboard 61 pull down operation with mouse 59 60 Microtec compiler 93 middle button 9 MMU 85 120 121 295 475 476 68851 not supported 149 enabling in the MC68030 300 MMU mapping tables...

Страница 704: ...lay 259 More prompt 144 Motif HP 9000 700 requirements 620 mouse choosing menu items 59 60 mouse button names 9 11 move assembly level status window 264 move high level status window 263 move status window 263 multi statement debugging 532 multi window copy and paste from entry buffer 67 copy and paste to entry buffer 64 N names of modules identical 544 negative flag N 553 next screen displaying 1...

Страница 705: ...g code See code patching patching source code 210 Paused debugger status 85 PC register 124 PITS cycle 656 platform HP 9000 memory needs 620 HP 9000 minimum performance 620 SPARCsystem memory needs 624 SPARCsystem minimum performance 624 platform differences 10 11 platform scheme 272 340 playback command file 240 pod_command macro 576 577 pointer 656 pointer to current function FUNCTION 553 pointe...

Страница 706: ...word 564 error 565 fgetc 566 fopen 567 key_get 568 key_stat 569 memchr 570 memclr 571 memcpy 572 memset 573 open 574 575 pod_command 576 577 read 578 reg_str 579 showversion 580 strcat 581 strchr 582 strcmp 583 strcpy 584 stricmp 585 strlen 586 strncmp 587 until 588 when 589 word 590 write 591 592 predefined windows 139 printf using in debugger 32 problems simulated I O 181 182 Index 682 ...

Страница 707: ...ion 105 halt on an instruction at a specified memory location 107 program execution controlling 100 104 Program Find_Source Next command 448 Program Find_Source Occurrence command 449 450 Program Load command 451 453 Program Pc_Reset command 454 Program Run command 455 457 Program Step command 458 459 program step over 46 Program Step Over command 460 461 Program Step With_Macro command 462 progra...

Страница 708: ...les 217 read macro 578 Reading debugger status 85 recall buffer 656 initial content 279 recalling commands with command line recall 81 commands with dialog box 77 entry buffer entries 65 redirect I O 177 referencing symbols 543 reformat screens 262 reg_str macro 579 register window description of 152 registers changing 217 218 modifying 124 remote control of intefaces 562 remove breakpoints 111 11...

Страница 709: ...0 resource See X resource See X resources resource X 270 Respond to target system interrupts 317 restart programs 116 117 restrict to real time runs 297 return statement 224 return values in macros 224 root names 543 root symbol 544 RS 232 terminals 638 run from current program counter address 102 run from reset 295 run from start address 102 run programs 100 104 run until stop address 103 S save ...

Страница 710: ...er X 270 332 658 session control commands summary of 353 set control sequences for HP bit mapped displays 649 set keyboard I O mode 175 set keyboard mode to cooked 175 set keyboard mode to raw 175 set up control sequences for HP terminals 649 set up control sequences for vt220 terminals 649 settings 248 shell 655 forking 122 showversion macro 580 simulated I O 656 check resource usage 178 communic...

Страница 711: ...symbols 173 using 171 simulated I O description 171 simulator 657 size scheme 272 339 skid 358 skipping functions 27 slider sticky 657 software installation for SPARCsystems 624 626 software breakpoints 108 defining the vector 321 source code displaying 146 in assembly display 255 patching 210 source files location of 94 source function code SFC 553 SPA 657 SPARCsystems installing software 624 626...

Страница 712: ...aying 137 standard I O window erasing information in 265 standard interface 657 start logging commands to command file 238 start a trace 190 start address run from 102 start debugger 13 14 42 startup file 657 startup file option 268 startup file used displaying 152 startup files 267 loading 268 state file 657 state files 118 119 status entry on status line 84 status line 7 657 status line descript...

Страница 713: ...rage qualification trace measurement 186 storage qualifier 657 storage qualifiers specify 194 195 strcat macro 581 strchr macro 582 strcmp macro 583 strcpy macro 584 stricmp macro 585 strlen macro 586 strncmp macro 587 structures displaying members 161 subroutines See functions subwidows activating 15 SunOS minimum version 624 supervisor stack pointer SSP 553 supervisor state flag S 553 supported ...

Страница 714: ...debugger 531 demand loading 98 252 displaying 131 evaluating 547 keywords 535 legal characters 530 length 530 line numbers 532 loading 97 macro 531 program 530 referencing 543 reserved 532 symbols on demand 530 symbols reserved 551 554 symbols debugger 130 symbols program 130 system requirements HP 9000 overview 620 HP UX minimum version 620 OSF Motif HP 9000 700 requirements 620 SPARCsystem overv...

Страница 715: ...t up control sequences for HP 649 supported 637 TERM settings for 638 token 653 trace 657 bus width 392 timing information 392 trace 0 flag T0 553 trace 1 flag T1 553 Trace background or foreground operation 322 trace commands summary of 357 Trace deMMUer command 475 476 Trace Display command 477 482 trace event 657 Trace Event Clear_All command 483 Trace Event Delete command 484 Trace Event List ...

Страница 716: ...itations 188 limitations when triggering on C variables 188 limitations when triggering on instruction fetches 189 remove storage qualifiers 198 remove triggers 198 specify storage qualifiers 194 195 specify trace events 193 specify triggers 196 start a trace 190 status indicators 86 status values 185 stop a trace 191 storage qualification 186 timing information 260 trace code execution before and...

Страница 717: ...slation Control Register TC 553 Transparent Translation Register 0 TT0 553 Transparent Translation Register 1 TT1 553 trigger 658 TT0 TT1 used to map foreground monitor 1 1 328 tutorials setting up 280 type casting 541 type conversion 541 U unknown module in backtrace window 155 until macro 588 use C type print commands 32 48 use Expression C_Expression command 50 use Expression Monitor Value comm...

Страница 718: ...ector base address VBR 554 Vector number for software breakpoint 1 7 321 version product displaying 152 version numbers 619 view information in the active window 143 144 view window description of 152 viewing text 17 VT100 terminal configuration selections for SET UP A menu 643 configuration selections for SET UP B menu 643 configuring 643 set control sequences for 649 VT220 terminal configuring 6...

Страница 719: ...0 window X 658 windows 139 copying to file 145 active 141 backtrace 115 153 156 breakpoint 113 description of 139 displaying alternate view 142 error 594 help 82 journal 58 journal file 166 log file 166 making active 141 monitor 163 moving 262 predefined 139 register 152 resizing 262 resizing large 651 scrolling 17 setting behavior of 257 stack 140 view 152 working with 139 word macro 590 words ch...

Страница 720: ...d line options 338 commonly modified graphical interface resources 272 Debug BW 339 Debug Color 339 Debug Input 339 Debug Label 339 Debug Large 339 Debug Small 339 defined 332 general form 333 instance name for applications defined 335 instance name for widgets defined 333 loading order 337 modifying resources generally 272 342 RESOURCE_MANAGER property 337 scheme file system directory 339 scheme ...

Страница 721: ...X windows resizing large 650 X windows running on bit mapped displays 639 Z zero flag Z 554 Index 697 ...

Страница 722: ...Index 698 ...

Страница 723: ...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...

Страница 724: ...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...

Отзывы: