Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: gdb/dictionary.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/dictionary.h ('k') | gdb/disasm.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/dictionary.c
diff --git a/gdb/dictionary.c b/gdb/dictionary.c
index 00c72e8a8a5513dff761708acc891dde7cc389a1..62362c5c82e19def22def297b528f936f55cb51d 100644
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -498,6 +498,22 @@ dict_add_symbol (struct dictionary *dict, struct symbol *sym)
(DICT_VECTOR (dict))->add_symbol (dict, sym);
}
+/* Utility to add a list of symbols to a dictionary.
+ DICT must be an expandable dictionary. */
+
+void
+dict_add_pending (struct dictionary *dict, const struct pending *symbol_list)
+{
+ const struct pending *list;
+ int i;
+
+ for (list = symbol_list; list != NULL; list = list->next)
+ {
+ for (i = 0; i < list->nsyms; ++i)
+ dict_add_symbol (dict, list->symbol[i]);
+ }
+}
+
/* Initialize ITERATOR to point at the first symbol in DICT, and
return that first symbol, or NULL if DICT is empty. */
@@ -800,6 +816,17 @@ dict_hash (const char *string0)
hash = 0;
while (*string)
{
+ /* Ignore "TKB" suffixes.
+
+ These are used by Ada for subprograms implementing a task body.
+ For instance for a task T inside package Pck, the name of the
+ subprogram implementing T's body is `pck__tTKB'. We need to
+ ignore the "TKB" suffix because searches for this task body
+ subprogram are going to be performed using `pck__t' (the encoded
+ version of the natural name `pck.t'). */
+ if (strcmp (string, "TKB") == 0)
+ return hash;
+
switch (*string)
{
case '$':
« no previous file with comments | « gdb/dictionary.h ('k') | gdb/disasm.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698