* annotate.c (annotate_source, annotate_frame_begin): Replace
[deliverable/binutils-gdb.git] / gdb / cli / cli-cmds.c
index 3cde3fcfbe15f4e1e020085e16816eeabc502818..b0f5fa0a892e3cba2d4bffdcbda779a9bf1d5266 100644 (file)
@@ -668,18 +668,12 @@ edit_command (char *arg, int from_tty)
                   hex_string ((unsigned long) sal.pc));
           sym = find_pc_function (sal.pc);
           if (sym)
-           {
-             deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
-             printf_filtered (" is in ");
-             fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
-             printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
-           }
+           printf_filtered ("%s is in %s (%s:%d).\n", paddress (sal.pc),
+                            SYMBOL_PRINT_NAME (sym), sal.symtab->filename,
+                            sal.line);
           else
-           {
-             deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
-             printf_filtered (" is at %s:%d.\n",
-                              sal.symtab->filename, sal.line);
-           }
+           printf_filtered ("%s is at %s:%d.\n", paddress (sal.pc),
+                            sal.symtab->filename, sal.line);
         }
 
       /* If what was given does not imply a symtab, it must be an undebuggable
@@ -838,18 +832,12 @@ list_command (char *arg, int from_tty)
               hex_string ((unsigned long) sal.pc));
       sym = find_pc_function (sal.pc);
       if (sym)
-       {
-         deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
-         printf_filtered (" is in ");
-         fputs_filtered (SYMBOL_PRINT_NAME (sym), gdb_stdout);
-         printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
-       }
+       printf_filtered ("%s is in %s (%s:%d).\n",
+                        paddress (sal.pc), SYMBOL_PRINT_NAME (sym),
+                        sal.symtab->filename, sal.line);
       else
-       {
-         deprecated_print_address_numeric (sal.pc, 1, gdb_stdout);
-         printf_filtered (" is at %s:%d.\n",
-                          sal.symtab->filename, sal.line);
-       }
+       printf_filtered ("%s is at %s:%d.\n", paddress (sal.pc),
+                        sal.symtab->filename, sal.line);
     }
 
   /* If line was not specified by just a line number,
This page took 0.041466 seconds and 4 git commands to generate.