2005-11-17 Andrew Stubbs * mi/mi-main.c (mi_load_progress): Don't do anything for -i=mi. Ensure the use of mi1 uiout for the duration of the function. Index: src/gdb/mi/mi-main.c =================================================================== --- src.orig/gdb/mi/mi-main.c 2005-06-13 23:21:57.000000000 +0100 +++ src/gdb/mi/mi-main.c 2005-11-17 18:58:45.000000000 +0000 @@ -1365,11 +1365,17 @@ mi_load_progress (const char *section_na static struct timeval last_update; static char *previous_sect_name = NULL; int new_section; + struct ui_out *saved_uiout; - if (!current_interp_named_p (INTERP_MI) - && !current_interp_named_p (INTERP_MI1)) + if (!current_interp_named_p (INTERP_MI1)) return; + /* This function is called through deprecated_show_load_progress + which means uiout may not be correct. Fix it for the duration + of this function. */ + saved_uiout = uiout; + uiout = mi_out_new (1); + update_threshold.tv_sec = 0; update_threshold.tv_usec = 500000; gettimeofday (&time_now, NULL); @@ -1424,6 +1430,9 @@ mi_load_progress (const char *section_na fputs_unfiltered ("\n", raw_stdout); gdb_flush (raw_stdout); } + + xfree (uiout); + uiout = saved_uiout; } void