* target.h (struct section_table): Rename to ...
authorPedro Alves <palves@redhat.com>
Fri, 22 May 2009 23:49:14 +0000 (23:49 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 22 May 2009 23:49:14 +0000 (23:49 +0000)
(struct target_section): ... this.
* exec.c: Adjust all references.
* exec.h: Adjust all references.
* nto-tdep.c: Adjust all references.
* nto-tdep.h: Adjust all references.
* ppc-linux-tdep.c: Adjust all references.
* rs6000-nat.c: Adjust all references.
* s390-tdep.c: Adjust all references.
* solib-darwin.c: Adjust all references.
* solib-frv.c: Adjust all references.
* solib-irix.c: Adjust all references.
* solib-null.c: Adjust all references.
* solib-osf.c: Adjust all references.
* solib-pa64.c: Adjust all references.
* solib-som.c: Adjust all references.
* solib-sunos.c: Adjust all references.
* solib-svr4.c: Adjust all references.
* solib-target.c: Adjust all references.
* solib.c: Adjust all references.
* solist.h: Adjust all references.
* symfile.c: Adjust all references.
* symfile.h: Adjust all references.
* target.c: Adjust all references.

24 files changed:
gdb/ChangeLog
gdb/exec.c
gdb/exec.h
gdb/nto-tdep.c
gdb/nto-tdep.h
gdb/ppc-linux-tdep.c
gdb/rs6000-nat.c
gdb/s390-tdep.c
gdb/solib-darwin.c
gdb/solib-frv.c
gdb/solib-irix.c
gdb/solib-null.c
gdb/solib-osf.c
gdb/solib-pa64.c
gdb/solib-som.c
gdb/solib-sunos.c
gdb/solib-svr4.c
gdb/solib-target.c
gdb/solib.c
gdb/solist.h
gdb/symfile.c
gdb/symfile.h
gdb/target.c
gdb/target.h

index 68dea2fd3aba5e966cf18c2a83e8df12707da950..c536c732f4d61aa9619982dddfdf8ddd46460122 100644 (file)
@@ -1,3 +1,30 @@
+2009-05-22  Pedro Alves  <pedro@codesourcery.com>
+
+       * target.h (struct section_table): Rename to ...
+       (struct target_section): ... this.
+       * exec.c: Adjust all references.
+       * exec.h: Adjust all references.
+       * nto-tdep.c: Adjust all references.
+       * nto-tdep.h: Adjust all references.
+       * ppc-linux-tdep.c: Adjust all references.
+       * rs6000-nat.c: Adjust all references.
+       * s390-tdep.c: Adjust all references.
+       * solib-darwin.c: Adjust all references.
+       * solib-frv.c: Adjust all references.
+       * solib-irix.c: Adjust all references.
+       * solib-null.c: Adjust all references.
+       * solib-osf.c: Adjust all references.
+       * solib-pa64.c: Adjust all references.
+       * solib-som.c: Adjust all references.
+       * solib-sunos.c: Adjust all references.
+       * solib-svr4.c: Adjust all references.
+       * solib-target.c: Adjust all references.
+       * solib.c: Adjust all references.
+       * solist.h: Adjust all references.
+       * symfile.c: Adjust all references.
+       * symfile.h: Adjust all references.
+       * target.c: Adjust all references.
+
 2009-05-22  Hui Zhu  <teawater@gmail.com>
 
        Add sys_fcntl argument interfaces to linux_record_tdep.
index 35e6a63ffe234ef0dc4f9c8a6183f8792b1a9abf..985fbe57129ef86ea401f7ed32cf88f4390e8c25 100644 (file)
@@ -351,7 +351,7 @@ static void
 add_to_section_table (bfd *abfd, struct bfd_section *asect,
                      void *table_pp_char)
 {
-  struct section_table **table_pp = (struct section_table **) table_pp_char;
+  struct target_section **table_pp = (struct target_section **) table_pp_char;
   flagword aflag;
 
   /* Check the section flags, but do not discard zero-length sections, since
@@ -374,15 +374,15 @@ add_to_section_table (bfd *abfd, struct bfd_section *asect,
    Returns 0 if OK, 1 on error.  */
 
 int
-build_section_table (struct bfd *some_bfd, struct section_table **start,
-                    struct section_table **end)
+build_section_table (struct bfd *some_bfd, struct target_section **start,
+                    struct target_section **end)
 {
   unsigned count;
 
   count = bfd_count_sections (some_bfd);
   if (*start)
     xfree (* start);
-  *start = (struct section_table *) xmalloc (count * sizeof (**start));
+  *start = (struct target_section *) xmalloc (count * sizeof (**start));
   *end = *start;
   bfd_map_over_sections (some_bfd, add_to_section_table, (char *) end);
   if (*end > *start + count)
@@ -470,12 +470,12 @@ map_vmap (bfd *abfd, bfd *arch)
 static int
 section_table_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
                           int len, int write,
-                          struct section_table *sections,
-                          struct section_table *sections_end,
+                          struct target_section *sections,
+                          struct target_section *sections_end,
                           const char *section_name)
 {
   int res;
-  struct section_table *p;
+  struct target_section *p;
   CORE_ADDR nextsectaddr, memend;
 
   if (len <= 0)
@@ -536,8 +536,8 @@ section_table_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
 int
 section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
                                   ULONGEST offset, LONGEST len,
-                                  struct section_table *sections,
-                                  struct section_table *sections_end)
+                                  struct target_section *sections,
+                                  struct target_section *sections_end)
 {
   if (readbuf != NULL)
     return section_table_xfer_memory (offset, readbuf, len, 0,
@@ -597,7 +597,7 @@ xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
 void
 print_section_info (struct target_ops *t, bfd *abfd)
 {
-  struct section_table *p;
+  struct target_section *p;
   /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64.  */
   int wid = gdbarch_addr_bit (gdbarch_from_bfd (abfd)) <= 32 ? 8 : 16;
 
@@ -661,7 +661,7 @@ exec_files_info (struct target_ops *t)
 static void
 set_section_command (char *args, int from_tty)
 {
-  struct section_table *p;
+  struct target_section *p;
   char *secname;
   unsigned seclen;
   unsigned long secaddr;
@@ -704,7 +704,7 @@ set_section_command (char *args, int from_tty)
 void
 exec_set_section_address (const char *filename, int index, CORE_ADDR address)
 {
-  struct section_table *p;
+  struct target_section *p;
 
   for (p = exec_ops.to_sections; p < exec_ops.to_sections_end; p++)
     {
index 0624447e1aa15b69264dc2673c8f027f0d48737e..c33faa7c84a870f8f7c9d3f6757eb7cba3a36ab5 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "target.h"
 
-struct section_table;
+struct target_section;
 struct target_ops;
 struct bfd;
 
@@ -31,8 +31,8 @@ extern struct target_ops exec_ops;
 /* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
    Returns 0 if OK, 1 on error.  */
 
-extern int build_section_table (struct bfd *, struct section_table **,
-                               struct section_table **);
+extern int build_section_table (struct bfd *, struct target_section **,
+                               struct target_section **);
 
 /* Request to transfer up to LEN 8-bit bytes of the target sections
    defined by SECTIONS and SECTIONS_END.  The OFFSET specifies the
@@ -49,8 +49,8 @@ extern int build_section_table (struct bfd *, struct section_table **,
 
 extern int section_table_xfer_memory_partial (gdb_byte *, const gdb_byte *,
                                              ULONGEST, LONGEST,
-                                             struct section_table *,
-                                             struct section_table *);
+                                             struct target_section *,
+                                             struct target_section *);
 
 /* Set the loaded address of a section.  */
 extern void exec_set_section_address (const char *, int, CORE_ADDR);
index 29c81d926b8b7227d00da08eedc681aa6e236ea4..e856e14e8e549d681c2e6fcdc65cd9e0ba299f86 100644 (file)
@@ -318,7 +318,7 @@ find_load_phdr (bfd *abfd)
 }
 
 void
-nto_relocate_section_addresses (struct so_list *so, struct section_table *sec)
+nto_relocate_section_addresses (struct so_list *so, struct target_section *sec)
 {
   /* Neutrino treats the l_addr base address field in link.h as different than
      the base address in the System V ABI and so the offset needs to be
index ac9031483d563e6c8db7242c28354aec9b778b11..b3a29f59ce825381885c8fa5f2d3b91d7b7eb829 100644 (file)
@@ -150,7 +150,7 @@ char **nto_parse_redirection (char *start_argv[], const char **in,
 int proc_iterate_over_mappings (int (*func) (int, CORE_ADDR));
 
 void nto_relocate_section_addresses (struct so_list *,
-                                    struct section_table *);
+                                    struct target_section *);
 
 int nto_map_arch_to_cputype (const char *);
 
index d08d4fc2e233c5bedd53bbf46ef2553a10e17b25..da332f3f0e2c209e5202f610cf54f6447f1379cd 100644 (file)
@@ -621,7 +621,7 @@ ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
                                        CORE_ADDR addr,
                                        struct target_ops *targ)
 {
-  struct section_table *s = target_section_by_addr (targ, addr);
+  struct target_section *s = target_section_by_addr (targ, addr);
 
   /* Check if ADDR points to a function descriptor.  */
   if (s && strcmp (s->the_bfd_section->name, ".opd") == 0)
index 92bbabd872de01ae25d0fe72d5c1628ff6cc7640..ae2806de7948e0db905058c1470dae97e38ecb31 100644 (file)
@@ -1158,7 +1158,7 @@ xcoff_relocate_core (struct target_ops *target)
          add our sections to the section table for the core target.  */
       if (vp != vmap)
        {
-         struct section_table *stp;
+         struct target_section *stp;
 
          target_resize_to_sections (target, 2);
          stp = target->to_sections_end - 2;
index f17be9b5418a92df224dccfd5f8587d0867954ec..c7b1d7e3947cf7c1e1039992e82cf1480266ca2a 100644 (file)
@@ -772,7 +772,7 @@ s390_load (struct s390_prologue_data *data,
      we're analyzing the code to unwind past that frame.  */
   if (pv_is_constant (addr))
     {
-      struct section_table *secp;
+      struct target_section *secp;
       secp = target_section_by_addr (&current_target, addr.k);
       if (secp != NULL
           && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section)
index 26ff1ccce5b050093bc51bbdf19ac83fb19588e9..fcc8b30194f1ce0c36e4a9f0006978fd8ff42f11 100644 (file)
@@ -379,7 +379,7 @@ darwin_free_so (struct so_list *so)
    Relocate these VMAs according to solib info.  */
 static void
 darwin_relocate_section_addresses (struct so_list *so,
-                                  struct section_table *sec)
+                                  struct target_section *sec)
 {
   sec->addr += so->lm_info->lm_addr;
   sec->endaddr += so->lm_info->lm_addr;
index f48c709af1e33205f0c45cfc2137586dd49c3d78..4e1e845abda362cd31501c66da68651930946eb4 100644 (file)
@@ -998,7 +998,7 @@ frv_free_so (struct so_list *so)
 
 static void
 frv_relocate_section_addresses (struct so_list *so,
-                                 struct section_table *sec)
+                                 struct target_section *sec)
 {
   int seg;
   struct int_elf32_fdpic_loadmap *map;
index 8409e6fa045d358310cce6540b6458eb25a31a65..979afd25ac5519a69fee2f1b1a11db2ce5e216b2 100644 (file)
@@ -687,7 +687,7 @@ irix_special_symbol_handling (void)
 
 static void
 irix_relocate_section_addresses (struct so_list *so,
-                                struct section_table *sec)
+                                struct target_section *sec)
 {
   sec->addr += so->lm_info->reloc_offset;
   sec->endaddr += so->lm_info->reloc_offset;
index 95cc0f9c727aa89fcdf5364ca7829782dccf9600..695c11415da8c95aaeba7e8fd0549c13410af51c 100644 (file)
@@ -50,7 +50,7 @@ null_free_so (struct so_list *so)
 
 static void
 null_relocate_section_addresses (struct so_list *so,
-                                 struct section_table *sec)
+                                 struct target_section *sec)
 {
 }
 
index dec737b8caa8bbd811c698150ebaa7de198a4d2f..5bd2895eed9162718d5dd9279f239c246d83d892 100644 (file)
@@ -234,7 +234,7 @@ fetch_sec_names (struct lm_info *lmi)
 
 static void
 osf_relocate_section_addresses (struct so_list *so,
-                               struct section_table *sec)
+                               struct target_section *sec)
 {
   struct lm_info *lmi;
   struct lm_sec lms_key, *lms;
index 70dc51af233b5885e5c87666fe944bc8eb4491af..88f8ff2aeb928d48cb8d8861bdd17b25bdc16554 100644 (file)
@@ -80,7 +80,7 @@ read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p);
 
 static void
 pa64_relocate_section_addresses (struct so_list *so,
-                                struct section_table *sec)
+                                struct target_section *sec)
 {
   asection *asec = sec->the_bfd_section;
   CORE_ADDR load_offset;
index 72989858f3963fb9829ee293f01ada2d1673234d..dfe1a178f769381e962f25e2894cb3e8b3c24866 100644 (file)
@@ -111,7 +111,7 @@ dld_cache;
 
 static void
 som_relocate_section_addresses (struct so_list *so,
-                               struct section_table *sec)
+                               struct target_section *sec)
 {
   flagword aflag = bfd_get_section_flags(so->abfd, sec->the_bfd_section);
 
index 8cb2dfe2d9d75209338f3ca83e166bc98b089c33..fd7089dc406bf8b1be90c1f5f22ce6b45682b25e 100644 (file)
@@ -817,7 +817,7 @@ sunos_free_so (struct so_list *so)
 
 static void
 sunos_relocate_section_addresses (struct so_list *so,
-                                 struct section_table *sec)
+                                 struct target_section *sec)
 {
   sec->addr += LM_ADDR (so);
   sec->endaddr += LM_ADDR (so);
index cf42fcb78e150c2d541bba13192560f9ac9b5862..9c2fdda7335b4279cce079519a204e637e05c1fe 100644 (file)
@@ -1747,7 +1747,7 @@ svr4_truncate_ptr (CORE_ADDR addr)
 
 static void
 svr4_relocate_section_addresses (struct so_list *so,
-                                 struct section_table *sec)
+                                 struct target_section *sec)
 {
   sec->addr    = svr4_truncate_ptr (sec->addr    + LM_ADDR_CHECK (so,
                                                                  sec->bfd));
index 493604ad1d6e3b3f0ce0822099748a237ef55694..f41dc51f2f24394d50a1e7e26827019b3a0ba490 100644 (file)
@@ -328,7 +328,7 @@ solib_target_free_so (struct so_list *so)
 
 static void
 solib_target_relocate_section_addresses (struct so_list *so,
-                                        struct section_table *sec)
+                                        struct target_section *sec)
 {
   int flags = bfd_get_section_flags (sec->bfd, sec->the_bfd_section);
   CORE_ADDR offset;
index 18bec09e7d38117e011f92482794a7dd35dbb271..9eebd488524a20af08183af2f1d0b4b822ca341c 100644 (file)
@@ -347,7 +347,7 @@ solib_map_sections (void *arg)
 {
   struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
   char *filename;
-  struct section_table *p;
+  struct target_section *p;
   struct cleanup *old_chain;
   bfd *abfd;
 
@@ -849,7 +849,7 @@ int
 solib_contains_address_p (const struct so_list *const solib,
                          CORE_ADDR address)
 {
-  struct section_table *p;
+  struct target_section *p;
 
   for (p = solib->sections; p < solib->sections_end; p++)
     if (p->addr <= address && address < p->endaddr)
index 56b09e3910a32d0a6bea5c4f4577bbabb5d9c92c..63a6ba05415d410719c8cbbddad8c7e72ccad600 100644 (file)
@@ -62,8 +62,8 @@ struct so_list
     char symbols_loaded;       /* flag: symbols read in yet? */
     char from_tty;             /* flag: print msgs? */
     struct objfile *objfile;   /* objfile for loaded lib */
-    struct section_table *sections;
-    struct section_table *sections_end;
+    struct target_section *sections;
+    struct target_section *sections_end;
 
     /* Record the range of addresses belonging to this shared library.
        There may not be just one (e.g. if two segments are relocated
@@ -76,7 +76,7 @@ struct target_so_ops
     /* Adjust the section binding addresses by the base address at
        which the object was actually mapped.  */
     void (*relocate_section_addresses) (struct so_list *so,
-                                        struct section_table *);
+                                        struct target_section *);
 
     /* Free the the link map info and any other private data
        structures associated with a so_list entry.  */
index fb7f1436c4bfa2b8c15b6f382ce536011e4e62bb..ea97d3c5117bdfb8f85ad9dc48292a7f9a37ad3c 100644 (file)
@@ -369,11 +369,11 @@ copy_section_addr_info (struct section_addr_info *addrs)
    an existing section table. */
 
 extern struct section_addr_info *
-build_section_addr_info_from_section_table (const struct section_table *start,
-                                            const struct section_table *end)
+build_section_addr_info_from_section_table (const struct target_section *start,
+                                            const struct target_section *end)
 {
   struct section_addr_info *sap;
-  const struct section_table *stp;
+  const struct target_section *stp;
   int oidx;
 
   sap = alloc_section_addr_info (end - start);
index 88f832699e1df4e272fc498e7a3f199b45ddd69b..5451c28ab6fc6fbe85ff76fef0b11e075f57f21d 100644 (file)
@@ -26,7 +26,7 @@
 #include "symtab.h"
 
 /* Opaque declarations.  */
-struct section_table;
+struct target_section;
 struct objfile;
 struct obj_section;
 struct obstack;
@@ -237,9 +237,9 @@ extern struct section_addr_info *(copy_section_addr_info
    existing section table.  */
 
 extern struct section_addr_info
-  *build_section_addr_info_from_section_table (const struct section_table
+  *build_section_addr_info_from_section_table (const struct target_section
                                               *start,
-                                              const struct section_table
+                                              const struct target_section
                                               *end);
 
 /* Free all memory allocated by
index 6dfa73667dada32e3728837d0bd9cb687508105c..6a180f336b4ce3570a9b7324e0c8967c8d6f277e 100644 (file)
@@ -1017,10 +1017,10 @@ done:
 }
 
 /* Find a section containing ADDR.  */
-struct section_table *
+struct target_section *
 target_section_by_addr (struct target_ops *target, CORE_ADDR addr)
 {
-  struct section_table *secp;
+  struct target_section *secp;
   for (secp = target->to_sections;
        secp < target->to_sections_end;
        secp++)
@@ -1049,7 +1049,7 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf
   /* Try the executable file, if "trust-readonly-sections" is set.  */
   if (readbuf != NULL && trust_readonly)
     {
-      struct section_table *secp;
+      struct target_section *secp;
 
       secp = target_section_by_addr (ops, memaddr);
       if (secp != NULL
@@ -2348,7 +2348,7 @@ int
 target_resize_to_sections (struct target_ops *target, int num_added)
 {
   struct target_ops **t;
-  struct section_table *old_value;
+  struct target_section *old_value;
   int old_count;
 
   old_value = target->to_sections;
@@ -2356,15 +2356,15 @@ target_resize_to_sections (struct target_ops *target, int num_added)
   if (target->to_sections)
     {
       old_count = target->to_sections_end - target->to_sections;
-      target->to_sections = (struct section_table *)
+      target->to_sections = (struct target_section *)
        xrealloc ((char *) target->to_sections,
-                 (sizeof (struct section_table)) * (num_added + old_count));
+                 (sizeof (struct target_section)) * (num_added + old_count));
     }
   else
     {
       old_count = 0;
-      target->to_sections = (struct section_table *)
-       xmalloc ((sizeof (struct section_table)) * num_added);
+      target->to_sections = (struct target_section *)
+       xmalloc ((sizeof (struct target_section)) * num_added);
     }
   target->to_sections_end = target->to_sections + (num_added + old_count);
 
@@ -2408,7 +2408,7 @@ remove_target_sections (bfd *abfd)
 
   for (t = target_structs; t < target_structs + target_struct_size; t++)
     {
-      struct section_table *src, *dest;
+      struct target_section *src, *dest;
 
       dest = (*t)->to_sections;
       for (src = (*t)->to_sections; src < (*t)->to_sections_end; src++)
index b1fe4032aaeb26a565b6ab16bae4666b9a7392b3..f3bddfc304e6cc9fc1cb9a3ac87ecc7b314c9d10 100644 (file)
@@ -420,9 +420,9 @@ struct target_ops
     int to_has_execution;
     int to_has_thread_control; /* control thread execution */
     int to_attach_no_wait;
-    struct section_table
+    struct target_section
      *to_sections;
-    struct section_table
+    struct target_section
      *to_sections_end;
     /* ASYNC target controls */
     int (*to_can_async_p) (void);
@@ -1194,11 +1194,11 @@ void target_mark_running (struct target_ops *);
 
 void target_mark_exited (struct target_ops *);
 
-/* Struct section_table maps address ranges to file sections.  It is
+/* Struct target_section maps address ranges to file sections.  It is
    mostly used with BFD files, but can be used without (e.g. for handling
    raw disks, or files not in formats handled by BFD).  */
 
-struct section_table
+struct target_section
   {
     CORE_ADDR addr;            /* Lowest address in section */
     CORE_ADDR endaddr;         /* 1+highest address in section */
@@ -1209,9 +1209,8 @@ struct section_table
   };
 
 /* Return the "section" containing the specified address.  */
-struct section_table *target_section_by_addr (struct target_ops *target,
-                                             CORE_ADDR addr);
-
+struct target_section *target_section_by_addr (struct target_ops *target,
+                                              CORE_ADDR addr);
 
 /* From mem-break.c */
 
This page took 0.040698 seconds and 4 git commands to generate.