Fri Apr 7 13:44:38 2000 glen mccready <gkm@pobox.com>
[deliverable/binutils-gdb.git] / gdb / exec.c
index 2f9e46e509e5577139e9dec2509235791c1fb9fa..6381e63e358b3ee7d0d40039c99ebd1f867cbc2f 100644 (file)
@@ -198,7 +198,7 @@ exec_file_attach (args, from_tty)
        {;
        }
       if (*argv == NULL)
-       error ("no exec file name was specified");
+       error ("No executable file name was specified");
 
       filename = tilde_expand (*argv);
       make_cleanup (free, filename);
@@ -227,7 +227,7 @@ exec_file_attach (args, from_tty)
          same malloc'd string.  However exec_close() will attempt to free it
          via the exec_bfd->name pointer, so we need to make another copy and
          leave exec_bfd as the new owner of the original copy. */
-      scratch_pathname = strdup (scratch_pathname);
+      scratch_pathname = xstrdup (scratch_pathname);
       make_cleanup (free, scratch_pathname);
 
       if (!bfd_check_format (exec_bfd, bfd_object))
@@ -315,11 +315,7 @@ exec_file_command (args, from_tty)
      char *args;
      int from_tty;
 {
-  char **argv;
-  char *filename;
-
   target_preopen (from_tty);
-
   exec_file_attach (args, from_tty);
 }
 
@@ -618,13 +614,21 @@ exec_files_info (t)
       struct vmap *vp;
 
       printf_unfiltered ("\tMapping info for file `%s'.\n", vmap->name);
-      printf_unfiltered ("\t  %8.8s   %8.8s   %8.8s   %8.8s %8.8s %s\n",
-                        "tstart", "tend", "dstart", "dend", "section",
+      printf_unfiltered ("\t  %*s   %*s   %*s   %*s %8.8s %s\n",
+                        strlen_paddr (), "tstart",
+                        strlen_paddr (), "tend",
+                        strlen_paddr (), "dstart",
+                        strlen_paddr (), "dend",
+                        "section",
                         "file(member)");
 
       for (vp = vmap; vp; vp = vp->nxt)
-       printf_unfiltered ("\t0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x %s%s%s%s\n",
-                      vp->tstart, vp->tend, vp->dstart, vp->dend, vp->name,
+       printf_unfiltered ("\t0x%s 0x%s 0x%s 0x%s %s%s%s%s\n",
+                          paddr (vp->tstart),
+                          paddr (vp->tend),
+                          paddr (vp->dstart),
+                          paddr (vp->dend),
+                          vp->name,
                           *vp->member ? "(" : "", vp->member,
                           *vp->member ? ")" : "");
     }
This page took 0.024417 seconds and 4 git commands to generate.