Rotate GDB's main ChangeLog file
[deliverable/binutils-gdb.git] / gdb / exec.c
index 51b33a5512a1bd2ca353f04fe6992184530ec618..de0c459e85e2e1a2129329d36882158e4d4b455c 100644 (file)
@@ -101,9 +101,7 @@ exec_close (void)
       bfd *abfd = exec_bfd;
       char *name = bfd_get_filename (abfd);
 
-      if (!bfd_close (abfd))
-       warning (_("cannot close \"%s\": %s"),
-                name, bfd_errmsg (bfd_get_error ()));
+      gdb_bfd_close_or_warn (abfd);
       xfree (name);
 
       /* Removing target sections may close the exec_ops target.
@@ -141,9 +139,7 @@ exec_close_1 (int quitting)
        }
       else if (vp->bfd != exec_bfd)
        /* FIXME-leak: We should be freeing vp->name too, I think.  */
-       if (!bfd_close (vp->bfd))
-         warning (_("cannot close \"%s\": %s"),
-                  vp->name, bfd_errmsg (bfd_get_error ()));
+       gdb_bfd_close_or_warn (vp->bfd);
 
       xfree (vp);
     }
@@ -228,6 +224,7 @@ exec_file_attach (char *filename, int from_tty)
       if (scratch_chan < 0)
        {
          char *exename = alloca (strlen (filename) + 5);
+
          strcat (strcpy (exename, filename), ".exe");
          scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename,
             write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY,
@@ -462,6 +459,7 @@ add_target_sections (struct target_section *sections,
   if (count > 0)
     {
       int space = resize_section_table (table, count);
+
       memcpy (table->sections + space,
              sections, count * sizeof (sections[0]));
 
@@ -481,7 +479,6 @@ void
 remove_target_sections (bfd *abfd)
 {
   struct target_section *src, *dest;
-
   struct target_section_table *table = current_target_sections;
 
   dest = table->sections;
@@ -673,6 +670,7 @@ print_section_info (struct target_section_table *t, bfd *abfd)
     {
       /* gcc-3.4 does not like the initialization in <p == t->sections_end>.  */
       bfd_vma displacement = 0;
+      bfd_vma entry_point;
 
       for (p = t->sections; p < t->sections_end; p++)
        {
@@ -694,9 +692,11 @@ print_section_info (struct target_section_table *t, bfd *abfd)
        warning (_("Cannot find section for the entry point of %s.\n"),
                 bfd_get_filename (abfd));
 
+      entry_point = gdbarch_addr_bits_remove (gdbarch, 
+                                             bfd_get_start_address (abfd) 
+                                               + displacement);
       printf_filtered (_("\tEntry point: %s\n"),
-                      paddress (gdbarch, (bfd_get_start_address (abfd)
-                                          + displacement)));
+                      paddress (gdbarch, entry_point));
     }
   for (p = t->sections; p < t->sections_end; p++)
     {
@@ -835,11 +835,7 @@ exec_has_memory (struct target_ops *ops)
 /* Find mapped memory. */
 
 extern void
-exec_set_find_memory_regions (int (*func) (int (*) (CORE_ADDR, 
-                                                   unsigned long, 
-                                                   int, int, int, 
-                                                   void *),
-                                          void *))
+exec_set_find_memory_regions (int (*func) (find_memory_region_ftype, void *))
 {
   exec_ops.to_find_memory_regions = func;
 }
This page took 0.02463 seconds and 4 git commands to generate.