Fix current_uiout restore in mi_load_progress
Joseph S. Myers
joseph@codesourcery.com
Tue Sep 20 17:00:00 GMT 2011
I observed a problem where GDB segfaulted in MI testing while the test
program was being loaded onto the target, which I traced to
mi_load_progress failing to restore the current_uiout global on exit -
instead assigning to the local uiout variable. This appears to be an
oversight in Pedro's 2011-08-04 patch renaming the former uiout
global.
This patch fixes this in the obvious way. Approved offlist by Pedro
and committed.
2011-09-20 Joseph Myers <joseph@codesourcery.com>
* mi/mi-main.c (mi_load_progress): Restore saved_uiout value to
current_uiout, not uiout.
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.205
diff -u -p -r1.205 mi-main.c
--- mi/mi-main.c 28 Aug 2011 20:43:43 -0000 1.205
+++ mi/mi-main.c 19 Sep 2011 23:34:17 -0000
@@ -2266,7 +2266,7 @@ mi_load_progress (const char *section_na
}
xfree (uiout);
- uiout = saved_uiout;
+ current_uiout = saved_uiout;
}
static void
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gdb-patches
mailing list