/* Read AIX xcoff symbol tables and convert to internal format, for GDB.
- Copyright (C) 1986-2013 Free Software Foundation, Inc.
+ Copyright (C) 1986-2014 Free Software Foundation, Inc.
Derived from coffread.c, dbxread.c, and a lot of hacking.
Contributed by IBM Corporation.
#include <sys/types.h>
#include <fcntl.h>
#include <ctype.h>
-#include "gdb_string.h"
-
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
-#include "gdb_stat.h"
+#include <sys/stat.h>
#include "coff/internal.h"
#include "libcoff.h" /* FIXME, internal data from BFD */
char *c_name;
int c_symnum; /* Symbol number of this entry. */
int c_naux; /* 0 if syment only, 1 if syment + auxent. */
- long c_value;
+ CORE_ADDR c_value;
unsigned char c_sclass;
int c_secnum;
unsigned int c_type;
/* We don't want to keep alloc/free'ing the global include file table. */
inclIndx = 0;
-
- /* Start with a fresh subfile structure for the next file. */
- memset (&main_subfile, '\0', sizeof (struct subfile));
}
static void
-aix_process_linenos (void)
+aix_process_linenos (struct objfile *objfile)
{
/* There is no linenos to read if there are only dwarf info. */
if (this_symtab_psymtab == NULL)
if (name[0] == '.')
++name;
- address += ANOFFSET (objfile->section_offsets, section);
prim_record_minimal_symbol_and_info (name, address, ms_type,
secnum_to_section (n_scnum, objfile),
objfile);
unsigned int max_symnum;
int just_started = 1;
int depth = 0;
- int fcn_start_addr = 0;
+ CORE_ADDR fcn_start_addr = 0;
struct coff_symbol fcn_stab_saved = { 0 };
file_ptr symtab_offset; /* symbol table and */
file_ptr stringtab_offset; /* string table file offsets */
struct coff_symfile_info *info;
- char *name;
+ const char *name;
unsigned int size;
info = XCOFF_DATA (objfile);
symfile_bfd = abfd = objfile->obfd;
- name = objfile->name;
+ name = objfile_name (objfile);
num_symbols = bfd_get_symcount (abfd); /* # of symbols */
symtab_offset = obj_sym_filepos (abfd); /* symbol table file offset */
xcoffread.c reads all the symbols and does in fact randomly access them
(in C_BSTAT and line number processing). */
- bfd_target_xcoff_flavour,
-
xcoff_new_init, /* init anything gbl to entire symtab */
xcoff_symfile_init, /* read initial info, setup for sym_read() */
xcoff_initial_scan, /* read a symbol file into symtab */
void
_initialize_xcoffread (void)
{
- add_symtab_fns (&xcoff_sym_fns);
+ add_symtab_fns (bfd_target_xcoff_flavour, &xcoff_sym_fns);
xcoff_objfile_data_key = register_objfile_data_with_cleanup (NULL,
xcoff_free_info);