static void
dump_objfile PARAMS ((struct objfile *));
-static void
-printobjfiles_command PARAMS ((char *, int));
-
static int
block_depth PARAMS ((struct block *));
static void
print_partial_symbol PARAMS ((struct partial_symbol *, int, char *, FILE *));
-static void
-printpsyms_command PARAMS ((char *, int));
-
static void
print_symbol PARAMS ((struct symbol *, int, FILE *));
-static void
-printsyms_command PARAMS ((char *, int));
-
static void
free_symtab_block PARAMS ((struct objfile *, struct block *));
-static void
-printmsyms_command PARAMS ((char *, int));
\f
/* Free a struct block <- B and all the symbols defined in that block. */
mfree (s -> objfile -> md, (PTR) s);
}
+#if MAINTENANCE_CMDS
+
static void
dump_objfile (objfile)
struct objfile *objfile;
/* FIXME, we need to be able to print the relocation stuff. */
/* This prints some garbage for anything but stabs right now. FIXME. */
- fprintf_filtered (outfile, " Relocate symbols by 0x%x, 0x%x, 0x%x, 0x%x.\n",
- ANOFFSET (psymtab->section_offsets, 0),
- ANOFFSET (psymtab->section_offsets, 1),
- ANOFFSET (psymtab->section_offsets, 2),
- ANOFFSET (psymtab->section_offsets, 3));
+ if (psymtab->section_offsets)
+ fprintf_filtered (outfile, " Relocate symbols by 0x%x, 0x%x, 0x%x, 0x%x.\n",
+ ANOFFSET (psymtab->section_offsets, 0),
+ ANOFFSET (psymtab->section_offsets, 1),
+ ANOFFSET (psymtab->section_offsets, 2),
+ ANOFFSET (psymtab->section_offsets, 3));
fprintf_filtered (outfile, " Symbols cover text addresses 0x%x-0x%x\n",
psymtab -> textlow, psymtab -> texthigh);
fprintf (outfile, " (under 0x%x)", (unsigned int) BLOCK_SUPERBLOCK (b));
if (BLOCK_FUNCTION (b))
fprintf (outfile, " %s", SYMBOL_NAME (BLOCK_FUNCTION (b)));
+ if (BLOCK_GCC_COMPILED(b))
+ fprintf (outfile, " gcc%d compiled", BLOCK_GCC_COMPILED(b));
fputc ('\n', outfile);
blen = BLOCK_NSYMS (b);
for (j = 0; j < blen; j++)
fprintf (outfile, "\n");
}
-static void
-printsyms_command (args, from_tty)
+void
+maintenance_print_symbols (args, from_tty)
char *args;
int from_tty;
{
if (args == NULL)
{
- error ("printsyms takes an output file name and optional symbol file name");
+ error ("print-symbols takes an output file name and optional symbol file name");
}
else if ((argv = buildargv (args)) == NULL)
{
{
if (TYPE_NAME (SYMBOL_TYPE (symbol)))
{
- type_print_1 (SYMBOL_TYPE (symbol), "", outfile, 1, depth);
+ LA_PRINT_TYPE (SYMBOL_TYPE (symbol), "", outfile, 1, depth);
}
else
{
: (TYPE_CODE (SYMBOL_TYPE (symbol)) == TYPE_CODE_STRUCT
? "struct" : "union")),
SYMBOL_NAME (symbol));
- type_print_1 (SYMBOL_TYPE (symbol), "", outfile, 1, depth);
+ LA_PRINT_TYPE (SYMBOL_TYPE (symbol), "", outfile, 1, depth);
}
fprintf (outfile, ";\n");
}
if (SYMBOL_TYPE (symbol))
{
/* Print details of types, except for enums where it's clutter. */
- type_print_1 (SYMBOL_TYPE (symbol), SYMBOL_NAME (symbol), outfile,
- TYPE_CODE (SYMBOL_TYPE (symbol)) != TYPE_CODE_ENUM,
- depth);
+ LA_PRINT_TYPE (SYMBOL_TYPE (symbol), SYMBOL_NAME (symbol), outfile,
+ TYPE_CODE (SYMBOL_TYPE (symbol)) != TYPE_CODE_ENUM,
+ depth);
fprintf (outfile, "; ");
}
else
fprintf (outfile, "\n");
}
-static void
-printpsyms_command (args, from_tty)
+void
+maintenance_print_psymbols (args, from_tty)
char *args;
int from_tty;
{
if (args == NULL)
{
- error ("printpsyms takes an output file name and optional symbol file name");
+ error ("print-psymbols takes an output file name and optional symbol file name");
}
else if ((argv = buildargv (args)) == NULL)
{
}
}
-static void
-printmsyms_command (args, from_tty)
+void
+maintenance_print_msymbols (args, from_tty)
char *args;
int from_tty;
{
if (args == NULL)
{
- error ("printmsyms takes an output file name and optional symbol file name");
+ error ("print-msymbols takes an output file name and optional symbol file name");
}
else if ((argv = buildargv (args)) == NULL)
{
do_cleanups (cleanups);
}
-static void
-printobjfiles_command (ignore, from_tty)
+void
+maintenance_print_objfiles (ignore, from_tty)
char *ignore;
int from_tty;
{
dump_objfile (objfile);
immediate_quit--;
}
+
\f
/* Return the nexting depth of a block within other blocks in its symtab. */
struct block *block;
{
register int i = 0;
- while (block = BLOCK_SUPERBLOCK (block)) i++;
+ while ((block = BLOCK_SUPERBLOCK (block)) != NULL)
+ {
+ i++;
+ }
return i;
}
+#endif /* MAINTENANCE_CMDS */
+
\f
/* Increase the space allocated for LISTP, which is probably
global_psymbol_list or static_psymbol_list. This space will eventually
}
#endif /* DEBUG */
-
-void
-_initialize_symmisc ()
-{
- add_com ("printmsyms", class_obscure, printmsyms_command,
- "Print dump of current minimal symbol definitions to file OUTFILE.\n\
-If a SOURCE file is specified, dump only that file's symbols.");
- add_com ("printpsyms", class_obscure, printpsyms_command,
- "Print dump of current partial symbol definitions to file OUTFILE.\n\
-If a SOURCE file is specified, dump only that file's partial symbols.");
- add_com ("printsyms", class_obscure, printsyms_command,
- "Print dump of current symbol definitions to file OUTFILE.\n\
-If a SOURCE file is specified, dump only that file's symbols.");
- add_com ("printobjfiles", class_obscure, printobjfiles_command,
- "Print dump of current object file definitions.");
-}
-