Changeset 70363 in vbox for trunk/src/VBox/Runtime/tools/RTLdrCheckImports.cpp
- Timestamp:
- Dec 27, 2017 5:00:46 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/tools/RTLdrCheckImports.cpp
r70319 r70363 61 61 /** Verbosity level. */ 62 62 unsigned cVerbosity; 63 /** Whether to also list orinals in the export listing. */ 64 bool fListOrdinals; 63 65 } RTCHECKIMPORTSOPTS; 64 66 /** Pointer to the checker options. */ … … 496 498 if (pszSymbol) 497 499 RTPrintf("%s\n", pszSymbol); 498 else500 if (uSymbol != ~(unsigned)0 && (!pszSymbol || ((PCRTCHECKIMPORTSOPTS)pvUser)->fListOrdinals)) 499 501 RTPrintf("#%u\n", uSymbol); 500 502 RT_NOREF(hLdrMod, Value, pvUser); … … 507 509 * 508 510 * @returns IPRT status code. 511 * @param pOpts The check program options. 509 512 * @param pszImage Path to the image. 510 513 */ 511 static int ProduceExportList( const char *pszImage)514 static int ProduceExportList(PCRTCHECKIMPORTSOPTS pOpts, const char *pszImage) 512 515 { 513 516 /* … … 575 578 * The list of exports. 576 579 */ 577 rc = RTLdrEnumSymbols(hLdrMod, 0 /*fFlags*/, NULL, _4M, PrintSymbolForExportList, NULL);580 rc = RTLdrEnumSymbols(hLdrMod, 0 /*fFlags*/, NULL, _4M, PrintSymbolForExportList, (void *)pOpts); 578 581 if (RT_FAILURE(rc)) 579 582 RTMsgError("%s: RTLdrEnumSymbols failed: %Rrc", pszImage, rc); … … 606 609 { "--path", 'p', RTGETOPT_REQ_STRING }, 607 610 { "--export", 'e', RTGETOPT_REQ_STRING }, 611 { "--list-ordinals", 'O', RTGETOPT_REQ_NOTHING }, 608 612 { "--quiet", 'q', RTGETOPT_REQ_NOTHING }, 609 613 { "--verbose", 'v', RTGETOPT_REQ_NOTHING }, … … 632 636 633 637 case 'e': 634 rc = ProduceExportList( ValueUnion.psz);638 rc = ProduceExportList(&Opts, ValueUnion.psz); 635 639 if (RT_FAILURE(rc)) 636 640 rcExit = RTEXITCODE_FAILURE; 641 break; 642 643 case 'O': 644 Opts.fListOrdinals = true; 637 645 break; 638 646 … … 663 671 " -e, --export <image>\n" 664 672 " Write export list for the file to stdout. (Redirect to a .export file.)\n" 673 " -O, --list-ordinals\n" 674 " Whether to list ordinals as well as names in the export list.\n" 665 675 " -q, --quiet\n" 666 676 " Quiet execution.\n"
Note:
See TracChangeset
for help on using the changeset viewer.