This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: Replace deprecated_print_address_numeric


Hi,

this patch replaces most occurences of deprecated_print_address_numeric by appropriate methods. It also
gets rid of one current_gdbarch in exec.c. Tested on x86 without regression.

Ok to commit?

ChangeLog:

	* exec.c: #include "arch-utils.h"
	 (print_section_info): Use gdbarch_from_bfd to get at the
	current architecture. Replace current_gdbarch. Fix indention.
	Replace deprecated_print_address_numeric by paddress.
	* Makefile.in (exec.o) Add dependency to arch-utils.h.

* valprint.c (val_print_string): Replace deprecated_print_address_numeric.
* tracepoint.c (trace_mention, scope_info): Likewise.
* symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
(print_symbol, print_partial_symbols, maintenance_info_psymtabs)
(maintenance_check_symtabs): Likewise.
* symfile.c (list_overlays_command): Likewise.
* stack.c (frame_info, print_block_frame_labels): Likewise.
* printcmd.c (print_address, print_address_demangle)
(address_info): Likewise.
* corefile.c (memory_error): Likewise.
* infcmd.c (jump_command): Likewise.
* breakpoint.c (insert_bp_location, describe_other_breakpoints)
(mention, delete_breakpoint): Likewise.
* c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
* dwarf2read.c (dump_die): Likewise.
* ada-valprint.c (ada_val_print_1): Likewise.
* f-valprint.c (f_val_print): Likewise.
* linux-fork.c (info_forks_command): Likewise.
* m32r-com.c (m32r_load_section, m32r_load)
(m32r_upload_command): Likewise.


* ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.



diff -urpN src/gdb/ada-valprint.c dev/gdb/ada-valprint.c
--- src/gdb/ada-valprint.c	2008-01-03 13:30:38.000000000 +0100
+++ dev/gdb/ada-valprint.c	2008-01-11 13:00:20.000000000 +0100
@@ -726,9 +726,9 @@ ada_val_print_1 (struct type *type, cons
               fprintf_filtered (stream, "(");
               type_print (type, "", stream, -1);
               fprintf_filtered (stream, ") ");
-              deprecated_print_address_numeric 
-		(extract_typed_address (valaddr, builtin_type_void_data_ptr),
-                 1, stream);
+	      fputs_filtered (paddress (extract_typed_address
+					(valaddr, builtin_type_void_data_ptr)),
+			      stream);
             }
 	  else
 	    {
diff -urpN src/gdb/breakpoint.c dev/gdb/breakpoint.c
--- src/gdb/breakpoint.c	2008-01-01 23:53:09.000000000 +0100
+++ dev/gdb/breakpoint.c	2008-01-11 12:55:23.000000000 +0100
@@ -998,7 +998,7 @@ Note: automatically using hardware break
 				      bpt->owner->number);
 		  fprintf_filtered (tmp_error_stream, 
 				    "Error accessing memory address ");
-		  deprecated_print_address_numeric (bpt->address, 1, tmp_error_stream);
+		  fputs_filtered (paddress (bpt->address), tmp_error_stream);
 		  fprintf_filtered (tmp_error_stream, ": %s.\n",
 				    safe_strerror (val));
 		}
@@ -3851,7 +3851,7 @@ describe_other_breakpoints (CORE_ADDR pc
 			     : ((others == 1) ? " and" : ""));
 	  }
       printf_filtered (_("also set at pc "));
-      deprecated_print_address_numeric (pc, 1, gdb_stdout);
+      fputs_filtered (paddress (pc), gdb_stdout);
       printf_filtered (".\n");
     }
 }
