Added --dump-all
git-svn-id: svn://svn.cc65.org/cc65/trunk@241 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned long What = 0; /* What should get dumped? */
|
unsigned What = 0; /* What should get dumped? */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,17 +44,18 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define D_HEADER 0x00000001UL /* Dump the header */
|
#define D_HEADER 0x0001U /* Dump the header */
|
||||||
#define D_OPTIONS 0x00000002UL /* Dump the options */
|
#define D_OPTIONS 0x0002U /* Dump the options */
|
||||||
#define D_FILES 0x00000004UL /* Dump source file info */
|
#define D_FILES 0x0004U /* Dump source file info */
|
||||||
#define D_SEGMENTS 0x00000008UL /* Dump segment info */
|
#define D_SEGMENTS 0x0008U /* Dump segment info */
|
||||||
#define D_IMPORTS 0x00000010UL /* Dump imported symbols */
|
#define D_IMPORTS 0x0010U /* Dump imported symbols */
|
||||||
#define D_EXPORTS 0x00000020UL /* Dump exported symbols */
|
#define D_EXPORTS 0x0020U /* Dump exported symbols */
|
||||||
#define D_DBGSYMS 0x00000040UL /* Dump debug 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? */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,13 +71,14 @@ static void Usage (void)
|
|||||||
/* Print usage information and exit */
|
/* Print usage information and exit */
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Usage: %s [options] file\n"
|
"Usage: %s [options] file [options] [file]\n"
|
||||||
"Short options:\n"
|
"Short options:\n"
|
||||||
" -h\t\t\tHelp (this text)\n"
|
" -h\t\t\tHelp (this text)\n"
|
||||||
" -V\t\t\tPrint the version number and exit\n"
|
" -V\t\t\tPrint the version number and exit\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Long options:\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-files\t\tDump the source files\n"
|
||||||
" --dump-header\t\tDump the object file header\n"
|
" --dump-header\t\tDump the object file header\n"
|
||||||
" --dump-imports\tDump imported symbols\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)
|
static void OptDumpExports (const char* Opt, const char* Arg)
|
||||||
/* Dump the exported symbols */
|
/* Dump the exported symbols */
|
||||||
{
|
{
|
||||||
@@ -206,7 +215,7 @@ static void DumpFile (const char* Name)
|
|||||||
if (What & D_EXPORTS) {
|
if (What & D_EXPORTS) {
|
||||||
DumpObjExports (F, 0);
|
DumpObjExports (F, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close the file */
|
/* Close the file */
|
||||||
fclose (F);
|
fclose (F);
|
||||||
@@ -219,6 +228,7 @@ int main (int argc, char* argv [])
|
|||||||
{
|
{
|
||||||
/* Program long options */
|
/* Program long options */
|
||||||
static const LongOpt OptTab[] = {
|
static const LongOpt OptTab[] = {
|
||||||
|
{ "--dump-all", 0, OptDumpAll },
|
||||||
{ "--dump-exports", 0, OptDumpExports },
|
{ "--dump-exports", 0, OptDumpExports },
|
||||||
{ "--dump-files", 0, OptDumpFiles },
|
{ "--dump-files", 0, OptDumpFiles },
|
||||||
{ "--dump-header", 0, OptDumpHeader },
|
{ "--dump-header", 0, OptDumpHeader },
|
||||||
|
|||||||
Reference in New Issue
Block a user