8.3 pic-objdump Utility
The pic-objdump
utility displays information about one or more object
files. The options control what particular information to display. The output can
provide information similar to that of a disassembly listing.
The pic-objdump
utility takes ELF object files as
input. If no object files are listed as arguments, pic-objdump
attempts
to read from the file a.out
.
pic-objdump
is:pic-objdump options OBJFILE...
The OBJFILE…
are the
object files to be examined. When you specify archives, pic-objdump
shows information on each of the member object files.
-g
option when you build the project, then
call the pic-objdump
application with a command similar to the
following.pic-objdump -SD -l a.out > pic.lst
This
will create an pic.lst
listing file from the default compiler output
file, showing the original C source code and line number information in the listing.The long and short forms of options, shown in the following table, as
alternatives, are equivalent. At least one of the following options -a, -d, -D, -f, -g, -h, -H, -i, -r, -S, -t, -V
or -x
must be given.
Option | Function |
---|---|
-a
| If any of the OBJFILE files are archives, display
the archive header information (in a format similar to ls -l ). Besides the information you could
list with xc8-ar tv, pic-objdump -a shows the object file
format of each archive member. |
-b
format
| Specify the target object file format. The option
-b binary , fr example, allows the utility to work
on a raw binary file. |
-d
| Display the assembler mnemonics for the
machine instructions from OBJFILE . This option only
disassembles those sections that are expected to contain
instructions. |
-D
| Like -d , but disassemble the contents of all sections, not just
those expected to contain instructions. |
-f
| Display summary information from the
overall header of each of the OBJFILE files. |
--file-start-context | Specify that when displaying
inter-listed source code/disassembly (assumes -S ) from a file that has not yet been displayed, extend
the context to the start of the file. |
-g
| Display debugging information. This attempts to parse debugging information stored in the file and print it out using a C like syntax. Only certain types of debugging information have been implemented. |
-h
| Display summary information from the
section headers of the object file. Some object file
formats, such as |
-H
| Print a summary of the options to
pic-objdump and exit. |
-i
| Print a list of the object formats and architectures supported and exit. |
-j
name
| Display information only for section
name . |
-l
| Label the display (using debugging
information) with the filename and source line numbers corresponding to
the object code or relocs shown. Only useful with -d, -D or -r . |
-m
arch
| Specify the target architecture. |
-M
options
| Pass target specific information to the
disassembler. The following options are supported:
|
-P ,
| Display object format specific contents |
--prefix-addresses | When disassembling, print the complete address on each line. This is the older disassembly format. |
-r
| Print the relocation entries of the
file. If used with -d or -D , the relocations are printed
interspersed with the disassembly. |
-s
| Display the full contents of any sections requested. |
-S
| Display source code intermixed with
disassembly, if possible. Implies -d . |
--show-raw-insn | When disassembling instructions, print
the instruction in hex, as well as in symbolic form. This is the default
except when --prefix-addresses is
used. |
--no-show-raw-insn | When disassembling instructions, do not
print the instruction bytes. This is the default when --prefix-addresses is used. |
--start-address= address | Start displaying data at the specified
address. This affects the output of the -d, -r
and -s options. |
--stop-address= address | Stop displaying data at the specified
address. This affects the output of the -d,
-r and -s
options. |
-t
| Print the symbol table entries of the file. |
-V
| Print the version number of pic-objdump and exit. |
-w
| Format some lines for output devices that have more than 80 columns. |
-x
| Display all available header
information, including the symbol table and relocation entries. Using
-x is equivalent to specifying all
of -a -f -h -r -t . |
-z
| Normally the disassembly output will skip blocks of zeros. This option directs the disassembler to disassemble those blocks, just like any other data. |