diff options
author | Doug Evans <dje@google.com> | 2011-12-20 04:29:35 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2011-12-20 04:29:35 +0000 |
commit | 87c31f06224db060e86fab624a9cc3580c01621d (patch) | |
tree | 5c20ad028bb8189695a318a9f903fd6b22c32538 | |
parent | 9542d6ad012af723234ee837d6995e628de36286 (diff) | |
download | gdb-87c31f06224db060e86fab624a9cc3580c01621d.zip gdb-87c31f06224db060e86fab624a9cc3580c01621d.tar.gz gdb-87c31f06224db060e86fab624a9cc3580c01621d.tar.bz2 |
* python/py-auto-load.c (info_auto_load_scripts): Pass address of
scripts vector to collect_matching_scripts.
(collect_matching_scripts): Update.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/python/py-auto-load.c | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7c8d38f..2eba21a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-12-19 Doug Evans <dje@google.com> + + * python/py-auto-load.c (info_auto_load_scripts): Pass address of + scripts vector to collect_matching_scripts. + (collect_matching_scripts): Update. + 2011-12-19 Jan Kratochvil <jan.kratochvil@redhat.com> * symfile.c (reread_symbols): Move free_objfile_separate_debug, diff --git a/gdb/python/py-auto-load.c b/gdb/python/py-auto-load.c index 62975ea..ef332ea 100644 --- a/gdb/python/py-auto-load.c +++ b/gdb/python/py-auto-load.c @@ -481,10 +481,10 @@ static int collect_matching_scripts (void **slot, void *info) { struct loaded_script *script = *slot; - VEC (loaded_script_ptr) *scripts = info; + VEC (loaded_script_ptr) **scripts_ptr = info; if (re_exec (script->name)) - VEC_safe_push (loaded_script_ptr, scripts, script); + VEC_safe_push (loaded_script_ptr, *scripts_ptr, script); return 1; } @@ -563,8 +563,9 @@ info_auto_load_scripts (char *pattern, int from_tty) if (pspace_info != NULL && pspace_info->loaded_scripts != NULL) { immediate_quit++; + /* Pass a pointer to scripts as VEC_safe_push can realloc space. */ htab_traverse_noresize (pspace_info->loaded_scripts, - collect_matching_scripts, scripts); + collect_matching_scripts, &scripts); immediate_quit--; } |