@@ -4810,7 +4810,7 @@ mention (struct breakpoint *b)
 	  if (addressprint || b->source_file == NULL)
 	    {
 	      printf_filtered (" at ");
-	      deprecated_print_address_numeric (b->loc->address, 1, gdb_stdout);
+	      fputs_filtered (paddress (b->loc->address), gdb_stdout);
 	    }
 	  if (b->source_file)
 	    printf_filtered (": file %s, line %d.",
@@ -6898,7 +6898,8 @@ delete_breakpoint (struct breakpoint *bp
 			{
 			  fprintf_unfiltered (tmp_error_stream, "Cannot insert breakpoint %d.\n", b->number);
 			  fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
-			  deprecated_print_address_numeric (loc2->address, 1, tmp_error_stream);
+			  fputs_filtered (paddress (loc2->address),
+					  tmp_error_stream);
 			  fprintf_filtered (tmp_error_stream, ": %s.\n",
 					    safe_strerror (val));
 			}
diff -urpN src/gdb/corefile.c dev/gdb/corefile.c
--- src/gdb/corefile.c	2008-01-01 23:53:09.000000000 +0100
+++ dev/gdb/corefile.c	2008-01-11 12:52:02.000000000 +0100
@@ -214,12 +214,12 @@ memory_error (int status, CORE_ADDR mema
       /* Actually, address between memaddr and memaddr + len
          was out of bounds. */
       fprintf_unfiltered (tmp_stream, "Cannot access memory at address ");
-      deprecated_print_address_numeric (memaddr, 1, tmp_stream);
+      fputs_filtered (paddress (memaddr), tmp_stream);
     }
   else
     {
       fprintf_filtered (tmp_stream, "Error accessing memory address ");
-      deprecated_print_address_numeric (memaddr, 1, tmp_stream);
+      fputs_filtered (paddress (memaddr), tmp_stream);
       fprintf_filtered (tmp_stream, ": %s.",
 		       safe_strerror (status));
     }
diff -urpN src/gdb/c-valprint.c dev/gdb/c-valprint.c
--- src/gdb/c-valprint.c	2008-01-01 23:53:09.000000000 +0100
+++ dev/gdb/c-valprint.c	2008-01-11 12:58:07.000000000 +0100
@@ -47,7 +47,7 @@ print_function_pointer_address (CORE_ADD
   if (addressprint && func_addr != address)
     {
       fputs_filtered ("@", stream);
-      deprecated_print_address_numeric (address, 1, stream);
+      fputs_filtered (paddress (address), stream);
       fputs_filtered (": ", stream);
     }
   print_address_demangle (func_addr, stream, demangle);
@@ -228,9 +228,7 @@ c_val_print (struct type *type, const gd
 	    }
 
 	  if (addressprint)
-	    {
-	      deprecated_print_address_numeric (addr, 1, stream);
-	    }
+	    fputs_filtered (paddress (addr), stream);
 
 	  /* For a pointer to a textual type, also print the string
 	     pointed to, unless pointer is null.  */
@@ -299,7 +297,7 @@ c_val_print (struct type *type, const gd
 	  CORE_ADDR addr
 	    = extract_typed_address (valaddr + embedded_offset, type);
 	  fprintf_filtered (stream, "@");
-	  deprecated_print_address_numeric (addr, 1, stream);
+	  fputs_filtered (paddress (addr), stream);
 	  if (deref_ref)
 	    fputs_filtered (": ", stream);
 	}
diff -urpN src/gdb/dwarf2read.c dev/gdb/dwarf2read.c
--- src/gdb/dwarf2read.c	2008-01-09 11:01:29.000000000 +0100
+++ dev/gdb/dwarf2read.c	2008-01-11 12:59:05.000000000 +0100
@@ -8934,7 +8934,7 @@ dump_die (struct die_info *die)
 	case DW_FORM_ref_addr:
 	case DW_FORM_addr:
 	  fprintf_unfiltered (gdb_stderr, "address: ");
-	  deprecated_print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr);
+	  fputs_filtered (paddress (DW_ADDR (&die->attrs[i])), gdb_stderr);
 	  break;
 	case DW_FORM_block2:
 	case DW_FORM_block4:
diff -urpN src/gdb/exec.c dev/gdb/exec.c
--- src/gdb/exec.c	2008-01-01 23:53:09.000000000 +0100
+++ dev/gdb/exec.c	2008-01-11 13:15:57.000000000 +0100
@@ -31,6 +31,7 @@
 #include "value.h"
 #include "exec.h"
 #include "observer.h"
+#include "arch-utils.c"
 
 #include <fcntl.h>
 #include "readline/readline.h"
@@ -532,7 +533,7 @@ print_section_info (struct target_ops *t
 {
   struct section_table *p;
   /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64.  */
-  int wid = gdbarch_addr_bit (current_gdbarch) <= 32 ? 8 : 16;
+  int wid = gdbarch_addr_bit (gdbarch_from_bfd (abfd)) <= 32 ? 8 : 16;
 
   printf_filtered ("\t`%s', ", bfd_get_filename (abfd));
   wrap_here ("        ");
@@ -540,8 +541,7 @@ print_section_info (struct target_ops *t
   if (abfd == exec_bfd)
     {
       printf_filtered (_("\tEntry point: "));
-      deprecated_print_address_numeric (bfd_get_start_address (abfd), 1, gdb_stdout);
-      printf_filtered ("\n");
+      fputs_filtered (paddress (bfd_get_start_address (abfd)), gdb_stdout);
     }
   for (p = t->to_sections; p < t->to_sections_end; p++)
     {
diff -urpN src/gdb/f-valprint.c dev/gdb/f-valprint.c
--- src/gdb/f-valprint.c	2008-01-01 23:53:09.000000000 +0100
+++ dev/gdb/f-valprint.c	2008-01-11 13:01:15.000000000 +0100
@@ -407,7 +407,7 @@ f_val_print (struct type *type, const gd
 	    }
 
 	  if (addressprint && format != 's')
-	    deprecated_print_address_numeric (addr, 1, stream);
+	    fputs_filtered (paddress (addr), stream);
 
 	  /* For a pointer to char or unsigned char, also print the string
 	     pointed to, unless pointer is null.  */
@@ -431,7 +431,7 @@ f_val_print (struct type *type, const gd
 	  CORE_ADDR addr
 	    = extract_typed_address (valaddr + embedded_offset, type);
 	  fprintf_filtered (stream, "@");
-	  deprecated_print_address_numeric (addr, 1, stream);
+	  fputs_filtered (paddress (addr), stream);
 	  if (deref_ref)
 	    fputs_filtered (": ", stream);
 	}
diff -urpN src/gdb/infcmd.c dev/gdb/infcmd.c
--- src/gdb/infcmd.c	2008-01-01 23:53:11.000000000 +0100
+++ dev/gdb/infcmd.c	2008-01-11 12:52:51.000000000 +0100
@@ -974,7 +974,7 @@ jump_command (char *arg, int from_tty)
   if (from_tty)
     {
       printf_filtered (_("Continuing at "));
-      deprecated_print_address_numeric (addr, 1, gdb_stdout);
+      fputs_filtered (paddress (addr), gdb_stdout);
       printf_filtered (".\n");
     }
 
diff -urpN src/gdb/linux-fork.c dev/gdb/linux-fork.c
--- src/gdb/linux-fork.c	2008-01-01 23:53:11.000000000 +0100
+++ dev/gdb/linux-fork.c	2008-01-11 13:02:01.000000000 +0100
@@ -468,7 +468,7 @@ info_forks_command (char *arg, int from_
       if (fp->num == 0)
 	printf_filtered (_(" (main process)"));
       printf_filtered (_(" at "));
-      deprecated_print_address_numeric (pc, 1, gdb_stdout);
+      fputs_filtered (paddress (pc), gdb_stdout);
 
       sal = find_pc_line (pc, 0);
       if (sal.symtab)
diff -urpN src/gdb/m32r-rom.c dev/gdb/m32r-rom.c
--- src/gdb/m32r-rom.c	2008-01-01 23:53:11.000000000 +0100
+++ dev/gdb/m32r-rom.c	2008-01-11 13:04:07.000000000 +0100
@@ -87,7 +87,7 @@ m32r_load_section (bfd *abfd, asection *
       printf_filtered ("Loading section %s, size 0x%lx lma ",
 		       bfd_section_name (abfd, s),
 		       (unsigned long) section_size);
-      deprecated_print_address_numeric (section_base, 1, gdb_stdout);
+      fputs_filtered (paddress (section_base), gdb_stdout);
       printf_filtered ("\n");
       gdb_flush (gdb_stdout);
       monitor_printf ("%s mw\r", paddr_nz (section_base));
@@ -146,7 +146,7 @@ m32r_load (char *filename, int from_tty)
 
 	printf_filtered ("Loading section %s, size 0x%lx vma ",
 			 bfd_section_name (abfd, s), section_size);
-	deprecated_print_address_numeric (section_base, 1, gdb_stdout);
+	fputs_filtered (paddress (section_base), gdb_stdout);
 	printf_filtered ("\n");
 	gdb_flush (gdb_stdout);
 	monitor_printf ("%x mw\r", section_base);
@@ -527,7 +527,7 @@ m32r_upload_command (char *args, int fro
 	    printf_filtered ("Loading section %s, size 0x%lx lma ",
 			     bfd_section_name (abfd, s),
 			     (unsigned long) section_size);
-	    deprecated_print_address_numeric (section_base, 1, gdb_stdout);
+	    fputs_filtered (paddress (section_base), gdb_stdout);
 	    printf_filtered ("\n");
 	    gdb_flush (gdb_stdout);
 	  }
diff -urpN src/gdb/Makefile.in dev/gdb/Makefile.in
--- src/gdb/Makefile.in	2008-01-09 11:01:28.000000000 +0100
+++ dev/gdb/Makefile.in	2008-01-10 15:40:42.000000000 +0100
@@ -2087,7 +2087,7 @@ exceptions.o: exceptions.c $(defs_h) $(e
 exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
 	$(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \
 	$(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \
-	$(xcoffsolib_h) $(observer_h)
+	$(xcoffsolib_h) $(observer_h) $(arch_utils_h)
 expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
 	$(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \
 	$(gdb_string_h) $(block_h) $(objfiles_h) $(gdb_assert_h)
diff -urpN src/gdb/printcmd.c dev/gdb/printcmd.c
--- src/gdb/printcmd.c	2008-01-09 17:05:47.000000000 +0100
+++ dev/gdb/printcmd.c	2008-01-11 12:49:57.000000000 +0100
@@ -691,7 +691,7 @@ deprecated_print_address_numeric (CORE_A
 void
 print_address (CORE_ADDR addr, struct ui_file *stream)
 {
-  deprecated_print_address_numeric (addr, 1, stream);
+  fputs_filtered (paddress (addr), stream);
   print_address_symbolic (addr, stream, asm_demangle, " ");
 }
 
@@ -710,7 +710,7 @@ print_address_demangle (CORE_ADDR addr, 
     }
   else if (addressprint)
     {
-      deprecated_print_address_numeric (addr, 1, stream);
+      fputs_filtered (paddress (addr), stream);
       print_address_symbolic (addr, stream, do_demangle, " ");
     }
   else
@@ -1068,14 +1068,14 @@ address_info (char *exp, int from_tty)
 	  fprintf_symbol_filtered (gdb_stdout, exp,
 				   current_language->la_language, DMGL_ANSI);
 	  printf_filtered ("\" is at ");
-	  deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+	  fputs_filtered (paddress (load_addr), gdb_stdout);
 	  printf_filtered (" in a file compiled without debugging");
 	  section = SYMBOL_BFD_SECTION (msymbol);
 	  if (section_is_overlay (section))
 	    {
 	      load_addr = overlay_unmapped_address (load_addr, section);
 	      printf_filtered (",\n -- loaded at ");
-	      deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+	      fputs_filtered (paddress (load_addr), gdb_stdout);
 	      printf_filtered (" in overlay section %s", section->name);
 	    }
 	  printf_filtered (".\n");
@@ -1102,13 +1102,13 @@ address_info (char *exp, int from_tty)
 
     case LOC_LABEL:
       printf_filtered ("a label at address ");
-      deprecated_print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
-			     1, gdb_stdout);
+      fputs_filtered (paddress (load_addr = SYMBOL_VALUE_ADDRESS (sym)),
+		      gdb_stdout);
       if (section_is_overlay (section))
 	{
 	  load_addr = overlay_unmapped_address (load_addr, section);
 	  printf_filtered (",\n -- loaded at ");
-	  deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+	  fputs_filtered (paddress (load_addr), gdb_stdout);
 	  printf_filtered (" in overlay section %s", section->name);
 	}
       break;
@@ -1130,27 +1130,27 @@ address_info (char *exp, int from_tty)
 
     case LOC_STATIC:
       printf_filtered (_("static storage at address "));
-      deprecated_print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
-			     1, gdb_stdout);
+     fputs_filtered (paddress (load_addr = SYMBOL_VALUE_ADDRESS (sym)),
+		     gdb_stdout);
       if (section_is_overlay (section))
 	{
 	  load_addr = overlay_unmapped_address (load_addr, section);
 	  printf_filtered (_(",\n -- loaded at "));
-	  deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+	  fputs_filtered (paddress (load_addr), gdb_stdout);
 	  printf_filtered (_(" in overlay section %s"), section->name);
 	}
       break;
 
     case LOC_INDIRECT:
       printf_filtered (_("external global (indirect addressing), at address *("));
-      deprecated_print_address_numeric (load_addr = SYMBOL_VALUE_ADDRESS (sym),
-			     1, gdb_stdout);
+      fputs_filtered (paddress (load_addr = SYMBOL_VALUE_ADDRESS (sym)),
+		      gdb_stdout);
       printf_filtered (")");
       if (section_is_overlay (section))
 	{
 	  load_addr = overlay_unmapped_address (load_addr, section);
 	  printf_filtered (_(",\n -- loaded at "));
-	  deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+	  fputs_filtered (paddress (load_addr), gdb_stdout);
 	  printf_filtered (_(" in overlay section %s"), section->name);
 	}
       break;
@@ -1198,12 +1198,12 @@ address_info (char *exp, int from_tty)
     case LOC_BLOCK:
       printf_filtered (_("a function at address "));
       load_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
-      deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+      fputs_filtered (paddress (load_addr), gdb_stdout);
       if (section_is_overlay (section))
 	{
 	  load_addr = overlay_unmapped_address (load_addr, section);
 	  printf_filtered (_(",\n -- loaded at "));
-	  deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+	  fputs_filtered (paddress (load_addr), gdb_stdout);
 	  printf_filtered (_(" in overlay section %s"), section->name);
 	}
       break;
@@ -1220,12 +1220,12 @@ address_info (char *exp, int from_tty)
 	    section = SYMBOL_BFD_SECTION (msym);
 	    printf_filtered (_("static storage at address "));
 	    load_addr = SYMBOL_VALUE_ADDRESS (msym);
-	    deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+	    fputs_filtered (paddress (load_addr), gdb_stdout);
 	    if (section_is_overlay (section))
 	      {
 		load_addr = overlay_unmapped_address (load_addr, section);
 		printf_filtered (_(",\n -- loaded at "));
-		deprecated_print_address_numeric (load_addr, 1, gdb_stdout);
+		fputs_filtered (paddress (load_addr), gdb_stdout);
 		printf_filtered (_(" in overlay section %s"), section->name);
 	      }
 	  }
diff -urpN src/gdb/stack.c dev/gdb/stack.c
--- src/gdb/stack.c	2008-01-01 23:53:13.000000000 +0100
+++ dev/gdb/stack.c	2008-01-11 12:14:28.000000000 +0100
@@ -964,10 +964,10 @@ frame_info (char *addr_exp, int from_tty
     {
       printf_filtered (_("Stack frame at "));
     }
-  deprecated_print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
+  fputs_filtered (paddress (get_frame_base (fi)), gdb_stdout);
   printf_filtered (":\n");
   printf_filtered (" %s = ", pc_regname);
-  deprecated_print_address_numeric (get_frame_pc (fi), 1, gdb_stdout);
+  fputs_filtered (paddress (get_frame_pc (fi)), gdb_stdout);
 
   wrap_here ("   ");
   if (funname)
@@ -982,7 +982,7 @@ frame_info (char *addr_exp, int from_tty
   puts_filtered ("; ");
   wrap_here ("    ");
   printf_filtered ("saved %s ", pc_regname);
-  deprecated_print_address_numeric (frame_pc_unwind (fi), 1, gdb_stdout);
+  fputs_filtered (paddress (frame_pc_unwind (fi)), gdb_stdout);
   printf_filtered ("\n");
 
   if (calling_frame_info == NULL)
@@ -998,8 +998,8 @@ frame_info (char *addr_exp, int from_tty
   if (calling_frame_info)
     {
       printf_filtered (" called by frame at ");
-      deprecated_print_address_numeric (get_frame_base (calling_frame_info),
-			     1, gdb_stdout);
+      fputs_filtered (paddress (get_frame_base (calling_frame_info)),
+		      gdb_stdout);
     }
   if (get_next_frame (fi) && calling_frame_info)
     puts_filtered (",");
@@ -1007,8 +1007,8 @@ frame_info (char *addr_exp, int from_tty
   if (get_next_frame (fi))
     {
       printf_filtered (" caller of frame at ");
-      deprecated_print_address_numeric (get_frame_base (get_next_frame (fi)), 1,
-			     gdb_stdout);
+      fputs_filtered (paddress (get_frame_base (get_next_frame (fi))),
+		      gdb_stdout);
     }
   if (get_next_frame (fi) || calling_frame_info)
     puts_filtered ("\n");
@@ -1028,7 +1028,7 @@ frame_info (char *addr_exp, int from_tty
     else
       {
 	printf_filtered (" Arglist at ");
-	deprecated_print_address_numeric (arg_list, 1, gdb_stdout);
+	fputs_filtered (paddress (arg_list), gdb_stdout);
 	printf_filtered (",");
 
 	if (!gdbarch_frame_num_args_p (gdbarch))
@@ -1060,7 +1060,7 @@ frame_info (char *addr_exp, int from_tty
     else
       {
 	printf_filtered (" Locals at ");
-	deprecated_print_address_numeric (arg_list, 1, gdb_stdout);
+	fputs_filtered (paddress (arg_list), gdb_stdout);
 	printf_filtered (",");
       }
   }
@@ -1102,14 +1102,14 @@ frame_info (char *addr_exp, int from_tty
 					   register_size (gdbarch,
 					   gdbarch_sp_regnum (gdbarch)));
 	    printf_filtered (" Previous frame's sp is ");
-	    deprecated_print_address_numeric (sp, 1, gdb_stdout);
+	    fputs_filtered (paddress (sp), gdb_stdout);
 	    printf_filtered ("\n");
 	    need_nl = 0;
 	  }
 	else if (!optimized && lval == lval_memory)
 	  {
 	    printf_filtered (" Previous frame's sp at ");
-	    deprecated_print_address_numeric (addr, 1, gdb_stdout);
+	    fputs_filtered (paddress (addr), gdb_stdout);
 	    printf_filtered ("\n");
 	    need_nl = 0;
 	  }
@@ -1144,7 +1144,7 @@ frame_info (char *addr_exp, int from_tty
 	      wrap_here (" ");
 	      printf_filtered (" %s at ",
 			       gdbarch_register_name (gdbarch, i));
-	      deprecated_print_address_numeric (addr, 1, gdb_stdout);
+	      fputs_filtered (paddress (addr), gdb_stdout);
 	      count++;
 	    }
 	}
@@ -1421,7 +1421,7 @@ print_block_frame_labels (struct block *
 	  if (addressprint)
 	    {
 	      fprintf_filtered (stream, " ");
-	      deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 1, stream);
+	      fputs_filtered (paddress (SYMBOL_VALUE_ADDRESS (sym)), stream);
 	    }
 	  fprintf_filtered (stream, " in file %s, line %d\n",
 			    sal.symtab->filename, sal.line);
diff -urpN src/gdb/symfile.c dev/gdb/symfile.c
--- src/gdb/symfile.c	2008-01-03 05:23:46.000000000 +0100
+++ dev/gdb/symfile.c	2008-01-11 12:08:17.000000000 +0100
@@ -3515,13 +3515,13 @@ list_overlays_command (char *args, int f
 	name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
 
 	printf_filtered ("Section %s, loaded at ", name);
-	deprecated_print_address_numeric (lma, 1, gdb_stdout);
+	fputs_filtered (paddress (lma), gdb_stdout);
 	puts_filtered (" - ");
-	deprecated_print_address_numeric (lma + size, 1, gdb_stdout);
+	fputs_filtered (paddress (lma + size), gdb_stdout);
 	printf_filtered (", mapped at ");
-	deprecated_print_address_numeric (vma, 1, gdb_stdout);
+	fputs_filtered (paddress (vma), gdb_stdout);
 	puts_filtered (" - ");
-	deprecated_print_address_numeric (vma + size, 1, gdb_stdout);
+	fputs_filtered (paddress (vma + size), gdb_stdout);
 	puts_filtered ("\n");
 
 	nmapped++;
diff -urpN src/gdb/symmisc.c dev/gdb/symmisc.c
--- src/gdb/symmisc.c	2008-01-01 23:53:13.000000000 +0100
+++ dev/gdb/symmisc.c	2008-01-11 12:15:01.000000000 +0100
@@ -346,7 +346,7 @@ dump_msymbols (struct objfile *objfile, 
 	  break;
 	}
       fprintf_filtered (outfile, "[%2d] %c ", index, ms_type);
-      deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (msymbol), 1, outfile);
+      fputs_filtered (paddress (SYMBOL_VALUE_ADDRESS (msymbol)), outfile);
       fprintf_filtered (outfile, " %s", DEPRECATED_SYMBOL_NAME (msymbol));
       if (SYMBOL_BFD_SECTION (msymbol))
 	fprintf_filtered (outfile, " section %s",
@@ -400,16 +400,15 @@ dump_psymtab (struct objfile *objfile, s
       if (i != 0)
 	fprintf_filtered (outfile, ", ");
       wrap_here ("    ");
-      deprecated_print_address_numeric (ANOFFSET (psymtab->section_offsets, i),
-			     1,
-			     outfile);
+      fputs_filtered (paddress (ANOFFSET (psymtab->section_offsets, i)),
+		      outfile);
     }
   fprintf_filtered (outfile, "\n");
 
   fprintf_filtered (outfile, "  Symbols cover text addresses ");
-  deprecated_print_address_numeric (psymtab->textlow, 1, outfile);
+  fputs_filtered (paddress (psymtab->textlow), outfile);
   fprintf_filtered (outfile, "-");
-  deprecated_print_address_numeric (psymtab->texthigh, 1, outfile);
+  fputs_filtered (paddress (psymtab->texthigh), outfile);
   fprintf_filtered (outfile, "\n");
   fprintf_filtered (outfile, "  Depends on %d other partial symtabs.\n",
 		    psymtab->number_of_dependencies);
@@ -466,7 +465,7 @@ dump_symtab_1 (struct objfile *objfile, 
       for (i = 0; i < len; i++)
 	{
 	  fprintf_filtered (outfile, " line %d at ", l->item[i].line);
-	  deprecated_print_address_numeric (l->item[i].pc, 1, outfile);
+	  fputs_filtered (paddress (l->item[i].pc), outfile);
 	  fprintf_filtered (outfile, "\n");
 	}
     }
@@ -494,9 +493,9 @@ dump_symtab_1 (struct objfile *objfile, 
 	     wants it.  */
 	  fprintf_filtered (outfile, ", %d syms/buckets in ",
 			    dict_size (BLOCK_DICT (b)));
-	  deprecated_print_address_numeric (BLOCK_START (b), 1, outfile);
+	  fputs_filtered (paddress (BLOCK_START (b)), outfile);
 	  fprintf_filtered (outfile, "..");
-	  deprecated_print_address_numeric (BLOCK_END (b), 1, outfile);
+	  fputs_filtered (paddress (BLOCK_END (b)), outfile);
 	  if (BLOCK_FUNCTION (b))
 	    {
 	      fprintf_filtered (outfile, ", function %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
@@ -609,7 +608,7 @@ print_symbol (void *args)
   if (SYMBOL_DOMAIN (symbol) == LABEL_DOMAIN)
     {
       fprintf_filtered (outfile, "label %s at ", SYMBOL_PRINT_NAME (symbol));
-      deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
+      fputs_filtered (paddress (SYMBOL_VALUE_ADDRESS (symbol)), outfile);
       if (SYMBOL_BFD_SECTION (symbol))
 	fprintf_filtered (outfile, " section %s\n",
 		       bfd_section_name (SYMBOL_BFD_SECTION (symbol)->owner,
@@ -674,7 +673,7 @@ print_symbol (void *args)
 
 	case LOC_STATIC:
 	  fprintf_filtered (outfile, "static at ");
-	  deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
+	  fputs_filtered (paddress (SYMBOL_VALUE_ADDRESS (symbol)), outfile);
 	  if (SYMBOL_BFD_SECTION (symbol))
 	    fprintf_filtered (outfile, " section %s",
 			      bfd_section_name
@@ -684,7 +683,7 @@ print_symbol (void *args)
 
 	case LOC_INDIRECT:
 	  fprintf_filtered (outfile, "extern global at *(");
-	  deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
+	  fputs_filtered (paddress (SYMBOL_VALUE_ADDRESS (symbol)), outfile);
 	  fprintf_filtered (outfile, "),");
 	  break;
 
@@ -734,7 +733,7 @@ print_symbol (void *args)
 
 	case LOC_LABEL:
 	  fprintf_filtered (outfile, "label at ");
-	  deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
+	  fputs_filtered (paddress (SYMBOL_VALUE_ADDRESS (symbol)), outfile);
 	  if (SYMBOL_BFD_SECTION (symbol))
 	    fprintf_filtered (outfile, " section %s",
 			      bfd_section_name
@@ -746,13 +745,11 @@ print_symbol (void *args)
 	  fprintf_filtered (outfile, "block object ");
 	  gdb_print_host_address (SYMBOL_BLOCK_VALUE (symbol), outfile);
 	  fprintf_filtered (outfile, ", ");
-	  deprecated_print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (symbol)),
-				 1,
-				 outfile);
+	  fputs_filtered (paddress (BLOCK_START (SYMBOL_BLOCK_VALUE (symbol))),
+			  outfile);
 	  fprintf_filtered (outfile, "..");
-	  deprecated_print_address_numeric (BLOCK_END (SYMBOL_BLOCK_VALUE (symbol)),
-				 1,
-				 outfile);
+	  fputs_filtered (paddress (BLOCK_END (SYMBOL_BLOCK_VALUE (symbol))),
+			  outfile);
 	  if (SYMBOL_BFD_SECTION (symbol))
 	    fprintf_filtered (outfile, " section %s",
 			      bfd_section_name
@@ -925,7 +922,7 @@ print_partial_symbols (struct partial_sy
 	  break;
 	}
       fputs_filtered (", ", outfile);
-      deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (*p), 1, outfile);
+      fputs_filtered (paddress (SYMBOL_VALUE_ADDRESS (*p)), outfile);
       fprintf_filtered (outfile, "\n");
       p++;
     }
@@ -1088,9 +1085,9 @@ maintenance_info_psymtabs (char *regexp,
             printf_filtered ("    fullname %s\n",
                              psymtab->fullname ? psymtab->fullname : "(null)");
             printf_filtered ("    text addresses ");
-            deprecated_print_address_numeric (psymtab->textlow, 1, gdb_stdout);
+	    fputs_filtered (paddress (psymtab->textlow), gdb_stdout);
             printf_filtered (" -- ");
-            deprecated_print_address_numeric (psymtab->texthigh, 1, gdb_stdout);
+	    fputs_filtered (paddress (psymtab->texthigh), gdb_stdout);
             printf_filtered ("\n");
             printf_filtered ("    globals ");
             if (psymtab->n_global_syms)
@@ -1199,9 +1196,9 @@ maintenance_check_symtabs (char *ignore,
 	printf_filtered ("Psymtab ");
 	puts_filtered (ps->filename);
 	printf_filtered (" covers bad range ");
-	deprecated_print_address_numeric (ps->textlow, 1, gdb_stdout);
+	fputs_filtered (paddress (ps->textlow), gdb_stdout);
 	printf_filtered (" - ");
-	deprecated_print_address_numeric (ps->texthigh, 1, gdb_stdout);
+	fputs_filtered (paddress (ps->texthigh), gdb_stdout);
 	printf_filtered ("\n");
 	continue;
       }
@@ -1212,13 +1209,13 @@ maintenance_check_symtabs (char *ignore,
 	printf_filtered ("Psymtab ");
 	puts_filtered (ps->filename);
 	printf_filtered (" covers ");
-	deprecated_print_address_numeric (ps->textlow, 1, gdb_stdout);
+	fputs_filtered (paddress (ps->textlow), gdb_stdout);
 	printf_filtered (" - ");
-	deprecated_print_address_numeric (ps->texthigh, 1, gdb_stdout);
+	fputs_filtered (paddress (ps->texthigh), gdb_stdout);
 	printf_filtered (" but symtab covers only ");
-	deprecated_print_address_numeric (BLOCK_START (b), 1, gdb_stdout);
+	fputs_filtered (paddress (BLOCK_START (b)), gdb_stdout);
 	printf_filtered (" - ");
-	deprecated_print_address_numeric (BLOCK_END (b), 1, gdb_stdout);
+	fputs_filtered (paddress (BLOCK_END (b)), gdb_stdout);
 	printf_filtered ("\n");
       }
   }
diff -urpN src/gdb/tracepoint.c dev/gdb/tracepoint.c
--- src/gdb/tracepoint.c	2008-01-01 23:53:13.000000000 +0100
+++ dev/gdb/tracepoint.c	2008-01-11 11:42:33.000000000 +0100
@@ -443,7 +443,7 @@ trace_mention (struct tracepoint *tp)
   if (addressprint || (tp->source_file == NULL))
     {
       printf_filtered (" at ");
-      deprecated_print_address_numeric (tp->address, 1, gdb_stdout);
+      printf_filtered ("%s", paddress (tp->address));
     }
   if (tp->source_file)
     printf_filtered (": file %s, line %d.",
@@ -2450,8 +2450,7 @@ scope_info (char *args, int from_tty)
 	      break;
 	    case LOC_STATIC:
 	      printf_filtered ("in static storage at address ");
-	      deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 
-				     1, gdb_stdout);
+	      printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (sym)));
 	      break;
 	    case LOC_REGISTER:
 	      printf_filtered ("a local variable in register $%s",
@@ -2486,13 +2485,11 @@ scope_info (char *args, int from_tty)
 	      continue;
 	    case LOC_LABEL:
 	      printf_filtered ("a label at address ");
-	      deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 
-				     1, gdb_stdout);
+	      printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (sym)));
 	      break;
 	    case LOC_BLOCK:
 	      printf_filtered ("a function at address ");
-	      deprecated_print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
-				     1, gdb_stdout);
+	      printf_filtered ("%s", paddress (BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
 	      break;
 	    case LOC_BASEREG:
 	      printf_filtered ("a variable at offset %ld from register $%s",
@@ -2514,8 +2511,7 @@ scope_info (char *args, int from_tty)
 	      else
 		{
 		  printf_filtered ("static storage at address ");
-		  deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (msym), 1,
-					 gdb_stdout);
+		  printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (msym)));
 		}
 	      break;
 	    case LOC_OPTIMIZED_OUT:
@@ -2526,8 +2522,7 @@ scope_info (char *args, int from_tty)
 	      break;
 	    case LOC_INDIRECT:
 	      printf_filtered ("extern (local indirect) at address ");
-	      deprecated_print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 
-				     1, gdb_stdout);
+	      printf_filtered ("%s", paddress (SYMBOL_VALUE_ADDRESS (sym)));
 	      break;
 	    case LOC_COMPUTED:
 	    case LOC_COMPUTED_ARG:
diff -urpN src/gdb/ui-out.c dev/gdb/ui-out.c
--- src/gdb/ui-out.c	2008-01-01 23:53:13.000000000 +0100
+++ dev/gdb/ui-out.c	2008-01-11 13:07:04.000000000 +0100
@@ -493,14 +493,12 @@ ui_out_field_core_addr (struct ui_out *u
   char addstr[20];
   int addr_bit = gdbarch_addr_bit (current_gdbarch);
 
-  /* Truncate address to match deprecated_print_address_numeric().  */
   if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
     address &= ((CORE_ADDR) 1 << addr_bit) - 1;
 
   /* FIXME: cagney/2002-05-03: Need local_address_string() function
      that returns the language localized string formatted to a width
      based on gdbarch_addr_bit.  */
-  /* deprecated_print_address_numeric (address, 1, local_stream); */
   if (addr_bit <= 32)
     strcpy (addstr, hex_string_custom (address, 8));
   else
diff -urpN src/gdb/valprint.c dev/gdb/valprint.c
--- src/gdb/valprint.c	2008-01-01 23:53:13.000000000 +0100
+++ dev/gdb/valprint.c	2008-01-11 11:34:30.000000000 +0100
@@ -1290,13 +1290,13 @@ val_print_string (CORE_ADDR addr, int le
       if (errcode == EIO)
 	{
 	  fprintf_filtered (stream, " <Address ");
-	  deprecated_print_address_numeric (addr, 1, stream);
+	  fputs_filtered (paddress (addr), stream);
 	  fprintf_filtered (stream, " out of bounds>");
 	}
       else
 	{
 	  fprintf_filtered (stream, " <Error reading address ");
-	  deprecated_print_address_numeric (addr, 1, stream);
+	  fputs_filtered (paddress (addr), stream);
 	  fprintf_filtered (stream, ": %s>", safe_strerror (errcode));
 	}
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]