From 8157b174fd3b230a9d2cca6dae07562b38bad9fe Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 10 May 2012 19:50:09 +0000 Subject: * tracepoint.c (scope_info): Update. * symtab.c (lookup_block_symbol, iterate_over_symbols) (find_pc_sect_symtab, search_symbols) (default_make_symbol_completion_list_break_on) (make_file_symbol_completion_list): Update. * symmisc.c (dump_symtab_1): Update. * stack.c (print_frame_args, iterate_over_block_locals) (print_frame_labels, iterate_over_block_arg_vars): Update. * python/py-block.c (block_object) : Remove. : New field. : Change type. (blpy_iter): Update. (blpy_block_syms_iternext): Update. * psymtab.c (map_block): Use block iterators. * objfiles.c (objfile_relocate1): Use ALL_DICT_SYMBOLS. * mi/mi-cmd-stack.c (list_args_or_locals): Update. * mdebugread.c (parse_symbol, mylookup_symbol): Update. * infrun.c (check_exception_resume): Update. * cp-support.c (make_symbol_overload_list_block): Update. * coffread.c (patch_opaque_types): Update. * buildsym.c (finish_block, end_symtab): Use ALL_DICT_SYMBOLS. * block.h (struct block_iterator): New. (block_iterator_first, block_iterator_next, block_iter_name_first) (block_iter_name_next, block_iter_match_first) (block_iter_match_next): Declare. (ALL_BLOCK_SYMBOLS): Redefine. * block.c (block_iterator_first, block_iterator_next) (block_iter_name_first, block_iter_name_next) (block_iter_match_first, block_iter_match_next): New functions. * ada-lang.c (ada_add_block_symbols) (ada_make_symbol_completion_list): Use block iterator. --- gdb/python/py-block.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gdb/python/py-block.c') diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c index ac48193..68d0a15 100644 --- a/gdb/python/py-block.c +++ b/gdb/python/py-block.c @@ -41,10 +41,10 @@ typedef struct blpy_block_object { typedef struct { PyObject_HEAD - /* The block dictionary of symbols. */ - struct dictionary *dict; - /* The iterator for that dictionary. */ - struct dict_iterator iter; + /* The block. */ + const struct block *block; + /* The iterator for that block. */ + struct block_iterator iter; /* Has the iterator been initialized flag. */ int initialized_p; /* Pointer back to the original source block object. Needed to @@ -94,7 +94,7 @@ blpy_iter (PyObject *self) if (block_iter_obj == NULL) return NULL; - block_iter_obj->dict = BLOCK_DICT (block); + block_iter_obj->block = block; block_iter_obj->initialized_p = 0; Py_INCREF (self); block_iter_obj->source = (block_object *) self; @@ -311,11 +311,11 @@ blpy_block_syms_iternext (PyObject *self) if (!iter_obj->initialized_p) { - sym = dict_iterator_first (iter_obj->dict, &(iter_obj->iter)); + sym = block_iterator_first (iter_obj->block, &(iter_obj->iter)); iter_obj->initialized_p = 1; } else - sym = dict_iterator_next (&(iter_obj->iter)); + sym = block_iterator_next (&(iter_obj->iter)); if (sym == NULL) { -- cgit v1.1