summaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-11-18 09:36:15 -0800
committerDoug Evans <xdje42@gmail.com>2014-11-18 09:37:50 -0800
commit4d663531f209bcbd7209ef2f1a02e0b0d4e7385a (patch)
treeb1256ba7edd0060d1ec3b2dd66ca6b56b17d661b /gdb/coffread.c
parent0593bd3ace3cb64775f4d9e8039da919c26803cd (diff)
buildsym API cleanup
gdb/ChangeLog: * 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.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index ea494f5ce7..8df12cbf04 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -382,9 +382,9 @@ coff_alloc_type (int index)
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. */
@@ -421,8 +421,7 @@ coff_end_symtab (struct objfile *objfile)
{
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);
@@ -832,7 +831,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
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)
@@ -846,7 +845,7 @@ coff_symtab_read (long symtab_offset, unsigned int 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
@@ -910,7 +909,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
if (get_last_source_file ())
{
coff_end_symtab (objfile);
- coff_start_symtab (filestring);
+ coff_start_symtab (objfile, filestring);
}
in_source_file = 1;
break;
@@ -1136,9 +1135,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
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;
@@ -1178,7 +1175,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
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;