* dbxread.c (process_one_symbol): Constify section_offsets parameter.
authorDoug Evans <dje@google.com>
Mon, 6 May 2013 19:15:17 +0000 (19:15 +0000)
committerDoug Evans <dje@google.com>
Mon, 6 May 2013 19:15:17 +0000 (19:15 +0000)
* stabsread.h (process_one_symbol): Update declaration.
* dwarf2read.c (dw2_relocate): Constify new_offsets, delta parameters.
* elfread.c (elf_symfile_relocate_probe): Ditto.
* psymtab.c (relocate_psymtabs): Ditto.
* objfiles.c (objfile_relocate1): Constify new_offsets parameter.
(objfile_relocate): Ditto.
* objfiles.h (objfile_relocate): Update declaration.
* symfile.c (relative_addr_info_to_section_offsets): Constify
addrs parameter.
(default_symfile_offsets): Ditto.
(syms_from_objfile_1): Constify offsets parameter.
(syms_from_objfile): Ditto.
(symbol_file_add_with_addrs_or_offsets): Ditto.
(symfile_map_offsets_to_segments): Constify data parameter.
* symfile.h (struct quick_symbol_functions): Constify new_offsets,
delta parameters of member relocate.
(struct sym_probe_fns): Constify new_offsets,
delta parameters of member sym_relocate_probe.
(struct sym_fns): Constify section_addr_info parameter of member
sym_offsets.
(relative_addr_info_to_section_offsets): Update declaration.
(default_symfile_offsets): Ditto.
(syms_from_objfile): Ditto.
(symfile_map_offsets_to_segments): Ditto.

gdb/ChangeLog
gdb/dbxread.c
gdb/dwarf2read.c
gdb/elfread.c
gdb/objfiles.c
gdb/objfiles.h
gdb/psymtab.c
gdb/stabsread.h
gdb/symfile.c
gdb/symfile.h

index 43a502a0153536ab6a4eef9a5a538dbde6b73117..a0742776a0cf71cf709635d9f7f5f9e04877ece5 100644 (file)
@@ -1,5 +1,31 @@
 2013-05-06  Doug Evans  <dje@google.com>
 
+       * dbxread.c (process_one_symbol): Constify section_offsets parameter.
+       * stabsread.h (process_one_symbol): Update declaration.
+       * dwarf2read.c (dw2_relocate): Constify new_offsets, delta parameters.
+       * elfread.c (elf_symfile_relocate_probe): Ditto.
+       * psymtab.c (relocate_psymtabs): Ditto.
+       * objfiles.c (objfile_relocate1): Constify new_offsets parameter.
+       (objfile_relocate): Ditto.
+       * objfiles.h (objfile_relocate): Update declaration.
+       * symfile.c (relative_addr_info_to_section_offsets): Constify
+       addrs parameter.
+       (default_symfile_offsets): Ditto.
+       (syms_from_objfile_1): Constify offsets parameter.
+       (syms_from_objfile): Ditto.
+       (symbol_file_add_with_addrs_or_offsets): Ditto.
+       (symfile_map_offsets_to_segments): Constify data parameter.
+       * symfile.h (struct quick_symbol_functions): Constify new_offsets,
+       delta parameters of member relocate.
+       (struct sym_probe_fns): Constify new_offsets,
+       delta parameters of member sym_relocate_probe.
+       (struct sym_fns): Constify section_addr_info parameter of member
+       sym_offsets.
+       (relative_addr_info_to_section_offsets): Update declaration.
+       (default_symfile_offsets): Ditto.
+       (syms_from_objfile): Ditto.
+       (symfile_map_offsets_to_segments): Ditto.
+
        * symfile.c (syms_from_objfile_1): Use correct section count when
        objfile->sf == NULL.
 
index 01dc1bf8ca1bd46f8a0ca711c60880345c87cd0c..8134f13b496231dfb54960074bb2a59f06868041 100644 (file)
@@ -2717,7 +2717,7 @@ cp_set_block_scope (const struct symbol *symbol,
 
 void
 process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
-                   struct section_offsets *section_offsets,
+                   const struct section_offsets *section_offsets,
                    struct objfile *objfile)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
index 2b4d8adc2516bc98a6657b8ae6a31299d5b9910d..65d1c8258ddcfab6b818c3e58c1bf5bea4afc0ae 100644 (file)
@@ -3311,8 +3311,9 @@ dw2_dump (struct objfile *objfile)
 }
 
 static void
