
Loading Object Code
6-8
6.3
Loading Object Code
In order to debug a program, you must load the program’s object code into
memory. You can do this as you’re invoking the debugger, or you can do it after
you’ve invoked the debugger. (Note that you create an object file by compiling,
assembling, and linking your source files; see Section 1.4,
Preparing Your
Program for Debugging, on page 1-10.)
Loading code while invoking the debugger
You can load an object file when you invoke the debugger (this has the same
effect as using the debugger’s LOAD command). To do this, enter the appro-
priate debugger-invocation command along with the name of the object file.
If you want to load a file’s symbol table only, use the –s option (this has the
same effect as using the debugger’s SLOAD command). To do this, enter the
appropriate debugger-invocation command along with the name of the object
file and specify –s (see page 1-14 for more information).
Loading code after invoking the debugger
After you invoke the debugger, you can use one of three commands to load
object code and/or the symbol table associated with an object file. Use these
commands as described below, or use them from the Load pulldown menu.
load
Use the LOAD command to load both an object file and its associated symbol
table. In effect, the LOAD command performs both a RELOAD and an SLOAD.
The format for this command is:
load
object filename
If you don’t supply an extension, the debugger looks for
filename.out.
reload Use the RELOAD command to load only an object file
without loading its asso-
ciated symbol table. This is useful for reloading a program when memory has
been corrupted. The format for this command is:
reload [
object filename]
If you enter the RELOAD command without specifying a filename, the debug-
ger reloads the file that you loaded last.
sload
Use the SLOAD command to load only a symbol table. The format for this com-
mand is:
sload
object filename
SLOAD is useful in a debugging environment in which the debugger cannot,
or need not, load the object code (for example, if the code is in ROM). SLOAD
clears the existing symbol table before loading the new one but does not
modify memory or set the program entry point.
Summary of Contents for TMS320C6 Series
Page 10: ...x ...
Page 20: ...xx ...
Page 118: ...4 20 ...
Page 144: ...6 16 ...
Page 164: ...7 20 ...
Page 170: ...8 6 ...
Page 284: ...B 18 ...
Page 290: ...C 6 ...