+2014-11-18 Doug Evans <xdje42@gmail.com>
+
+ * buildsym.c (buildsym_objfile): New static global.
+ (buildsym_comp_dir): New static global.
+ (finish_block_internal): Delete arg objfile. All callers updated.
+ (finish_block): Delete arg objfile. All callers updated.
+ (start_subfile): Delete arg dirname. All callers updated.
+ (patch_subfile_names): Update buildsym_comp_dir.
+ (get_macro_table): Delete arg objfile. All callers updated.
+ (start_symtab): New arg objfile. All callers updated.
+ Rename arg dirname to comp_dir.
+ (reset_symtab_globals): Initialize buildsym_objfile, buildsym_comp_dir.
+ (end_symtab_get_static_block): Delete arg objfile. All callers
+ updated.
+ (end_symtab_without_blockvector): Ditto.
+ (end_symtab_with_blockvector): Ditto.
+ (end_symtab_from_static_block): Ditto.
+ (end_symtab): Ditto.
+ (end_expandable_symtab): Ditto.
+ (augment_type_symtab): Ditto.
+ * coffread.c (coff_start_symtab): New arg objfile. All callers
+ updated.
+
2014-11-18 Doug Evans <xdje42@gmail.com>
* symtab.h (SYMTAB_LINETABLE): Renamed from LINETABLE. All uses
#include "stabsread.h"
+/* The objfile we are currently reading debug info from. */
+
+static struct objfile *buildsym_objfile;
+
+/* The compilation directory. */
+
+static char *buildsym_comp_dir;
+
/* List of subfiles. */
static struct subfile *subfiles;
finish_block_internal (struct symbol *symbol, struct pending **listhead,
struct pending_block *old_blocks,
CORE_ADDR start, CORE_ADDR end,
- struct objfile *objfile,
int is_global, int expandable)
{
+ struct objfile *objfile = buildsym_objfile;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
struct pending *next, *next1;
struct block *block;
struct block *
finish_block (struct symbol *symbol, struct pending **listhead,
struct pending_block *old_blocks,
- CORE_ADDR start, CORE_ADDR end,
- struct objfile *objfile)
+ CORE_ADDR start, CORE_ADDR end)
{
return finish_block_internal (symbol, listhead, old_blocks,
- start, end, objfile, 0, 0);
+ start, end, 0, 0);
}
/* Record BLOCK on the list of all blocks in the file. Put it after
\f
/* Start recording information about source code that came from an
included (or otherwise merged-in) source file with a different
- name. NAME is the name of the file (cannot be NULL), DIRNAME is
- the directory in which the file was compiled (or NULL if not
- known). */
+ name. NAME is the name of the file (cannot be NULL). */
void
-start_subfile (const char *name, const char *dirname)
+start_subfile (const char *name)
{
struct subfile *subfile;
/* Save its name and compilation directory name. */
subfile->name = xstrdup (name);
- subfile->dirname = (dirname == NULL) ? NULL : xstrdup (dirname);
+ subfile->dirname
+ = (buildsym_comp_dir == NULL) ? NULL : xstrdup (buildsym_comp_dir);
/* Initialize line-number recording for this subfile. */
subfile->line_vector = NULL;
if (subfile != NULL && subfile->dirname == NULL && subfile->name != NULL
&& IS_DIR_SEPARATOR (subfile->name[strlen (subfile->name) - 1]))
{
+ /* With correct debug info, buildsym_comp_dir should be NULL since
+ subfile->dirname is NULL. However, don't assume this. */
+ xfree (buildsym_comp_dir);
+ buildsym_comp_dir = xstrdup (subfile->name);
+
subfile->dirname = subfile->name;
subfile->name = xstrdup (name);
set_last_source_file (name);
}
\f
/* Return the macro table.
- Initialize it if this is the first use. */
+ Initialize it if this is the first use.
+ It is only valid to call this between calls to start_symtab and the
+ end_symtab* functions. */
struct macro_table *
-get_macro_table (struct objfile *objfile, const char *comp_dir)
+get_macro_table (const char *comp_dir)
{
+ struct objfile *objfile = buildsym_objfile;
+
if (! pending_macros)
pending_macros = new_macro_table (&objfile->per_bfd->storage_obstack,
objfile->per_bfd->macro_cache,
return pending_macros;
}
\f
-/* Start a new symtab for a new source file. Called, for example,
+/* Start a new symtab for a new source file in OBJFILE. Called, for example,
when a stabs symbol of type N_SO is seen, or when a DWARF
TAG_compile_unit DIE is seen. It indicates the start of data for
one original source file.
- NAME is the name of the file (cannot be NULL). DIRNAME is the directory in
+ NAME is the name of the file (cannot be NULL). COMP_DIR is the directory in
which the file was compiled (or NULL if not known). START_ADDR is the
lowest address of objects in the file (or 0 if not known). */
void
-start_symtab (const char *name, const char *dirname, CORE_ADDR start_addr)
+start_symtab (struct objfile *objfile, const char *name, const char *comp_dir,
+ CORE_ADDR start_addr)
{
+ buildsym_objfile = objfile;
+ buildsym_comp_dir = comp_dir != NULL ? xstrdup (comp_dir) : NULL;
restart_symtab (start_addr);
set_last_source_file (name);
- start_subfile (name, dirname);
+ start_subfile (name);
/* Save this so that we don't have to go looking for it at the end
of the subfiles list. */
main_subfile = current_subfile;
static void
reset_symtab_globals (void)
{
+ buildsym_objfile = NULL;
+ xfree (buildsym_comp_dir);
+ buildsym_comp_dir = NULL;
set_last_source_file (NULL);
free_subfiles_list ();
pending_macros = NULL;
not contain any symbols. */
struct block *
-end_symtab_get_static_block (CORE_ADDR end_addr, struct objfile *objfile,
- int expandable, int required)
+end_symtab_get_static_block (CORE_ADDR end_addr, int expandable, int required)
{
+ struct objfile *objfile = buildsym_objfile;
+
/* Finish the lexical context of the last function in the file; pop
the context stack. */
/* Make a block for the local symbols within. */
finish_block (cstk->name, &local_symbols, cstk->old_blocks,
- cstk->start_addr, end_addr, objfile);
+ cstk->start_addr, end_addr);
if (context_stack_depth > 0)
{
{
/* Define the STATIC_BLOCK. */
return finish_block_internal (NULL, &file_symbols, NULL,
- last_source_start_addr, end_addr, objfile,
+ last_source_start_addr, end_addr,
0, expandable);
}
}
any memory we allocated while reading debug info. */
static void
-end_symtab_without_blockvector (struct objfile *objfile)
+end_symtab_without_blockvector (void)
{
+ struct objfile *objfile = buildsym_objfile;
struct subfile *subfile;
/* Since we are ignoring these subfiles, we also need
static struct symtab *
end_symtab_with_blockvector (struct block *static_block,
- struct objfile *objfile, int section,
- int expandable)
+ int section, int expandable)
{
+ struct objfile *objfile = buildsym_objfile;
struct symtab *symtab;
struct blockvector *blockvector;
struct subfile *subfile;
/* Create the GLOBAL_BLOCK and build the blockvector. */
finish_block_internal (NULL, &global_symbols, NULL,
- last_source_start_addr, end_addr, objfile,
+ last_source_start_addr, end_addr,
1, expandable);
blockvector = make_blockvector (objfile);
struct symtab *
end_symtab_from_static_block (struct block *static_block,
- struct objfile *objfile, int section,
- int expandable)
+ int section, int expandable)
{
struct symtab *s;
if (static_block == NULL)
{
- end_symtab_without_blockvector (objfile);
+ end_symtab_without_blockvector ();
s = NULL;
}
else
- {
- s = end_symtab_with_blockvector (static_block, objfile, section,
- expandable);
- }
+ s = end_symtab_with_blockvector (static_block, section, expandable);
reset_symtab_globals ();
yourself. */
struct symtab *
-end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
+end_symtab (CORE_ADDR end_addr, int section)
{
struct block *static_block;
- static_block = end_symtab_get_static_block (end_addr, objfile, 0, 0);
- return end_symtab_from_static_block (static_block, objfile, section, 0);
+ static_block = end_symtab_get_static_block (end_addr, 0, 0);
+ return end_symtab_from_static_block (static_block, section, 0);
}
/* Same as end_symtab except create a symtab that can be later added to. */
struct symtab *
-end_expandable_symtab (CORE_ADDR end_addr, struct objfile *objfile,
- int section)
+end_expandable_symtab (CORE_ADDR end_addr, int section)
{
struct block *static_block;
- static_block = end_symtab_get_static_block (end_addr, objfile, 1, 0);
- return end_symtab_from_static_block (static_block, objfile, section, 1);
+ static_block = end_symtab_get_static_block (end_addr, 1, 0);
+ return end_symtab_from_static_block (static_block, section, 1);
}
/* Subroutine of augment_type_symtab to simplify it.
This is the case for DWARF4 Type Units. */
void
-augment_type_symtab (struct objfile *objfile, struct symtab *primary_symtab)
+augment_type_symtab (struct symtab *primary_symtab)
{
const struct blockvector *blockvector = primary_symtab->blockvector;
extern struct block *finish_block (struct symbol *symbol,
struct pending **listhead,
struct pending_block *old_blocks,
- CORE_ADDR start, CORE_ADDR end,
- struct objfile *objfile);
+ CORE_ADDR start, CORE_ADDR end);
extern void record_block_range (struct block *,
CORE_ADDR start, CORE_ADDR end_inclusive);
extern void really_free_pendings (void *dummy);
-extern void start_subfile (const char *name, const char *dirname);
+extern void start_subfile (const char *name);
extern void patch_subfile_names (struct subfile *subfile, char *name);
extern char *pop_subfile (void);
extern struct block *end_symtab_get_static_block (CORE_ADDR end_addr,
- struct objfile *objfile,
int expandable,
int required);
extern struct symtab *end_symtab_from_static_block (struct block *static_block,
- struct objfile *objfile,
int section,
int expandable);
-extern struct symtab *end_symtab (CORE_ADDR end_addr,
- struct objfile *objfile, int section);
+extern struct symtab *end_symtab (CORE_ADDR end_addr, int section);
extern struct symtab *end_expandable_symtab (CORE_ADDR end_addr,
- struct objfile *objfile,
int section);
-extern void augment_type_symtab (struct objfile *objfile,
- struct symtab *primary_symtab);
+extern void augment_type_symtab (struct symtab *primary_symtab);
/* Defined in stabsread.c. */
extern record_line_ftype record_line;
-extern void start_symtab (const char *name, const char *dirname,
+extern void start_symtab (struct objfile *objfile,
+ const char *name, const char *dirname,
CORE_ADDR start_addr);
extern void restart_symtab (CORE_ADDR start_addr);
/* Return the macro table. */
-extern struct macro_table *get_macro_table (struct objfile *objfile,
- const char *comp_dir);
+extern struct macro_table *get_macro_table (const char *comp_dir);
#undef EXTERN
it indicates the start of data for one original source file. */
static void
-coff_start_symtab (const char *name)
+coff_start_symtab (struct objfile *objfile, const char *name)
{
- start_symtab (
+ start_symtab (objfile,
/* We fill in the filename later. start_symtab puts this pointer
into last_source_file and we put it in subfiles->name, which
end_symtab frees; that's why it must be malloc'd. */
{
last_source_start_addr = current_source_start_addr;
- end_symtab (current_source_end_addr, objfile,
- SECT_OFF_TEXT (objfile));
+ end_symtab (current_source_end_addr, SECT_OFF_TEXT (objfile));
/* Reinitialize for beginning of new file. */
set_last_source_file (NULL);
xmalloc (type_vector_length * sizeof (struct type *));
memset (type_vector, 0, type_vector_length * sizeof (struct type *));
- coff_start_symtab ("");
+ coff_start_symtab (objfile, "");
symnum = 0;
while (symnum < nsyms)
if (get_last_source_file ())
coff_end_symtab (objfile);
- coff_start_symtab ("_globals_");
+ coff_start_symtab (objfile, "_globals_");
/* coff_start_symtab will set the language of this symtab to
language_unknown, since such a ``file name'' is not
recognized. Override that with the minimal language to
if (get_last_source_file ())
{
coff_end_symtab (objfile);
- coff_start_symtab (filestring);
+ coff_start_symtab (objfile, filestring);
}
in_source_file = 1;
break;
fcn_cs_saved.c_value
+ fcn_aux_saved.x_sym.x_misc.x_fsize
+ ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile)),
- objfile
- );
+ SECT_OFF_TEXT (objfile)));
within_function = 0;
}
break;
SECT_OFF_TEXT (objfile));
/* Make a block for the local symbols within. */
finish_block (0, &local_symbols, new->old_blocks,
- new->start_addr, tmpaddr, objfile);
+ new->start_addr, tmpaddr);
}
/* Now pop locals of block just finished. */
local_symbols = new->locals;
if (last_source_start_addr > text_offset)
last_source_start_addr = text_offset;
- pst->symtab = end_symtab (text_offset + text_size, objfile,
+ pst->symtab = end_symtab (text_offset + text_size,
SECT_OFF_TEXT (objfile));
end_stabs ();
/* Make a block for the local symbols within. */
block = finish_block (new->name, &local_symbols, new->old_blocks,
- new->start_addr, new->start_addr + valu,
- objfile);
+ new->start_addr, new->start_addr + valu);
/* For C++, set the block's scope. */
if (SYMBOL_LANGUAGE (new->name) == language_cplus)
}
/* Make a block for the local symbols within. */
finish_block (0, &local_symbols, new->old_blocks,
- new->start_addr, valu, objfile);
+ new->start_addr, valu);
}
}
else
patch_subfile_names (current_subfile, name);
break; /* Ignore repeated SOs. */
}
- end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
+ end_symtab (valu, SECT_OFF_TEXT (objfile));
end_stabs ();
}
function_start_offset = 0;
start_stabs ();
- start_symtab (name, NULL, valu);
+ start_symtab (objfile, name, NULL, valu);
record_debugformat ("stabs");
break;
in the compilation of the main source file (whose name was
given in the N_SO symbol). Relocate for dynamic loading. */
valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
- start_subfile (name, current_subfile->dirname);
+ start_subfile (name);
break;
case N_BINCL:
push_subfile ();
add_new_header_file (name, valu);
- start_subfile (name, current_subfile->dirname);
+ start_subfile (name);
break;
case N_EINCL:
- start_subfile (pop_subfile (), current_subfile->dirname);
+ start_subfile (pop_subfile ());
break;
case N_EXCL:
/* Make a block for the local symbols within. */
block = finish_block (new->name, &local_symbols,
new->old_blocks, new->start_addr,
- valu, objfile);
+ valu);
/* For C++, set the block's scope. */
if (SYMBOL_LANGUAGE (new->name) == language_cplus)
struct dwarf2_cu *, struct partial_symtab *,
CORE_ADDR);
-static void dwarf2_start_subfile (const char *, const char *, const char *);
+static void dwarf2_start_subfile (const char *, const char *);
static void dwarf2_start_symtab (struct dwarf2_cu *,
const char *, const char *, CORE_ADDR);
get_scope_pc_bounds (cu->dies, &lowpc, &highpc, cu);
static_block
- = end_symtab_get_static_block (highpc + baseaddr, objfile, 0, 1);
+ = end_symtab_get_static_block (highpc + baseaddr, 0, 1);
/* If the comp unit has DW_AT_ranges, it may have discontiguous ranges.
Also, DW_AT_ranges may record ranges not belonging to any child DIEs
this comp unit. */
dwarf2_record_block_ranges (cu->dies, static_block, baseaddr, cu);
- symtab = end_symtab_from_static_block (static_block, objfile,
+ symtab = end_symtab_from_static_block (static_block,
SECT_OFF_TEXT (objfile), 0);
if (symtab != NULL)
this TU's symbols to the existing symtab. */
if (sig_type->type_unit_group->primary_symtab == NULL)
{
- symtab = end_expandable_symtab (0, objfile, SECT_OFF_TEXT (objfile));
+ symtab = end_expandable_symtab (0, SECT_OFF_TEXT (objfile));
sig_type->type_unit_group->primary_symtab = symtab;
if (symtab != NULL)
}
else
{
- augment_type_symtab (objfile,
- sig_type->type_unit_group->primary_symtab);
+ augment_type_symtab (sig_type->type_unit_group->primary_symtab);
symtab = sig_type->type_unit_group->primary_symtab;
}
if (fe->dir_index)
dir = lh->include_dirs[fe->dir_index - 1];
- dwarf2_start_subfile (fe->name, dir, NULL);
+ dwarf2_start_subfile (fe->name, dir);
/* Note: We don't have to watch for the main subfile here, type units
don't have DW_AT_name. */
new = pop_context ();
/* Make a block for the local symbols within. */
block = finish_block (new->name, &local_symbols, new->old_blocks,
- lowpc, highpc, objfile);
+ lowpc, highpc);
/* For C++, set the block's scope. */
if ((cu->language == language_cplus || cu->language == language_fortran)
{
struct block *block
= finish_block (0, &local_symbols, new->old_blocks, new->start_addr,
- highpc, objfile);
+ highpc);
/* Note that recording ranges after traversing children, as we
do here, means that recording a parent's ranges entails
if (fe->dir_index)
dir = lh->include_dirs[fe->dir_index - 1];
- dwarf2_start_subfile (fe->name, dir, comp_dir);
+ dwarf2_start_subfile (fe->name, dir);
}
/* Decode the table. */
{
last_subfile = current_subfile;
line_has_non_zero_discriminator = discriminator != 0;
- dwarf2_start_subfile (fe->name, dir, comp_dir);
+ dwarf2_start_subfile (fe->name, dir);
}
}
}
fe = &lh->file_names[i];
if (fe->dir_index)
dir = lh->include_dirs[fe->dir_index - 1];
- dwarf2_start_subfile (fe->name, dir, comp_dir);
+ dwarf2_start_subfile (fe->name, dir);
/* Skip the main file; we don't need it, and it must be
allocated last, so that it will show up before the
/* Start a subfile for DWARF. FILENAME is the name of the file and
DIRNAME the name of the source directory which contains FILENAME
- or NULL if not known. COMP_DIR is the compilation directory for the
- linetable's compilation unit or NULL if not known.
+ or NULL if not known.
This routine tries to keep line numbers from identical absolute and
relative file names in a common subfile.
of /srcdir/list0.c yields the following debugging information for list0.c:
DW_AT_name: /srcdir/list0.c
- DW_AT_comp_dir: /compdir
+ DW_AT_comp_dir: /compdir
files.files[0].name: list0.h
files.files[0].dir: /srcdir
files.files[1].name: list0.c
subfile's name. */
static void
-dwarf2_start_subfile (const char *filename, const char *dirname,
- const char *comp_dir)
+dwarf2_start_subfile (const char *filename, const char *dirname)
{
char *copy = NULL;
- /* While reading the DIEs, we call start_symtab(DW_AT_name, DW_AT_comp_dir).
- `start_symtab' will always pass the contents of DW_AT_comp_dir as
- second argument to start_subfile. To be consistent, we do the
- same here. In order not to lose the line information directory,
+ /* In order not to lose the line information directory,
we concatenate it to the filename when it makes sense.
Note that the Dwarf3 standard says (speaking of filenames in line
information): ``The directory index is ignored for file names
filename = copy;
}
- start_subfile (filename, comp_dir);
+ start_subfile (filename);
if (copy != NULL)
xfree (copy);
dwarf2_start_symtab (struct dwarf2_cu *cu,
const char *name, const char *comp_dir, CORE_ADDR low_pc)
{
- start_symtab (name, comp_dir, low_pc);
+ start_symtab (dwarf2_per_objfile->objfile, name, comp_dir, low_pc);
record_debugformat ("DWARF 2");
record_producer (cu->producer);
macro_start_file (int file, int line,
struct macro_source_file *current_file,
const char *comp_dir,
- struct line_header *lh, struct objfile *objfile)
+ struct line_header *lh)
{
/* File name relative to the compilation directory of this source file. */
char *file_name = file_file_name (file, lh);
{
/* Note: We don't create a macro table for this compilation unit
at all until we actually get a filename. */
- struct macro_table *macro_table = get_macro_table (objfile, comp_dir);
+ struct macro_table *macro_table = get_macro_table (comp_dir);
/* If we have no current file, then this must be the start_file
directive for the compilation unit's main source file. */
struct dwarf2_section_info *section,
int section_is_gnu, int section_is_dwz,
unsigned int offset_size,
- struct objfile *objfile,
htab_t include_hash)
{
+ struct objfile *objfile = dwarf2_per_objfile->objfile;
enum dwarf_macro_record_type macinfo_type;
int at_commandline;
const gdb_byte *opcode_definitions[256];
at_commandline = 0;
}
else
- current_file = macro_start_file (file, line,
- current_file, comp_dir,
- lh, objfile);
+ current_file = macro_start_file (file, line, current_file,
+ comp_dir, lh);
}
break;
{
struct dwz_file *dwz = dwarf2_get_dwz_file ();
- dwarf2_read_section (dwarf2_per_objfile->objfile,
- &dwz->macro);
+ dwarf2_read_section (objfile, &dwz->macro);
include_section = &dwz->macro;
include_bfd = get_section_bfd_owner (include_section);
include_mac_end, current_file,
lh, comp_dir,
section, section_is_gnu, is_dwz,
- offset_size, objfile, include_hash);
+ offset_size, include_hash);
htab_remove_elt (include_hash, (void *) new_mac_ptr);
}
mac_ptr += bytes_read;
current_file = macro_start_file (file, line, current_file,
- comp_dir, lh, objfile);
+ comp_dir, lh);
}
break;
*slot = (void *) mac_ptr;
dwarf_decode_macro_bytes (abfd, mac_ptr, mac_end,
current_file, lh, comp_dir, section,
- section_is_gnu, 0,
- offset_size, objfile, include_hash);
+ section_is_gnu, 0, offset_size, include_hash);
do_cleanups (cleanup);
}
valu += ANOFFSET (pst->section_offsets,
SECT_OFF_TEXT (objfile));
previous_stab_code = N_SO;
- st = end_symtab (valu, objfile,
- SECT_OFF_TEXT (objfile));
+ st = end_symtab (valu, SECT_OFF_TEXT (objfile));
end_stabs ();
last_symtab_ended = 1;
}
if (! last_symtab_ended)
{
- st = end_symtab (pst->texthigh, objfile,
- SECT_OFF_TEXT (objfile));
+ st = end_symtab (pst->texthigh, SECT_OFF_TEXT (objfile));
end_stabs ();
}
fool it. */
#if 0
- start_subfile (inclTable[ii].name, (char *) 0);
+ start_subfile (inclTable[ii].name);
#else
{
/* Pick a fake name that will produce the same results as this
if (fakename == NULL)
fakename = " ?";
- start_subfile (fakename, (char *) 0);
+ start_subfile (fakename);
xfree (current_subfile->name);
}
current_subfile->name = xstrdup (inclTable[ii].name);
current_subfile->line_vector_length =
current_subfile->line_vector->nitems;
- start_subfile (pop_subfile (), (char *) 0);
+ start_subfile (pop_subfile ());
}
}
last_csect_name = 0;
start_stabs ();
- start_symtab (filestring, (char *) NULL, file_start_addr);
+ start_symtab (objfile, filestring, (char *) NULL, file_start_addr);
record_debugformat (debugfmt);
symnum = ((struct symloc *) pst->read_symtab_private)->first_symnum;
max_symnum =
{
if (get_last_source_file ())
{
- pst->symtab = end_symtab (cur_src_end_addr, objfile,
+ pst->symtab = end_symtab (cur_src_end_addr,
SECT_OFF_TEXT (objfile));
end_stabs ();
}
start_stabs ();
- start_symtab ("_globals_", (char *) NULL, (CORE_ADDR) 0);
+ start_symtab (objfile, "_globals_", (char *) NULL, (CORE_ADDR) 0);
record_debugformat (debugfmt);
cur_src_end_addr = first_object_file_end;
/* Done with all files, everything from here on is globals. */
{
complete_symtab (filestring, file_start_addr);
cur_src_end_addr = file_end_addr;
- end_symtab (file_end_addr, objfile,
+ end_symtab (file_end_addr,
SECT_OFF_TEXT (objfile));
end_stabs ();
start_stabs ();
/* Give all csects for this source file the same
name. */
- start_symtab (filestring, NULL, (CORE_ADDR) 0);
+ start_symtab (objfile, filestring, NULL,
+ (CORE_ADDR) 0);
record_debugformat (debugfmt);
}
complete_symtab (filestring, file_start_addr);
cur_src_end_addr = file_end_addr;
- end_symtab (file_end_addr, objfile, SECT_OFF_TEXT (objfile));
+ end_symtab (file_end_addr, SECT_OFF_TEXT (objfile));
end_stabs ();
/* XCOFF, according to the AIX 3.2 documentation, puts the
filestring = cs->c_name;
start_stabs ();
- start_symtab (filestring, (char *) NULL, (CORE_ADDR) 0);
+ start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0);
record_debugformat (debugfmt);
last_csect_name = 0;
(fcn_cs_saved.c_value
+ fcn_aux_saved.x_sym.x_misc.x_fsize
+ ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile))),
- objfile);
+ SECT_OFF_TEXT (objfile))));
within_function = 0;
}
break;
new->start_addr,
(cs->c_value
+ ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile))),
- objfile);
+ SECT_OFF_TEXT (objfile))));
}
local_symbols = new->locals;
}
complete_symtab (filestring, file_start_addr);
cur_src_end_addr = file_end_addr;
- s = end_symtab (file_end_addr, objfile, SECT_OFF_TEXT (objfile));
+ s = end_symtab (file_end_addr, SECT_OFF_TEXT (objfile));
/* When reading symbols for the last C_FILE of the objfile, try
to make sure that we set pst->symtab to the symtab for the
file, not to the _globals_ symtab. I'm not sure whether this