diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 27 | ||||
-rw-r--r-- | gdb/exec.c | 24 | ||||
-rw-r--r-- | gdb/exec.h | 10 | ||||
-rw-r--r-- | gdb/nto-tdep.c | 2 | ||||
-rw-r--r-- | gdb/nto-tdep.h | 2 | ||||
-rw-r--r-- | gdb/ppc-linux-tdep.c | 2 | ||||
-rw-r--r-- | gdb/rs6000-nat.c | 2 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/solib-darwin.c | 2 | ||||
-rw-r--r-- | gdb/solib-frv.c | 2 | ||||
-rw-r--r-- | gdb/solib-irix.c | 2 | ||||
-rw-r--r-- | gdb/solib-null.c | 2 | ||||
-rw-r--r-- | gdb/solib-osf.c | 2 | ||||
-rw-r--r-- | gdb/solib-pa64.c | 2 | ||||
-rw-r--r-- | gdb/solib-som.c | 2 | ||||
-rw-r--r-- | gdb/solib-sunos.c | 2 | ||||
-rw-r--r-- | gdb/solib-svr4.c | 2 | ||||
-rw-r--r-- | gdb/solib-target.c | 2 | ||||
-rw-r--r-- | gdb/solib.c | 4 | ||||
-rw-r--r-- | gdb/solist.h | 6 | ||||
-rw-r--r-- | gdb/symfile.c | 6 | ||||
-rw-r--r-- | gdb/symfile.h | 6 | ||||
-rw-r--r-- | gdb/target.c | 18 | ||||
-rw-r--r-- | gdb/target.h | 13 |
24 files changed, 85 insertions, 59 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 68dea2f..c536c73 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. @@ -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++) { @@ -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); diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c index 29c81d9..e856e14 100644 --- a/gdb/nto-tdep.c +++ b/gdb/nto-tdep.c @@ -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 diff --git a/gdb/nto-tdep.h b/gdb/nto-tdep.h index ac90314..b3a29f5 100644 --- a/gdb/nto-tdep.h +++ b/gdb/nto-tdep.h @@ -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 *); diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index d08d4fc..da332f3 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -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) diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 92bbabd..ae2806d 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -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; diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index f17be9b..c7b1d7e 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -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 (¤t_target, addr.k); if (secp != NULL && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section) diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c index 26ff1cc..fcc8b30 100644 --- a/gdb/solib-darwin.c +++ b/gdb/solib-darwin.c @@ -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; diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index f48c709..4e1e845 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -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; diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c index 8409e6f..979afd2 100644 --- a/gdb/solib-irix.c +++ b/gdb/solib-irix.c @@ -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; diff --git a/gdb/solib-null.c b/gdb/solib-null.c index 95cc0f9..695c114 100644 --- a/gdb/solib-null.c +++ b/gdb/solib-null.c @@ -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) { } diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c index dec737b..5bd2895 100644 --- a/gdb/solib-osf.c +++ b/gdb/solib-osf.c @@ -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; diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c index 70dc51a..88f8ff2 100644 --- a/gdb/solib-pa64.c +++ b/gdb/solib-pa64.c @@ -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; diff --git a/gdb/solib-som.c b/gdb/solib-som.c index 7298985..dfe1a17 100644 --- a/gdb/solib-som.c +++ b/gdb/solib-som.c @@ -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); diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c index 8cb2dfe..fd7089d 100644 --- a/gdb/solib-sunos.c +++ b/gdb/solib-sunos.c @@ -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); diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index cf42fcb..9c2fdda 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -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)); diff --git a/gdb/solib-target.c b/gdb/solib-target.c index 493604a..f41dc51 100644 --- a/gdb/solib-target.c +++ b/gdb/solib-target.c @@ -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; diff --git a/gdb/solib.c b/gdb/solib.c index 18bec09..9eebd48 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -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) diff --git a/gdb/solist.h b/gdb/solist.h index 56b09e3..63a6ba0 100644 --- a/gdb/solist.h +++ b/gdb/solist.h @@ -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. */ diff --git a/gdb/symfile.c b/gdb/symfile.c index fb7f143..ea97d3c 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -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); diff --git a/gdb/symfile.h b/gdb/symfile.h index 88f8326..5451c28 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -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 diff --git a/gdb/target.c b/gdb/target.c index 6dfa736..6a180f3 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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++) diff --git a/gdb/target.h b/gdb/target.h index b1fe403..f3bddfc 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -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 */ |