aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-10-26 13:53:58 -0700
committerDoug Evans <xdje42@gmail.com>2014-10-26 13:53:58 -0700
commitf88cb4b683ffe4722fcee751c2b046ceb807deed (patch)
tree72354361c72cbac5aa490c7ed41ce1c0958c836f /gdb
parenta023a30fb494294f739b3414a28d11da8c298d3f (diff)
downloadgdb-f88cb4b683ffe4722fcee751c2b046ceb807deed.zip
gdb-f88cb4b683ffe4722fcee751c2b046ceb807deed.tar.gz
gdb-f88cb4b683ffe4722fcee751c2b046ceb807deed.tar.bz2
Rename parameter "kind" to "block_index" in quick lookup functions.
gdb/ChangeLog: * symfile.h (struct quick_symbol_functions) <lookup_symbol>: Rename parameter "kind" to "block_index". * symtab.c (error_in_psymtab_expansion): Rename parameter "kind" to "block_index". (lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/symfile.h4
-rw-r--r--gdb/symtab.c22
3 files changed, 22 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 50727c1..b28705d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2014-10-26 Doug Evans <xdje42@gmail.com>
+ * symfile.h (struct quick_symbol_functions) <lookup_symbol>: Rename
+ parameter "kind" to "block_index".
+ * symtab.c (error_in_psymtab_expansion): Rename parameter "kind" to
+ "block_index".
+ (lookup_symbol_aux_quick, basic_lookup_transparent_type_quick): Ditto.
+
+2014-10-26 Doug Evans <xdje42@gmail.com>
+
* block.h (ALL_BLOCK_SYMBOLS): Fix comment.
2014-10-26 Doug Evans <xdje42@gmail.com>
diff --git a/gdb/symfile.h b/gdb/symfile.h
index ff25028..f56aff3 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -188,7 +188,7 @@ struct quick_symbol_functions
void *data);
/* Check to see if the symbol is defined in a "partial" symbol table
- of OBJFILE. KIND should be either GLOBAL_BLOCK or STATIC_BLOCK,
+ of OBJFILE. BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK,
depending on whether we want to search global symbols or static
symbols. NAME is the name of the symbol to look for. DOMAIN
indicates what sort of symbol to search for.
@@ -198,7 +198,7 @@ struct quick_symbol_functions
contains !TYPE_OPAQUE symbol prefer its symtab. If it contains
only TYPE_OPAQUE symbol(s), return at least that symtab. */
struct symtab *(*lookup_symbol) (struct objfile *objfile,
- int kind, const char *name,
+ int block_index, const char *name,
domain_enum domain);
/* Print statistics about any indices loaded for OBJFILE. The
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 021d538..7e1dbd6 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1714,13 +1714,14 @@ lookup_symbol_in_objfile_from_linkage_name (struct objfile *objfile,
in a psymtab but not in a symtab. */
static void ATTRIBUTE_NORETURN
-error_in_psymtab_expansion (int kind, const char *name, struct symtab *symtab)
+error_in_psymtab_expansion (int block_index, const char *name,
+ struct symtab *symtab)
{
error (_("\
Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\
%s may be an inlined function, or may be a template function\n \
(if a template, try specifying an instantiation: %s<type>)."),
- kind == GLOBAL_BLOCK ? "global" : "static",
+ block_index == GLOBAL_BLOCK ? "global" : "static",
name, symtab_to_filename_for_display (symtab), name, name);
}
@@ -1728,7 +1729,7 @@ Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\
"quick" symbol table functions. */
static struct symbol *
-lookup_symbol_aux_quick (struct objfile *objfile, int kind,
+lookup_symbol_aux_quick (struct objfile *objfile, int block_index,
const char *name, const domain_enum domain)
{
struct symtab *symtab;
@@ -1738,15 +1739,15 @@ lookup_symbol_aux_quick (struct objfile *objfile, int kind,
if (!objfile->sf)
return NULL;
- symtab = objfile->sf->qf->lookup_symbol (objfile, kind, name, domain);
+ symtab = objfile->sf->qf->lookup_symbol (objfile, block_index, name, domain);
if (!symtab)
return NULL;
bv = BLOCKVECTOR (symtab);
- block = BLOCKVECTOR_BLOCK (bv, kind);
+ block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = lookup_block_symbol (block, name, domain);
if (!sym)
- error_in_psymtab_expansion (kind, name, symtab);
+ error_in_psymtab_expansion (block_index, name, symtab);
block_found = block;
return fixup_symbol_section (sym, objfile);
}
@@ -1911,7 +1912,7 @@ lookup_transparent_type (const char *name)
"quick" symbol table functions. */
static struct type *
-basic_lookup_transparent_type_quick (struct objfile *objfile, int kind,
+basic_lookup_transparent_type_quick (struct objfile *objfile, int block_index,
const char *name)
{
struct symtab *symtab;
@@ -1921,15 +1922,16 @@ basic_lookup_transparent_type_quick (struct objfile *objfile, int kind,
if (!objfile->sf)
return NULL;
- symtab = objfile->sf->qf->lookup_symbol (objfile, kind, name, STRUCT_DOMAIN);
+ symtab = objfile->sf->qf->lookup_symbol (objfile, block_index, name,
+ STRUCT_DOMAIN);
if (!symtab)
return NULL;
bv = BLOCKVECTOR (symtab);
- block = BLOCKVECTOR_BLOCK (bv, kind);
+ block = BLOCKVECTOR_BLOCK (bv, block_index);
sym = lookup_block_symbol (block, name, STRUCT_DOMAIN);
if (!sym)
- error_in_psymtab_expansion (kind, name, symtab);
+ error_in_psymtab_expansion (block_index, name, symtab);
if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
return SYMBOL_TYPE (sym);