-dw2_relocate (struct objfile *objfile, struct section_offsets *new_offsets,
-             struct section_offsets *delta)
+dw2_relocate (struct objfile *objfile,
+             const struct section_offsets *new_offsets,
+             const struct section_offsets *delta)
 {
   /* There's nothing to relocate here.  */
 }
index 0ec1786f93a8e07147c15f83be19b009f3581f71..cfdfe4540f5e44538b6ab881b7578379e98d947e 100644 (file)
@@ -1667,8 +1667,8 @@ elf_compile_to_ax (struct probe *probe,
 
 static void
 elf_symfile_relocate_probe (struct objfile *objfile,
-                           struct section_offsets *new_offsets,
-                           struct section_offsets *delta)
+                           const struct section_offsets *new_offsets,
+                           const struct section_offsets *delta)
 {
   int ix;
   VEC (probe_p) *probes = objfile_data (objfile, probe_key);
index 2e13421301386dd05096f14027b25b2b539585b1..3e49ea26d86e02e8b422daf88067fc8455c23059 100644 (file)
@@ -709,7 +709,7 @@ relocate_one_symbol (struct symbol *sym, struct objfile *objfile,
 
 static int
 objfile_relocate1 (struct objfile *objfile, 
-                  struct section_offsets *new_offsets)
+                  const struct section_offsets *new_offsets)
 {
   struct obj_section *s;
   struct section_offsets *delta =
@@ -856,7 +856,8 @@ objfile_relocate1 (struct objfile *objfile,
    files.  */
 
 void
-objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
+objfile_relocate (struct objfile *objfile,
+                 const struct section_offsets *new_offsets)
 {
   struct objfile *debug_objfile;
   int changed = 0;
index 1fbb2558a233f7731af181f7a439c72cab1f4556..93149e2032f5ad17420953eb2b0ccc4e0c2db379 100644 (file)
@@ -467,7 +467,7 @@ extern struct cleanup *make_cleanup_free_objfile (struct objfile *);
 
 extern void free_all_objfiles (void);
 
-extern void objfile_relocate (struct objfile *, struct section_offsets *);
+extern void objfile_relocate (struct objfile *, const struct section_offsets *);
 extern void objfile_rebase (struct objfile *, CORE_ADDR);
 
 extern int objfile_has_partial_symbols (struct objfile *objfile);
index b799a037899431118de4717adfb01ed38fc79de7..878bd82cc049a8d7ee08f61ad11be1795cd22911 100644 (file)
@@ -785,8 +785,8 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
 
 static void
 relocate_psymtabs (struct objfile *objfile,
-                  struct section_offsets *new_offsets,
-                  struct section_offsets *delta)
+                  const struct section_offsets *new_offsets,
+                  const struct section_offsets *delta)
 {
   struct partial_symbol **psym;
   struct partial_symtab *p;
index 956310650189dd8ec15af0925427a7b3dfd069e1..003fda518ecbc10cb3a5a4cb09ed1753d0be1c9e 100644 (file)
@@ -172,7 +172,8 @@ extern struct partial_symtab *end_psymtab (struct objfile *objfile,
                                           int textlow_not_set);
 
 extern void process_one_symbol (int, int, CORE_ADDR, char *,
-                               struct section_offsets *, struct objfile *);
+                               const struct section_offsets *,
+                               struct objfile *);
 
 extern void elfstab_build_psymtabs (struct objfile *objfile,
                                    asection *stabsect,
index 48d5f73131bf730ddbdd33baec801043b027c080..78f322b88f54220031f40b4d7311621b37ce9360 100644 (file)
@@ -445,7 +445,7 @@ place_section (bfd *abfd, asection *sect, void *obj)
 void
 relative_addr_info_to_section_offsets (struct section_offsets *section_offsets,
                                       int num_sections,
-                                      struct section_addr_info *addrs)
+                                      const struct section_addr_info *addrs)
 {
   int i;
 
@@ -454,7 +454,7 @@ relative_addr_info_to_section_offsets (struct section_offsets *section_offsets,
   /* Now calculate offsets for section that were specified by the caller.  */
   for (i = 0; i < addrs->num_sections; i++)
     {
-      struct other_sections *osp;
+      const struct other_sections *osp;
 
       osp = &addrs->other[i];
       if (osp->sectindex == -1)
@@ -676,7 +676,7 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
 
 void
 default_symfile_offsets (struct objfile *objfile,
-                        struct section_addr_info *addrs)
+                        const struct section_addr_info *addrs)
 {
   objfile->num_sections = gdb_bfd_count_sections (objfile->obfd);
   objfile->section_offsets = (struct section_offsets *)
@@ -932,7 +932,7 @@ init_entry_point_info (struct objfile *objfile)
 static void
 syms_from_objfile_1 (struct objfile *objfile,
                     struct section_addr_info *addrs,
-                    struct section_offsets *offsets,
+                    const struct section_offsets *offsets,
                     int num_offsets,
                     int add_flags)
 {
@@ -1042,7 +1042,7 @@ syms_from_objfile_1 (struct objfile *objfile,
 void
 syms_from_objfile (struct objfile *objfile,
                   struct section_addr_info *addrs,
-                  struct section_offsets *offsets,
+                  const struct section_offsets *offsets,
                   int num_offsets,
                   int add_flags)
 {
@@ -1099,7 +1099,7 @@ static struct objfile *
 symbol_file_add_with_addrs_or_offsets (bfd *abfd,
                                        int add_flags,
                                        struct section_addr_info *addrs,
-                                       struct section_offsets *offsets,
+                                       const struct section_offsets *offsets,
                                        int num_offsets,
                                        int flags, struct objfile *parent)
 {
@@ -3672,7 +3672,8 @@ free_symfile_segment_data (struct symfile_segment_data *data)
    not be able to distinguish between an empty data segment and a
    missing data segment; a missing text segment is less plausible.  */
 int
-symfile_map_offsets_to_segments (bfd *abfd, struct symfile_segment_data *data,
+symfile_map_offsets_to_segments (bfd *abfd,
+                                const struct symfile_segment_data *data,
                                 struct section_offsets *offsets,
                                 int num_segment_bases,
                                 const CORE_ADDR *segment_bases)
index 10a2f4f90a3d5185072ce53104ea68450eda32ba..85535f1a0883c6104eea82132d9c3a0281e0556e 100644 (file)
@@ -201,8 +201,8 @@ struct quick_symbol_functions
   /* This is called by objfile_relocate to relocate any indices loaded
      for OBJFILE.  */
   void (*relocate) (struct objfile *objfile,
-                   struct section_offsets *new_offsets,
-                   struct section_offsets *delta);
+                   const struct section_offsets *new_offsets,
+                   const struct section_offsets *delta);
 
   /* Find all the symbols in OBJFILE named FUNC_NAME, and ensure that
      the corresponding symbol tables are loaded.  */
@@ -337,8 +337,8 @@ struct sym_probe_fns
 
   /* Relocate the probe section of OBJFILE.  */
   void (*sym_relocate_probe) (struct objfile *objfile,
-                             struct section_offsets *new_offsets,
-                             struct section_offsets *delta);
+                             const struct section_offsets *new_offsets,
+                             const struct section_offsets *delta);
 };
 
 /* Structure to keep track of symbol reading functions for various
@@ -391,7 +391,7 @@ struct sym_fns
      probably be changed to a string, where NULL means the default,
      and others are parsed in a file dependent way.  */
 
-  void (*sym_offsets) (struct objfile *, struct section_addr_info *);
+  void (*sym_offsets) (struct objfile *, const struct section_addr_info *);
 
   /* This function produces a format-independent description of
      the segments of ABFD.  Each segment is a unit of the file
@@ -425,7 +425,7 @@ extern struct section_addr_info *
 
 extern void relative_addr_info_to_section_offsets
   (struct section_offsets *section_offsets, int num_sections,
-   struct section_addr_info *addrs);
+   const struct section_addr_info *addrs);
 
 extern void addr_info_make_relative (struct section_addr_info *addrs,
                                     bfd *abfd);
@@ -434,7 +434,7 @@ extern void addr_info_make_relative (struct section_addr_info *addrs,
    do anything special.  */
 
 extern void default_symfile_offsets (struct objfile *objfile,
-                                    struct section_addr_info *);
+                                    const struct section_addr_info *);
 
 /* The default version of sym_fns.sym_segments for readers that don't
    do anything special.  */
@@ -474,7 +474,7 @@ enum symfile_add_flags
 
 extern void syms_from_objfile (struct objfile *,
                               struct section_addr_info *,
-                              struct section_offsets *, int, int);
+                              const struct section_offsets *, int, int);
 
 extern void new_symfile_objfile (struct objfile *, int);
 
@@ -585,7 +585,7 @@ extern bfd_byte *symfile_relocate_debug_section (struct objfile *, asection *,
                                                 bfd_byte *);
 
 extern int symfile_map_offsets_to_segments (bfd *,
-                                           struct symfile_segment_data *,
+                                           const struct symfile_segment_data *,
                                            struct section_offsets *,
                                            int, const CORE_ADDR *);
 struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
This page took 0.047677 seconds and 4 git commands to generate.