Dumpbin. exe

Source: Internet
Author: User
When using VC, you can use dumpbin. EXE to get the list of symbols output in a DLL. See the following

Command: dumpbin-Exports cmpnt1.dll
For example:

C:/Windows/system32> dumpbin-Exports msgsvc. dll
Microsoft (r) COFF binary file dumper version 6.00.8447
Copyright (c) Microsoft Corp 1992-1998. All rights reserved.

Dump of file msgsvc. dll

File Type: DLL

Section contains the following exports for msgsvc. dll

0 Characteristics
41107f60 time date stamp Wed Aug 04 14:17:04 2004
0.00 version
1 ordinal Base
2 Number of functions
2 Number of names

Ordinal hint RVA name

1 0 1274abf servicemain
2 1 00004595 svchostpushserviceglobals

Summary

1000. Data
1000. reloc
1000. rsrc
8000. Text

C:/> dumpbin
Microsoft (r) COFF binary file dumper version 6.00.844
Copyright (c) Microsoft Corp 1992-1998. All rights res

Usage: dumpbin [Options] [files]

Options:

/All
/Arch
/Archivemembers
/Dependents
/Directives
/Disasm
/Exports
/FPO
/Headers
/Imports
/Linenumbers
/Linkermember [: {1 | 2}]
/Loadconfig
/Out: Filename
/Pdata
/Rawdata [: {none | bytes | shorts | longs} [, #]
/Relocations
/Section: Name
/Summary
/Symbols

To run dumpbin, use the following syntax:

DUMPBIN [options] files...

Specify one or more binary files and any options required to control information. Dumpbin displays the information to the standard output. You can redirect the output to a file, or use the/out option to specify the file name for the output.

When dumpbin is run on the file but no option is specified, dumpbin displays/summary output.

When you type a commanddumpbinHowever, when there is no other command line input, dumpbin displays usage statements that summarize its options.

Dumpbin Option

/ALL

This option displays all available information except code disassembly. Use/disasm to display disassembly. You can use/rawdata: None together with/all to omit the original binary details of the file.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/ARCHIVEMEMBERS

This option displays the minimum information about database Member objects.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/CLRHEADER file

Here:

File
Image files generated by/CLR.
Remarks

Clrheader displays information about. Net headers used in any hosting program. The output shows the. NET header and the position and size of each section (in bytes ).

File Format spec.doc describes the information in the. NET header. Install file format spec.doc in the tools developers Guide directory.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/DIRECTIVES

This option dumps the. ctictive section generated by the compiler in the image.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/DEPENDENTS

The name of the DLL from which the dump image is imported. Do not dump the imported function name.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/DISASM

This option displays the disassembly of the code segment. If it appears in a file, it uses a symbol.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/EXPORTS

This option displays all definitions exported from an executable file or DLL.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/FPO

This option displays frame Pointer Optimization (FPO) records.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/HEADERS

This option displays the file header and the header of each section. The header of each member object is displayed when used in the database.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/IMPORTS[:file]

This option displays the DLL list imported to an executable file or DLL (static link and delayed loading) and the various imports of each of the above DLL.

OptionalFileThe specification allows you to specify to display only the import of a DLL. For example:

dumpbin /IMPORTS:msvcrt.dll

The output displayed by this option is similar to the/exports output.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/LINENUMBERS

This option displays the coff row number. If the object file is compiled in a program database (/Zi), C7 compatible (/z7), or only by row number (/ZD), it contains the row number. If the executable file or DLL is linked to the generated debugging information (/debug), it contains the coff line number.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/LINKERMEMBER[:{1|2}]

This option displays the public symbols defined in the library. Specify parameter 1 to display the symbols and Their offsets in object order. Specify parameter 2 to display the object offset and index number, and then list these symbols and the object index of each symbol in alphabetical order. To obtain both outputs, specify/linkermember without the numeric parameter.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/LOADCONFIG

This option dumps the image_load_config_directory structure, which is an optional structure that is used by the Windows NT loader and defined in winnt. h.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/OUT:filename

This option specifies the outputFilename. By default, dumpbin displays the information to the standard output.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/PDBPATH[:VERBOSE] filename

Here:

Filename
Find the. dll or. EXE file name that matches the. PDB file.
Verbose (optional)
The report has tried to locate all directories in the. PDB file.
Remarks

/Pdbpath searches for computers in the same path as the debugger to search for. PDB files, and reports which. PDB files (if any) andFilenameCorresponds to the file specified in.

You may encounter problems when using the Visual Studio debugger because the debugger uses the. PDB file for different versions of the debug file.

/Pdbpath searches for the. PDB file in the following path:

  • Check the location where executable files reside.
  • Check the location of the PDB written to the executable file. This is usually the position when the image is linked.
  • Check the search path configured in Visual Studio IDE.
  • Check the path in the environment variables _ nt_symbol_path and _ nt_alt_symbol_path.
  • Check in the Windows directory.
/PDATA

It is only used for the RISC processor.

This option dumps an exception table (. pdata) from an image or object ).

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/RAWDATA[:{1|2|4|8|NONE[,number]]

This option displays the original content of each section in the file. The parameter control display format is as follows:

Parameters Result
1 Default value. The content is displayed in hexadecimal bytes. If the content has a printed representation, it is also displayed as ASCII characters.
2 The content is displayed as a hexadecimal 2-byte value.
4 The content is displayed as a hexadecimal 4-byte value.
8 The content is displayed as the hexadecimal 8-byte value.
None Undisplay raw data. This parameter is useful for controlling/all output.
Number The displayed row is set to haveNumber.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/RELOCATIONS

This option displays any relocation of an object or image.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/SECTION:section

This option limitsSectionThe output of related information.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/SUMMARY

This option displays the minimum information (including the total size) with joints ). If no other options are specified, this option is the default value.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/SYMBOLS

This option displays the coff symbol table. Symbol tables exist in all object files. For an image file, it only contains the coff symbol table when it is linked to/debug.

The following is a description of/Symbols output. You can find additional information about the/Symbols output meaning by reading winnt. H (image_symbol and image_aux_symbol) or coff documents.

Assume that the following sample dump is available:

Dump of file main.objFile Type: COFF OBJECTCOFF    SYMBOL    TABLE000    00000000   DEBUG      notype      Filename      | .file      main.cpp002   000B1FDB   ABS      notype      Static      | @comp.id003   00000000   SECT1      notype      Static      | .drectve      Section length       26, #relocs   0, #linenums    0, checksum 722C964F005   00000000   SECT2      notype      Static      | .text      Section length      23, #relocs      1, #linenums    0, checksum 459FF65F, selection    1 (pick no duplicates)007   00000000   SECT2      notype ()   External      | _main008   00000000   UNDEF      notype ()   External      | ?MyDump@@YAXXZ (void __cdecl MyDump(void))String Table Size = 0x10 bytesSummary      26 .drectve      23 .text

For rows starting with a symbolic number, the following describes the columns containing user-related information:

  • The three digits at the beginning are symbol indexes/numbers.
  • If the third column contains SectXThe symbol is defined in the section of the object file. However, if UNDEF appears, it is not defined in that object and must be parsed elsewhere.
  • The Fifth Column (static, external) indicates whether the symbol is only visible inside the object, or whether it is public (externally visible ). The static symbol _ sym is not linked to the public symbol _ sym. These symbols are two different instances of the function named _ sym.

The last column in the number row is the symbol name (modifier name and unmodifyed name ).

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

/Unwindinfo

Dump the expansion descriptor of the structured exception processing (seh) table in the program image (such as EXE and DLL. /Unwindinfo is only applicable to IA64 images.

Only the/headers dumpbin option can be used for files generated by the/GL compiler option.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.