projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update/correct copyright notices.
[deliverable/binutils-gdb.git]
/
gdb
/
symtab.c
diff --git
a/gdb/symtab.c
b/gdb/symtab.c
index be021dd33910d6f3c8c55ece931924803e84ffd0..515612e5ba66f5ec797761c6e2cc95010d978046 100644
(file)
--- a/
gdb/symtab.c
+++ b/
gdb/symtab.c
@@
-1,5
+1,6
@@
/* Symbol table lookup for the GNU debugger, GDB.
/* Symbol table lookup for the GNU debugger, GDB.
- Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+ 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
Free Software Foundation, Inc.
This file is part of GDB.
@@
-35,6
+36,7
@@
#include "language.h"
#include "demangle.h"
#include "inferior.h"
#include "language.h"
#include "demangle.h"
#include "inferior.h"
+#include "linespec.h"
#include "obstack.h"
#include "obstack.h"
@@
-594,7
+596,7
@@
lookup_symbol (const char *name, const struct block *block,
returnval = lookup_symbol_aux (modified_name, block, namespace,
is_a_field_of_this, symtab);
if (needtofreename)
returnval = lookup_symbol_aux (modified_name, block, namespace,
is_a_field_of_this, symtab);
if (needtofreename)
- free (modified_name2);
+
x
free (modified_name2);
return returnval;
}
return returnval;
}
@@
-770,8
+772,8
@@
lookup_symbol_aux (const char *name, const struct block *block,
{
/* This is a mangled variable, look it up by its
mangled name. */
{
/* This is a mangled variable, look it up by its
mangled name. */
- return lookup_symbol (SYMBOL_NAME (msymbol), block,
- namespace, is_a_field_of_this, symtab);
+ return lookup_symbol
_aux
(SYMBOL_NAME (msymbol), block,
+
namespace, is_a_field_of_this, symtab);
}
/* There are no debug symbols for this file, or we are looking
for an unmangled variable.
}
/* There are no debug symbols for this file, or we are looking
for an unmangled variable.
@@
-948,8
+950,8
@@
lookup_symbol_aux (const char *name, const struct block *block,
&& MSYMBOL_TYPE (msymbol) != mst_file_text
&& !STREQ (name, SYMBOL_NAME (msymbol)))
{
&& MSYMBOL_TYPE (msymbol) != mst_file_text
&& !STREQ (name, SYMBOL_NAME (msymbol)))
{
- return lookup_symbol (SYMBOL_NAME (msymbol), block,
- namespace, is_a_field_of_this, symtab);
+ return lookup_symbol
_aux
(SYMBOL_NAME (msymbol), block,
+
namespace, is_a_field_of_this, symtab);
}
}
}
}
}
}
@@
-997,13
+999,13
@@
lookup_partial_symbol (struct partial_symtab *pst, const char *name, int global,
{
center = bottom + (top - bottom) / 2;
if (!(center < top))
{
center = bottom + (top - bottom) / 2;
if (!(center < top))
-
abort (
);
+
internal_error (__FILE__, __LINE__, "failed internal consistency check"
);
if (!do_linear_search
&& (SYMBOL_LANGUAGE (*center) == language_java))
{
do_linear_search = 1;
}
if (!do_linear_search
&& (SYMBOL_LANGUAGE (*center) == language_java))
{
do_linear_search = 1;
}
- if (
STRCMP
(SYMBOL_SOURCE_NAME (*center), name) >= 0)
+ if (
strcmp
(SYMBOL_SOURCE_NAME (*center), name) >= 0)
{
top = center;
}
{
top = center;
}
@@
-1013,7
+1015,7
@@
lookup_partial_symbol (struct partial_symtab *pst, const char *name, int global,
}
}
if (!(top == bottom))
}
}
if (!(top == bottom))
-
abort (
);
+
internal_error (__FILE__, __LINE__, "failed internal consistency check"
);
/* djb - 2000-06-03 - Use SYMBOL_MATCHES_NAME, not a strcmp, so
we don't have to force a linear search on C++. Probably holds true
/* djb - 2000-06-03 - Use SYMBOL_MATCHES_NAME, not a strcmp, so
we don't have to force a linear search on C++. Probably holds true
@@
-1236,7
+1238,7
@@
lookup_block_symbol (register const struct block *block, const char *name,
{
top = inc;
}
{
top = inc;
}
- else if (
STRCMP
(SYMBOL_SOURCE_NAME (sym), name) < 0)
+ else if (
strcmp
(SYMBOL_SOURCE_NAME (sym), name) < 0)
{
bot = inc;
}
{
bot = inc;
}
@@
-1258,8
+1260,11
@@
lookup_block_symbol (register const struct block *block, const char *name,
while (bot < top)
{
sym = BLOCK_SYM (block, bot);
while (bot < top)
{
sym = BLOCK_SYM (block, bot);
- if (SYMBOL_MATCHES_NAME (sym, name))
- return sym;
+ if (SYMBOL_NAMESPACE (sym) == namespace &&
+ SYMBOL_MATCHES_NAME (sym, name))
+ {
+ return sym;
+ }
bot++;
}
}
bot++;
}
}
@@
-2277,7
+2282,7
@@
free_search_symbols (struct symbol_search *symbols)
for (p = symbols; p != NULL; p = next)
{
next = p->next;
for (p = symbols; p != NULL; p = next)
{
next = p->next;
- free (p);
+
x
free (p);
}
}
}
}
@@
-2344,7
+2349,7
@@
search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[],
struct symbol_search *tail;
struct cleanup *old_chain = NULL;
struct symbol_search *tail;
struct cleanup *old_chain = NULL;
- if (kind <
LABEL
_NAMESPACE)
+ if (kind <
VARIABLES
_NAMESPACE)
error ("must search on specific namespace");
ourtype = types[(int) (kind - VARIABLES_NAMESPACE)];
error ("must search on specific namespace");
ourtype = types[(int) (kind - VARIABLES_NAMESPACE)];
@@
-2636,7
+2641,7
@@
print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym,
else
{
fputs_filtered (demangled_name, stream);
else
{
fputs_filtered (demangled_name, stream);
- free (demangled_name);
+
x
free (demangled_name);
}
#endif
}
}
#endif
}
@@
-2875,7
+2880,7
@@
completion_list_add_name (char *symname, char *sym_text, int sym_text_len,
{
if (STREQ (new, return_val[i]))
{
{
if (STREQ (new, return_val[i]))
{
- free (new);
+
x
free (new);
return;
}
}
return;
}
}
@@
-3182,7
+3187,7
@@
overload_list_add_symbol (struct symbol *sym, char *oload_name)
/* skip symbols that cannot match */
if (strcmp (sym_name, oload_name) != 0)
{
/* skip symbols that cannot match */
if (strcmp (sym_name, oload_name) != 0)
{
- free (sym_name);
+
x
free (sym_name);
return;
}
return;
}
@@
-3205,7
+3210,7
@@
overload_list_add_symbol (struct symbol *sym, char *oload_name)
sym_return_val[sym_return_val_index++] = sym;
sym_return_val[sym_return_val_index] = NULL;
sym_return_val[sym_return_val_index++] = sym;
sym_return_val[sym_return_val_index] = NULL;
- free (sym_name);
+
x
free (sym_name);
}
/* Return a null-terminated list of pointers to function symbols that
}
/* Return a null-terminated list of pointers to function symbols that
@@
-3326,7
+3331,7
@@
make_symbol_overload_list (struct symbol *fsym)
}
}
}
}
- free (oload_name);
+
x
free (oload_name);
return (sym_return_val);
}
return (sym_return_val);
}
This page took
0.026051 seconds
and
4
git commands to generate.