aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-08-19 07:34:27 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-08-19 07:34:27 +0000
commit35633fef927791e0267443222a23c5338eff6626 (patch)
tree4defcab61d1b3ddb5ee76a2906bcd849c49d203d /gdb
parent7b3fd859423f6b43b9f26573fe419904e9f41a91 (diff)
downloadfsf-binutils-gdb-35633fef927791e0267443222a23c5338eff6626.zip
fsf-binutils-gdb-35633fef927791e0267443222a23c5338eff6626.tar.gz
fsf-binutils-gdb-35633fef927791e0267443222a23c5338eff6626.tar.bz2
gdb/
* varobj.c (varobj_create): Replace variable old_fi with old_id, initialize it by null_frame_id, wrap its usage by get_frame_id, frame_id_p and frame_find_by_id.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/varobj.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c35c47b..b889876 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-19 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * varobj.c (varobj_create): Replace variable old_fi with old_id,
+ initialize it by null_frame_id, wrap its usage by get_frame_id,
+ frame_id_p and frame_find_by_id.
+
2010-08-18 Tom Tromey <tromey@redhat.com>
PR python/11900:
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 35c6ce7..56cb8ae 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -537,7 +537,7 @@ varobj_create (char *objname,
if (expression != NULL)
{
struct frame_info *fi;
- struct frame_info *old_fi = NULL;
+ struct frame_id old_id = null_frame_id;
struct block *block;
char *p;
enum varobj_languages lang;
@@ -611,7 +611,7 @@ varobj_create (char *objname,
var->root->frame = get_frame_id (fi);
var->root->thread_id = pid_to_thread_id (inferior_ptid);
- old_fi = get_selected_frame (NULL);
+ old_id = get_frame_id (get_selected_frame (NULL));
select_frame (fi);
}
@@ -639,8 +639,8 @@ varobj_create (char *objname,
var->root->rootvar = var;
/* Reset the selected frame */
- if (old_fi != NULL)
- select_frame (old_fi);
+ if (frame_id_p (old_id))
+ select_frame (frame_find_by_id (old_id));
}
/* If the variable object name is null, that means this