This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv] [mi] code cleanup: varobj_create variables move
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 6 Aug 2010 16:18:48 +0200
- Subject: [obv] [mi] code cleanup: varobj_create variables move
Checked-in.
http://sourceware.org/ml/gdb-cvs/2010-08/msg00024.html
--- src/gdb/ChangeLog 2010/08/05 16:19:18 1.12061
+++ src/gdb/ChangeLog 2010/08/06 14:17:55 1.12062
@@ -1,3 +1,9 @@
+2010-08-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup.
+ * varobj.c (varobj_create): Move variables fi, old_fi and block to
+ a more inner block.
+
2010-08-05 Pedro Alves <pedro@codesourcery.com>
* configure.tgt (alpha*-*-linux*, am33_2.0*-*-linux*, frv-*-*)
--- src/gdb/varobj.c 2010/05/17 18:48:52 1.158
+++ src/gdb/varobj.c 2010/08/06 14:17:56 1.159
@@ -528,9 +528,6 @@
char *expression, CORE_ADDR frame, enum varobj_type type)
{
struct varobj *var;
- struct frame_info *fi;
- struct frame_info *old_fi = NULL;
- struct block *block;
struct cleanup *old_chain;
/* Fill out a varobj structure for the (root) variable being constructed. */
@@ -539,6 +536,9 @@
if (expression != NULL)
{
+ struct frame_info *fi;
+ struct frame_info *old_fi = NULL;
+ struct block *block;
char *p;
enum varobj_languages lang;
struct value *value = NULL;