aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-auto-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-auto-load.c')
-rw-r--r--gdb/python/py-auto-load.c7
1 files changed, 4 insertions, 3 deletions
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--;
}