Add detection of IMB and IMBRange SWIs.
[deliverable/binutils-gdb.git] / gdb / maint.c
index 2bec6346f8ec9d293a45847aa98d87e459523870..46e96d9fb602f0a85fbd73bef49b7596013da6e4 100644 (file)
@@ -20,9 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 
 #include "defs.h"
-
-#if MAINTENANCE_CMDS   /* Entire rest of file goes away if not including maint cmds */
-
 #include <ctype.h>
 #include <signal.h>
 #include "command.h"
@@ -41,6 +38,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include <unistd.h>
 #endif
 
+extern void _initialize_maint_cmds PARAMS ((void));
+
 static void maintenance_command PARAMS ((char *, int));
 
 static void maintenance_dump_me PARAMS ((char *, int));
@@ -313,8 +312,11 @@ maintenance_translate_address (arg, from_tty)
       while (isspace (*p)) p++;        /* Skip whitespace */
 
       ALL_OBJFILES (objfile)
-       if (sect = bfd_get_section_by_name (objfile->obfd, arg))
-         break;
+       {
+         sect = bfd_get_section_by_name (objfile->obfd, arg);
+         if (sect != NULL)
+           break;
+       }
 
       if (!sect)
        error ("Unknown section %s.", arg);
@@ -339,12 +341,9 @@ maintenance_translate_address (arg, from_tty)
   return;
 }
 
-#endif /* MAINTENANCE_CMDS */
-
 void
 _initialize_maint_cmds ()
 {
-#if MAINTENANCE_CMDS   /* Entire file goes away if not including maint cmds */
   add_prefix_cmd ("maintenance", class_maintenance, maintenance_command,
                  "Commands for use by GDB maintainers.\n\
 Includes commands to dump specific internal GDB structures in\n\
@@ -442,5 +441,4 @@ When non-zero, this timeout is used instead of waiting forever for a target to\n
 finish a low-level step or continue operation.  If the specified amount of time\n\
 passes without a response from the target, an error occurs.", &setlist),
                     &showlist);
-#endif /* MAINTENANCE_CMDS */
 }
This page took 0.024314 seconds and 4 git commands to generate.