1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

Added --dump-all

git-svn-id: svn://svn.cc65.org/cc65/trunk@241 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2000-07-30 21:09:52 +00:00
parent 3eabe5026f
commit 80e1e6f673
3 changed files with 23 additions and 12 deletions

View File

@ -43,7 +43,7 @@
unsigned long What = 0; /* What should get dumped? */
unsigned What = 0; /* What should get dumped? */

View File

@ -44,17 +44,18 @@
#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? */

View File

@ -71,13 +71,14 @@ static void Usage (void)
/* 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"
@ -90,6 +91,14 @@ static void Usage (void)
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 */
{
@ -206,7 +215,7 @@ static void DumpFile (const char* Name)
if (What & D_EXPORTS) {
DumpObjExports (F, 0);
}
}
}
/* Close the file */
fclose (F);
@ -219,6 +228,7 @@ int main (int argc, char* argv [])
{
/* Program long options */
static const LongOpt OptTab[] = {
{ "--dump-all", 0, OptDumpAll },
{ "--dump-exports", 0, OptDumpExports },
{ "--dump-files", 0, OptDumpFiles },
{ "--dump-header", 0, OptDumpHeader },