DeBUG
with GDB
<< CONTENTS
>>
FILES MAN PAGES
FILE
Specifying and examining files.
COMMANDS
add-shared-symbol-files
add-symbol-file
cd
core-file
directory
exec-file
file
forward-search
list
load
objectdir
objectload
objectretry
path
pwd
reverse-search
search
section
set extension-language
set gnutarget
sharedlibrary
show gnutarget
symbol-file
add-shared-symbol-files
Load the symbols from shared objects in the dynamic linker's link map.
add-symbol-file
Usage:
add-symbol-file FILE ADDR [-s <SECT> <SECT_ADDR> -s
<SECT> <SECT_ADDR> ...]
Load
the symbols from FILE, assuming FILE has been dynamically loaded.
ADDR is
the starting address of the file's text.
The
optional arguments are section-name section-address pairs and
should
be specified if the data and bss segments are not contiguous
with the text. SECT is a section name to be loaded at SECT_ADDR.
cd
Set working directory to DIR for debugger and program being debugged.
The
change does not take effect for the program being debugged
until the next time it is started.
core-file
Use FILE as core dump for examining memory and registers.
No
arg means have no core file. This command has been superseded by
the
`target
core' and `detach' commands.
directory
Add directory DIR to beginning of search path for source files.
Forget
cached info on source file locations and line positions.
DIR can
also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no
argument, reset the search path to $cdir:$cwd, the default.
exec-file
Use
FILE as program for getting contents of pure memory.
If FILE
cannot be found as specified, your execution directory path
is
searched for a command of that name.
No arg
means have no executable file.
file
Use
FILE as program to be debugged.
It is
read for its symbols, for getting the contents of pure memory,
and it
is the program executed when you use the `run' command.
If FILE
cannot be found as specified, your execution directory path
($PATH)
is searched for a command of that name.
No arg
means to have no executable file and no symbols.
forward-search
Search
for regular expression (see regex(3)) from last line listed.
The
matching line number is also stored as the value of "$_".
list
List
specified function or line.
With no
argument, lists ten more lines after or around previous listing.
"list
-" lists the ten lines before a prrevious ten-line listing.
One
argument specifies a line, and ten lines are listed around that line.
Two
arguments with comma between specify starting and ending lines to list.
Lines
can be specified in these ways
LINENUM, to list around that line in current file,
FILE:LINENUM, to list around that line in that file,
FUNCTION, to list around beginning of that function,
FILE:FUNCTION, to distinguish among like-named static functions.
*ADDRESS, to list around the line containing that address.
With
two args if one is empty it stands for ten lines away from the other
arg.
load
Dynamically load FILE into the running program, and record its symbols
for
access from GDB.
objectdir
Add directory DIR to beginning of search path for object files.
DIR can
also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.
objectload
Force
an object file to be loaded and its debug information
read.
Either the name or the index number reported by
"info
objects" can be provided. If an object has already been
successfully loaded, it will not be loaded again.
objectretry
Retry
loading object files that failed previously. If an
argument is provided, add it to the list of directories searched
for
object files. See "objectdir".
path
Add
directory DIR(s) to beginning of search path for object files.
$cwd in
the path means the current working directory.
This
path is equivalent to the $PATH shell variable. It is a list of
directories, separated by colons. These directories are searched
to find
fully
linked executable files and separately compiled object files as needed.
pwd
Print working directory. This is used for your program as well.
search
Search
for regular expression (see regex(3)) from last line listed.
The
matching line number is also stored as the value of "$_".
section
Change
the base address of section SECTION of the exec file to ADDR.
This
can be used if the exec file does not contain section addresses,
(such
as in the a.out format), or when the addresses specified in the
file itself are wrong. Each section must be changed
separately. The
``info files'' command lists all the sections and their addresses.
set
extension-language
Set
mapping between filename extension and source language.
Usage: set
extension-language .foo bar
set gnutarget
Set the
current BFD target.
Use `set gnutarget auto'
to specify automatic detection.
sharedlibrary
Load
shared object library symbols for files matching REGEXP.
show gnutarget
Show
the current BFD target.
Use `set
gnutarget auto' to specify automatic detection.
symbol-file
Load
symbol table from executable file FILE.
The `file' command can also
load symbol tables, as well as setting the file
to
execute.
HELP
FILE
Muthukumar Kandasamy <[email protected]>