~ubuntu-wine/ubuntu/lucid/wine1.2/wine1.2+winepulse

« back to all changes in this revision

Viewing changes to tools/winedump/pe.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-02-02 11:15:03 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100202111503-w4ayji21ei1ginjr
Tags: 1.1.37-0ubuntu1
* New upstream release
  - A number of fixes in AVI file support.
  - Several MSXML improvements.
  - A few MSI fixes.
  - Various bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1095
1095
    unsigned                            i;
1096
1096
    const IMAGE_DEBUG_DIRECTORY*        debugDir;
1097
1097
 
1098
 
    separateDebugHead = PRD(0, sizeof(separateDebugHead));
 
1098
    separateDebugHead = PRD(0, sizeof(*separateDebugHead));
1099
1099
    if (!separateDebugHead) {printf("Can't grab the separate header, aborting\n"); return;}
1100
1100
 
1101
1101
    printf ("Signature:          %.2s (0x%4X)\n",
1560
1560
    if (!pName) {printf("Can't grab functions' name table\n"); return;}
1561
1561
    pOrdl = RVA(exportDir->AddressOfNameOrdinals, exportDir->NumberOfNames * sizeof(WORD));
1562
1562
    if (!pOrdl) {printf("Can't grab functions' ordinal table\n"); return;}
 
1563
    pFunc = RVA(exportDir->AddressOfFunctions, exportDir->NumberOfFunctions * sizeof(DWORD));
 
1564
    if (!pFunc) {printf("Can't grab functions' address table\n"); return;}
1563
1565
 
1564
1566
    /* dll_close(); */
1565
1567
 
1566
1568
    if (!(dll_symbols = malloc((exportDir->NumberOfFunctions + 1) * sizeof(dll_symbol))))
1567
1569
        fatal ("Out of memory");
1568
 
    if (exportDir->AddressOfFunctions != exportDir->NumberOfNames || exportDir->Base > 1)
1569
 
        globals.do_ordinals = 1;
1570
1570
 
1571
1571
    /* bit map of used funcs */
1572
1572
    map = calloc(((exportDir->NumberOfFunctions + 31) & ~31) / 32, sizeof(DWORD));
1581
1581
        dll_symbols[j].ordinal = exportDir->Base + *pOrdl;
1582
1582
        assert(dll_symbols[j].symbol);
1583
1583
    }
1584
 
    pFunc = RVA(exportDir->AddressOfFunctions, exportDir->NumberOfFunctions * sizeof(DWORD));
1585
 
    if (!pFunc) {printf("Can't grab functions' address table\n"); return;}
1586
1584
 
1587
1585
    for (i = 0; i < exportDir->NumberOfFunctions; i++)
1588
1586
    {