* 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.
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.
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);
}
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. */
}
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);
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 =
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;
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);
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;
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,
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;
/* 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)
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 *)
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)
{
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)
{
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)
{
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)
/* 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. */
/* 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
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
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);
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. */
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);
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);