* ns32k-tdep.c (ns32k_call_dummy_words, sizeof_ns32k_call_dummy_words,
[binutils-gdb.git] / gdb / maint.c
index 9e66b09da318fdfbef7bd3a2c789145d74987a86..ddaa390b683b27e2f34090ca364cc33488333936 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for GDB maintenance commands.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Fred Fish at Cygnus Support.
 
@@ -36,6 +36,8 @@
 #include "objfiles.h"
 #include "value.h"
 
+#include "cli/cli-decode.h"
+
 extern void _initialize_maint_cmds (void);
 
 static void maintenance_command (char *, int);
@@ -289,14 +291,14 @@ print_bfd_flags (flagword flags)
 }
 
 static void
-print_section_info (const char *name, flagword flags, 
-                   CORE_ADDR addr, CORE_ADDR endaddr, 
-                   unsigned long filepos)
+maint_print_section_info (const char *name, flagword flags, 
+                         CORE_ADDR addr, CORE_ADDR endaddr, 
+                         unsigned long filepos)
 {
   /* FIXME-32x64: Need print_address_numeric with field width.  */
   printf_filtered ("    0x%s", paddr (addr));
   printf_filtered ("->0x%s", paddr (endaddr));
-  printf_filtered (" at 0x%s",
+  printf_filtered (" at %s",
                   local_hex_string_custom ((unsigned long) filepos, "08l"));
   printf_filtered (": %s", name);
   print_bfd_flags (flags);
@@ -319,7 +321,7 @@ print_bfd_section_info (bfd *abfd,
 
       addr = bfd_section_vma (abfd, asect);
       endaddr = addr + bfd_section_size (abfd, asect);
-      print_section_info (name, flags, addr, endaddr, asect->filepos);
+      maint_print_section_info (name, flags, addr, endaddr, asect->filepos);
     }
 }
 
@@ -335,7 +337,7 @@ print_objfile_section_info (bfd *abfd,
       || match_substring (string, name)
       || match_bfd_flags (string, flags))
     {
-      print_section_info (name, flags, asect->addr, asect->endaddr, 
+      maint_print_section_info (name, flags, asect->addr, asect->endaddr, 
                          asect->the_bfd_section->filepos);
     }
 }
@@ -652,7 +654,7 @@ to test internal functions such as the C++ demangler, etc.",
   add_alias_cmd ("i", "info", class_maintenance, 1, &maintenancelist);
 
   add_cmd ("sections", class_maintenance, maintenance_info_sections,
-          "List the BFD sections of the exec and core files. \n
+          "List the BFD sections of the exec and core files. \n\
 Arguments may be any combination of:\n\
        [one or more section names]\n\
        ALLOC LOAD RELOC READONLY CODE DATA ROM CONSTRUCTOR\n\
@@ -790,7 +792,7 @@ passes without a response from the target, an error occurs.", &setlist),
                        "Set internal profiling.\n\
 When enabled GDB is profiled.",
                        &maintenance_set_cmdlist);
-  tmpcmd->function.sfunc = maintenance_set_profile_cmd;
+  set_cmd_sfunc (tmpcmd, maintenance_set_profile_cmd);
   add_show_from_set (tmpcmd, &maintenance_show_cmdlist);
 #endif
 }