找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 4689|回复: 0

DUMPBIN详解

[复制链接]
发表于 2012-3-17 23:04:12 | 显示全部楼层 |阅读模式

下面列出 DUMPBIN 命令行选项。 每个选项提供的输出的一些还列出。

/ ALL 显示除了代码反汇编的所有可用信息。 使用 /DISASM 选项显示反汇编。 您可以使用 /RAWDATA: NONE 与在 ALL 选项可忽略原始二进制文件的详细信息。

因为将 / ALL 选项是只是所有其他选项的组合,则不需要一个示例。

/ ARCHIVEMEMBERS 在库中显示有关成员对象的最少信息。

输出文件的大小取决于库中的对象模块的数量。 下面是从 Scrnsave.lib 文件输出的部分:Archive member name at 582: /0        ..\..\common\retail\scrnsave.obj
2FF359CC time/date Thu Jun 29 18:56:28 1995
         uid
         gid
  100666 mode
    214A size
correct header end
                                       


/ DISASM 显示的代码节,如果文件中使用符号的反汇编。

以下是从 lib.exe 文件在反汇编代码的一部分:00401000: 8B 44 24 08        mov         eax,dword ptr [esp+8]
00401004: 68 00 20 40 00     push        402000h
00401009: 8B 4C 24 08        mov         ecx,dword ptr [esp+8]
0040100D: 50                 push        eax
0040100E: 51                 push        ecx
0040100F: E8 0C 00 00 00     call        00401020
00401014: 33 C0              xor         eax,eax
00401016: C3                 ret
00401017: CC                 int         3
                                       


/ EXPORTS 显示从可执行文件或 DLL 导出的所有定义。

MFC40.DLL 产生以下导出信息:

部分包含以下导出 MFC40.DLL          0 characteristics
   30733286 time date stamp Wed Oct 04 18:19:02 1995
       0.00 version
          1 ordinal base
       5782 number of functions
          4 number of names

ordinal hint   name

      2    0   DllCanUnloadNow  (00096182)
      1    1   DllGetClassObject  (0009611E)
      3    2   DllRegisterServer  (000961DB)
      4    3   DllUnregisterServer  (00096242)
                                       


/ FPO 显示框架指针优化 (FPO) 记录。

MFC 库,Nafxis.lib,之一提供我们框架指针优化记录的一些示例:FPO Data (1)
                                       Use Has  Frame
Address  Proc Size   Locals   Prolog  BP  SEH  Type   Params
00000000          9        0        0   N   N    fpo        0

FPO Data (1)
                                       Use Has  Frame
Address  Proc Size   Locals   Prolog  BP  SEH  Type   Params
00000000         11        0        0   N   N    fpo        C

FPO Data (1)
                                       Use Has  Frame
Address  Proc Size   Locals   Prolog  BP  SEH  Type   Params
00000000          3        0        0   N   N    fpo        0
                                       


/ HEADERS 显示文件标头和每一节页眉。 使用库时它将显示每个成员对象头。

此信息显示从该资源编译器 rc.exe:FILE HEADER VALUES
     14C machine (i386)
       6 number of sections
306F7A22 time date stamp Sun Oct 01 22:35:30 1995
       0 file pointer to symbol table
     1D1 number of symbols
      E0 size of optional header
     302 characteristics
            Executable
            32 bit word machine
            Debug information stripped

OPTIONAL HEADER VALUES
     10B magic #
    2.60 linker version
    1E00 size of code
    1E00 size of initialized data
       0 size of uninitialized data
    1144 address of entry point
    1000 base of code
    3000 base of data
         ----- new -----
2BB0000 image base
    1000 section alignment
     200 file alignment
       3 subsystem (Windows CUI)
    4.00 operating system version
    4.00 image version
    3.50 subsystem version
    8000 size of image
     400 size of headers
    62C8 checksum
  100000 size of stack reserve
    1000 size of stack commit
  100000 size of heap reserve
    1000 size of heap commit
       0 [       0] address [size] of Export Directory
    5000 [      3C] address [size] of Import Directory
    6000 [     394] address [size] of Resource Directory
       0 [       0] address [size] of Exception Directory
       0 [       0] address [size] of Security Directory
    7000 [     21C] address [size] of Base Relocation Directory
    3030 [      38] address [size] of Debug Directory
       0 [       0] address [size] of Description Directory
       0 [       0] address [size] of Special Directory
       0 [       0] address [size] of Thread Storage Directory
       0 [       0] address [size] of Load Configuration Directory
     268 [      44] address [size] of Bound Import Directory
    50A0 [      64] address [size] of Import Address Table Directory
       0 [       0] address [size] of Reserved Directory
       0 [       0] address [size] of Reserved Directory
       0 [       0] address [size] of Reserved Directory

SECTION HEADER #1
   .text name
    1D24 virtual size
    1000 virtual address
    1E00 size of raw data
     400 file pointer to raw data
       0 file pointer to relocation table
    3C20 file pointer to line numbers
       0 number of relocations
     37E number of line numbers
60000020 flags
         Code
         (no align specified)
         Execute Read
                                       


/ IMPORTS 显示导入到可执行文件或 DLL 的所有定义。

此处显示输出的是类似于 /EXPORTS 输出。

