home *** CD-ROM | disk | FTP | other *** search
-
- **********************************************************************
- **********************************************************************
- **********************************************************************
-
- LDebug -- Source level & symbolic debugger for the Lattice C compiler
-
- **********************************************************************
- **********************************************************************
- **********************************************************************
-
- Available from:
-
- SoftCircuits Inc.
- 701 Nw 13th Street, Suite C-4
- Boca Raton, Florida, USA
- 33432
-
- For information call:
- 407-368-7024 9am - 12 noon / 1pm - 5pm Eastern
-
-
-
- Information about LDebug V2.0 demo:
-
- **********************************************************************
- **********************************************************************
- **********************************************************************
-
- This demo lets you see what LDebug V2.0 can do.
-
- It allows you to load your program and trace by individual source line
- or 68000 instruction.
-
- Note: The trace source and trace instruction items may be selected from the
- menu with the mouse or use the command key sequences of <Right Amiga><T>
- or <Right Amiga><I>. The latter is much quicker! In the release
- version of LDebug 2.0 you may also use the function keys to control
- stepping thru the source. The function keys are disabled in the
- demo version.
-
- When you run the demo with the included test program you may get a
- warning from the debugger that the source file has been updated since
- the last link. This is due to the fact that the dates have been changed
- from the copying of the source and executable files and the time of
- the source file is more recent than the time of the executable.
-
-
- Installation:
-
- The program Startit should be placed in the LC: directory that contains your
- compiler and compiler utilities. If you have no LC: directory, you may use
- the cli command ASSIGN to assign LC: to the directory that Startit is in.
- Startit is run by the debugger for communication between the debugger and the
- program being debugged. It is not written to run without LDebug and should
- never be executed by you directly.
-
-
- Note: Programs linked for use with LDebug must be linked WITHOUT the
- SMALLCODE option on Blink versions before 7.2.
- Blink versions prior to 7.2 did not properly combine the HUNK_DEBUG
- hunks in the executable file when SMALLCODE was specified.
-
- LDebug V2.0 works as follows:
-
- All available 'C' source modules compiled with the -d option are loaded
- automatically and their names make-up menu selections under the Source menu
- item. It aquires the source module names from the Hunk_debug blocks in the
- executable program.
-
- Selecting the appropriate source menu item will display the source file with
- line-numbers on the left side. The window title tells what source module is
- being displayed. Clicking on the line number will automatically set a
- breakpoint (and display the address if the breakpoint window is open) and
- highlight the selected line. Double clicking on the source code itself will
- open a window and disassemble the 68000 code that the line of source produces.
- The disassembly also includes the source code lines interspersed with the
- assembly code similar to what OMD does. All known symbols are resolved in the
- disassembly so that it is more meaningful to the user. For example a line may
- look like: JSR _printf.
-
- With the disassembly window open it is interesting to trace by instruction
- and watch the code execution and register updating. When tracing by
- instruction the next instruction to be executed will be outlined just as in
- the source window. As you trace by instruction, you may also note that the
- source window is being updated as the next source line is reached.
-
- Memory may be displayed by entering an address into the Memory gadget in
- the Register display area or entering M ADDRESS | SYMBOLNAME on the
- command line.
-
- LDebug V2.0 allows memory to be edited directly in the memory display
- window. A cursor appears when the user clicks on the desired memory
- location and this indicates that the memory window is in the edit mode.
- The user may then enter either hex digits in the hex display area or ASCII
- characters in the ASCII display area. The actual editing of memory is
- disabled in this demo.
-
- The contents of the 68000 registers may be changed by clicking in the desired
- register gadget and editing the hex number displayed there. It is recommended
- that you have a good understanding of what you are modifying because if not
- careful, you may bring the system down.
-
- When disassembling or displaying memory, any address shown that is out of the
- space of the loaded segments for the program is displayed in workbench color
- #3 (usually orange). This was done so the user knows when he steps past the
- end of the segment.
-
- Breakpoints may be entered by address in the BreakPoint Window. A corresponding
- repeat count may also be entered. Selecting Add from the Breakoint Window will
- add the entered address into the list of breakpoints. Upto 256 breakpoints may
- be entered. Breakpoints in the Source and Disassembly windows are written in
- workbench color #2 (usually black) to inform the user that a breakpoint is set
- there. To delete a breakpoint, click on the Source or Disassembly line that
- has the breakpoint already set or click on its address in the Breakpoint
- Window and then click on Delete. If desired, a repeat count may be specified
- for each breakpoint. This will not stop execution of the users program until
- the breakpoint repeat count has been exhausted. This is handy for loops
- where the user wishes to stop the program when a section of code will be
- executed for say, the 40th time.
-
- The breakpoints that are set from clicking on a line of source may be saved
- to a file. This is very handy for automatically setting them in the next
- debugging session.
-
- Athough you may set breakpoints in the demo, they are of little value since
- the GO! command is disabled. When a window is closed, the debugger remembers
- the size and location so that when it gets opened again, it will hopefully be
- in the desired area on the screen.
-
- *****************************************************************************
-
- To start the debugger, cd to the directory in which the executable program
- to debug and its corresponding 'C' source files are located.
- Then, from cli enter:
-
- 1> LDebugdemo [-sxxxx] filename [arg1] [arg2] [arg3] ... [argN]
-
- The optional -sxxxx sets the size of the debuggers internal
- symbol table to xxxx bytes. (xxxx is a decimal number)
-
- filename is the name of the executable file to debug
-
- If the -sxxxx is not specified, LDebug V2.0 autosizes the symboltable by
- making an initial pass through the executable file.
-
- Included is a sample program to use the debugger demo on. It is composed of
- two modules: Test.c and Module1.c . These were compiled with the -d option
- to put debugging information in them and were linked WITHOUT SMALLCODE.
-
- To debug the program Test, enter the following command:
-
- 1> LDebugdemo Test this is a test
-
- This will debug the program disassem with an argument list of "this is a test"
- passed to the disassem program.
-
- There are several commands currently supported by the command line. They are:
-
- D xxxxxx : Disassembles code at the given address
- where xxxxxx is an address or symbol name.
-
- M xxxxxx : Displays Memory at the given address
- where xxxxxx is an address or symbol name.
-
- G [xxxxxx] : DISABLED IN DEMO
- Go! starts executing code in the program
- being debugged at the optional address or
- symbol name.
-
- T [xx] : DISABLED IN DEMO
- Trace for [xx] number of sourcecode lines.
- If no [xx] given, trace 1 line.
-
- I [xx] : DISABLED IN DEMO
- Trace for [xx] number of 68000 instructions.
- If no [xx] given, trace 1 instruction.
-
- ? SYMBOLNAME[,Nx] : DISABLED IN DEMO
- This prints the value of the given
- SYMBOLNAME (Note: lattice 'c' pre-pends
- "_" to all symbol names generated by the
- compiler). The optional Nx specifies
- the width of the symbol and the printing
- format.
-
- Valid print formats are d,x,c,f,s.
-
- These correspond to decimal, hex, char,
- float and string respectively.
-
- Valid widths are 1,2,4,8.
-
-
- To enter a hexadecimal address on the command line, use the C syntax of
- starting the hex number with "0x".
-
- ******************************************************************************
-