-#define D_HEADER 0x00000001UL /* Dump the header */
-#define D_OPTIONS 0x00000002UL /* Dump the options */
-#define D_FILES 0x00000004UL /* Dump source file info */
-#define D_SEGMENTS 0x00000008UL /* Dump segment info */
-#define D_IMPORTS 0x00000010UL /* Dump imported symbols */
-#define D_EXPORTS 0x00000020UL /* Dump exported symbols */
-#define D_DBGSYMS 0x00000040UL /* Dump debug symbols */
+#define D_HEADER 0x0001U /* Dump the header */
+#define D_OPTIONS 0x0002U /* Dump the options */
+#define D_FILES 0x0004U /* Dump source file info */
+#define D_SEGMENTS 0x0008U /* Dump segment info */
+#define D_IMPORTS 0x0010U /* Dump imported symbols */
+#define D_EXPORTS 0x0020U /* Dump exported symbols */
+#define D_DBGSYMS 0x0040U /* Dump debug symbols */
+#define D_ALL 0xFFFFU /* Dump anything */
-extern unsigned long What; /* What should get dumped? */
+extern unsigned What; /* What should get dumped? */
/* Print usage information and exit */
{
fprintf (stderr,
- "Usage: %s [options] file\n"
+ "Usage: %s [options] file [options] [file]\n"
"Short options:\n"
" -h\t\t\tHelp (this text)\n"
" -V\t\t\tPrint the version number and exit\n"
"\n"
"Long options:\n"
- " --dump-exports\tDump exported symbols\n"
+ " --dump-all\t\tDump all object file information\n"
+ " --dump-exports\tDump exported symbols\n"
" --dump-files\t\tDump the source files\n"
" --dump-header\t\tDump the object file header\n"
" --dump-imports\tDump imported symbols\n"
+static void OptDumpAll (const char* Opt, const char* Arg)
+/* Dump all object file information */
+{
+ What |= D_ALL;
+}
+
+
+
static void OptDumpExports (const char* Opt, const char* Arg)
/* Dump the exported symbols */
{
if (What & D_EXPORTS) {
DumpObjExports (F, 0);
}
- }
+ }
/* Close the file */
fclose (F);
{
/* Program long options */
static const LongOpt OptTab[] = {
+ { "--dump-all", 0, OptDumpAll },
{ "--dump-exports", 0, OptDumpExports },
{ "--dump-files", 0, OptDumpFiles },
{ "--dump-header", 0, OptDumpHeader },