/ LINENUMBERS 显示 COFF 行号。 如果它已编译与程序数据库 (/ Zi) C 7 兼容对象文件中存在行号 (/ Z7),或行号仅 (/zd) 开关。 可执行文件或 DLL 如果生成调试信息的链接包含 COFF 行号 (/ DEBUG) 和 COFF 格式 (/ DEBUGTYPE:COFF) 选项。

使用应用程序向导生成的应用程序显示如下的行信息数据:LINENUMBERS #1
   1E90   13     1ECD   13     1EF7   13     1F16   13     1F31   15
   1F46   15     1F61   24     1F9A   27     1FD0   2A     2001   2B
                                       


/ LINKERMEMBER [: {1|2}] 显示在库中定义的公共符号。 指定要在对象顺序与它们的偏移量中显示符号 1 参数。 指定 2 参数来显示偏移量和对象的索引号,然后列出按一起为每个对象索引之类的字母顺序排列这些符号。 若要获取两个输出,请不 number 参数中指定 /LINKERMEMBER。

Winmmm.lib,Windows 多媒体库用于获取的 DUMPBIN 输出下面的示例。Archive member name at 8: /
2FB537E1 time/date Sat May 13 15:51:13 1995
         uid
         gid
       0 mode
    2864 size
correct header end

    391 public symbols

     556C _CloseDriver@12
     58A0 _DefDriverProc@20
     5BDC _DriverCallback@28
     5F1C _DrvGetModuleHandle@4
     626A _GetDriverModuleHandle@4
     65C4 _NotifyCallbackData@20
     6914 _OpenDriver@12
     6C44 _PlaySound@12
     6F70 _PlaySoundA@12
     72A0 _PlaySoundW@12
                                       


/ OUT: 文件名 指定输出文件名。 默认,DUMPBIN 显示到标准输出的信息。

/ RAWDATA [: {BYTES|SHORTS|LONGS|NONE} [,数字]] 显示每个部分的原始内容文件中。 参数控制在的显示的格式,如下所示:

Argument    Result

BYTES      The default. Contents are displayed in hexadecimal bytes,
           and also as ASCII characters if they have a printed
           representation.
SHORTS     Contents are displayed as hexadecimal words.
LONGS      Contents are displayed as hexadecimal longwords.
NONE       Raw data is suppressed. This argument is useful to control
           the output of /ALL.
number     Displayed lines are set to a width that holds <number> values
           per line.
                                       

使用此选项生成的信息很大,这是使用在 LONGS 应用程序设置格式的应用程序向导中的输出的一个小示例:RAW DATA #1
00000000  53EC8B55 00A15756 | E9004058 00000000      U[ASCII 239]_SVW[ASCII
237].|X@._...._
00000010  C95B5E5F EC8B55C3 | 5304EC83 4D895756      _^[++U[ASCII
239]_|[ASCII 226]_.SVW[ASCII 235]M_
00000020  3058B8FC 00E90040 | 5F000000 C3C95B5E      n+X0@._.|..._^[++_
                                       


/ RELOCATIONS 显示对象或图像中的任何重定位。

下面从应用程序向导应用程序获取重定位输出的一小部分:BASE RELOCATIONS #6

    1000 virtual address,       B0 SizeOfBlock
       7 HIGHLOW
      22 HIGHLOW
      36 HIGHLOW
      67 HIGHLOW
      89 HIGHLOW
                                       


/ SECTION: 部分 将输出限制指定节的信息。

/ 概要 显示部分,包括总大小的最少信息。 如果未不指定任何其他选项,那么,则此选项是默认设置。

Microsoft (R) COFF Binary File Dumper Version 3.00.5270
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

Dump of file tracer.exe

File Type: EXECUTABLE IMAGE

     Summary

        1000 .data
        1000 .idata
        1000 .rdata
        1000 .reloc
        1000 .rsrc
        1000 .text
                                       


/ SYMBOLS 显示 COFF 符号表。 符号表位于所有的对象文件。 只有在与生成调试信息和 COFF 格式选项在调试信息下调试类别上链接的链接才 COFF 符号表显示的图像文件中 (或 /DEBUG 和 /DEBUGTYPE:COFF 选项在命令行上)。

应用程序向导应用程序用于获取下面的示例:COFF SYMBOL TABLE
000 000065D0 SECT5  notype       Static       | .rsrc$02
001 00000011 DEBUG  notype       Filename     | .file
C:\code\test\testView.cpp
004 000041A0 SECT3  notype       Static       | $SG23289
005 00004018 SECT3  notype       Static       | _$S189$S23301
006 00004168 SECT3  notype       Static       | _THIS_FILE$S23282
007 00001E90 SECT1  notype       Static       | .text
Section length  2DE, #relocs   27, #linenums   22
009 00001EE2 SECT1  notype ()    Static       | _$E188
00A 00001EF7 SECT1  notype ()    Static       | _$E187
tag index 0000002E size 0000001F lines 000012DF next function 00000033
00C 000042AC SECT3  notype       Static       | __init_CTestView$S23291
00D 00003998 SECT2  notype       Static       | $T23440
00E 00003978 SECT2  notype       Static       | $T23438
00F 000039C0 SECT2  notype       Static       | $T23447
010 000039A0 SECT2  notype       Static       | $T23446
011 00000021 DEBUG  notype       Filename     | .file
                                       




您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-4-28 04:33 , Processed in 0.012498 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表