Remove gdb_print_host_address
[binutils-gdb.git] / gdb / symmisc.c
index 7e215595cd8347aebde8aa0b3115988b64f4c61b..b5e3ef7acaab4c9ea36cc9afcc40118f9aeaa842 100644 (file)
@@ -113,11 +113,9 @@ static void
 dump_objfile (struct objfile *objfile)
 {
   printf_filtered ("\nObject file %s:  ", objfile_name (objfile));
-  printf_filtered ("Objfile at ");
-  gdb_print_host_address (objfile, gdb_stdout);
-  printf_filtered (", bfd at ");
-  gdb_print_host_address (objfile->obfd, gdb_stdout);
-  printf_filtered (", %d minsyms\n\n",
+  printf_filtered ("Objfile at %s, bfd at %s, %d minsyms\n\n",
+                  host_address_to_string (objfile),
+                  host_address_to_string (objfile->obfd),
                   objfile->per_bfd->minimal_symbol_count);
 
   objfile->dump ();
@@ -129,9 +127,9 @@ dump_objfile (struct objfile *objfile)
        {
          for (symtab *symtab : compunit_filetabs (cu))
            {
-             printf_filtered ("%s at ",
-                              symtab_to_filename_for_display (symtab));
-             gdb_print_host_address (symtab, gdb_stdout);
+             printf_filtered ("%s at %s",
+                              symtab_to_filename_for_display (symtab),
+                              host_address_to_string (symtab));
              if (SYMTAB_OBJFILE (symtab) != objfile)
                printf_filtered (", NOT ON CHAIN!");
              printf_filtered ("\n");
@@ -253,10 +251,9 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile)
   if (SYMTAB_DIRNAME (symtab) != NULL)
     fprintf_filtered (outfile, "Compilation directory is %s\n",
                      SYMTAB_DIRNAME (symtab));
-  fprintf_filtered (outfile, "Read from object file %s (",
-                   objfile_name (objfile));
-  gdb_print_host_address (objfile, outfile);
-  fprintf_filtered (outfile, ")\n");
+  fprintf_filtered (outfile, "Read from object file %s (%s)\n",
+                   objfile_name (objfile),
+                   host_address_to_string (objfile));
   fprintf_filtered (outfile, "Language: %s\n",
                    language_str (symtab->language));
 
@@ -286,14 +283,12 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile)
        {
          b = BLOCKVECTOR_BLOCK (bv, i);
          depth = block_depth (b) * 2;
-         print_spaces (depth, outfile);
-         fprintf_filtered (outfile, "block #%03d, object at ", i);
-         gdb_print_host_address (b, outfile);
+         fprintf_filtered (outfile, "%*sblock #%03d, object at %s",
+                           depth, "", i,
+                           host_address_to_string (b));
          if (BLOCK_SUPERBLOCK (b))
-           {
-             fprintf_filtered (outfile, " under ");
-             gdb_print_host_address (BLOCK_SUPERBLOCK (b), outfile);
-           }
+           fprintf_filtered (outfile, " under %s",
+                             host_address_to_string (BLOCK_SUPERBLOCK (b)));
          /* drow/2002-07-10: We could save the total symbols count
             even if we're using a hashtable, but nothing else but this message
             wants it.  */
@@ -510,7 +505,7 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
   else
     section = NULL;
 
-  print_spaces (depth, outfile);
+  print_spaces_filtered (depth, outfile);
   if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
     {
       fprintf_filtered (outfile, "label %s at ", symbol->print_name ());
@@ -633,16 +628,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
          break;
 
        case LOC_BLOCK:
-         fprintf_filtered (outfile, "block object ");
-         gdb_print_host_address (SYMBOL_BLOCK_VALUE (symbol), outfile);
-         fprintf_filtered (outfile, ", ");
-         fputs_filtered (paddress (gdbarch,
-                                   BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))),
-                         outfile);
-         fprintf_filtered (outfile, "..");
-         fputs_filtered (paddress (gdbarch,
-                                   BLOCK_END (SYMBOL_BLOCK_VALUE (symbol))),
-                         outfile);
+         fprintf_filtered
+           (outfile, "block object %s, %s..%s",
+            host_address_to_string (SYMBOL_BLOCK_VALUE (symbol)),
+            paddress (gdbarch, BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))),
+            paddress (gdbarch, BLOCK_END (SYMBOL_BLOCK_VALUE (symbol))));
          if (section)
            fprintf_filtered (outfile, " section %s",
                              bfd_section_name (section->the_bfd_section));