summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-24 14:16:38 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-24 14:16:38 +0000
commitfc64c93ce47ac1cfd0ca29d448b4cf15277ab77d (patch)
tree53380a3abc79caa23cab998832f05d9c70e67d0e
parent98516be9f6a7c363d4913f292aab492b85afd323 (diff)
downloadgdb-fc64c93ce47ac1cfd0ca29d448b4cf15277ab77d.tar.gz
2002-11-23 Andrew Cagney <ac131313@redhat.com>
* blockframe.c (find_frame_addr_in_frame_chain): Move function from here ... * varobj.c (find_frame_addr_in_frame_chain): ... to here. (varobj_create): Note that frame ID should be used. * frame.h (find_frame_addr_in_frame_chain): Delete declaration.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/blockframe.c21
-rw-r--r--gdb/frame.h2
-rw-r--r--gdb/varobj.c27
4 files changed, 35 insertions, 23 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1104cf23599..b3f71df1afe 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2002-11-23 Andrew Cagney <ac131313@redhat.com>
+ * blockframe.c (find_frame_addr_in_frame_chain): Move function
+ from here ...
+ * varobj.c (find_frame_addr_in_frame_chain): ... to here.
+ (varobj_create): Note that frame ID should be used.
+ * frame.h (find_frame_addr_in_frame_chain): Delete declaration.
+
+2002-11-23 Andrew Cagney <ac131313@redhat.com>
+
* breakpoint.c: Include "gdb_assert.h".
(deprecated_frame_in_dummy): Assert that generic dummy frames are
not being used.
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index da88497ad6b..d21fc9b6036 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -643,27 +643,6 @@ block_innermost_frame (struct block *block)
}
}
-/* Return the full FRAME which corresponds to the given CORE_ADDR
- or NULL if no FRAME on the chain corresponds to CORE_ADDR. */
-
-struct frame_info *
-find_frame_addr_in_frame_chain (CORE_ADDR frame_addr)
-{
- struct frame_info *frame = NULL;
-
- if (frame_addr == (CORE_ADDR) 0)
- return NULL;
-
- while (1)
- {
- frame = get_prev_frame (frame);
- if (frame == NULL)
- return NULL;
- if (FRAME_FP (frame) == frame_addr)
- return frame;
- }
-}
-
/* Are we in a call dummy? The code below which allows DECR_PC_AFTER_BREAK
below is for infrun.c, which may give the macro a pc without that
subtracted out. */
diff --git a/gdb/frame.h b/gdb/frame.h
index 269f11e046f..86d11726283 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -412,8 +412,6 @@ extern void show_frame_info (struct frame_info *, int, int, int);
extern struct frame_info *block_innermost_frame (struct block *);
-extern struct frame_info *find_frame_addr_in_frame_chain (CORE_ADDR);
-
/* NOTE: cagney/2002-09-13: There is no need for this function.
Instead either of frame_unwind_signed_register() or
frame_unwind_unsigned_register() can be used. */
diff --git a/gdb/varobj.c b/gdb/varobj.c
index cd15f7c5c26..9b3e1506860 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -396,6 +396,27 @@ static struct vlist **varobj_table;
/* Creates a varobj (not its children) */
+/* Return the full FRAME which corresponds to the given CORE_ADDR
+ or NULL if no FRAME on the chain corresponds to CORE_ADDR. */
+
+static struct frame_info *
+find_frame_addr_in_frame_chain (CORE_ADDR frame_addr)
+{
+ struct frame_info *frame = NULL;
+
+ if (frame_addr == (CORE_ADDR) 0)
+ return NULL;
+
+ while (1)
+ {
+ frame = get_prev_frame (frame);
+ if (frame == NULL)
+ return NULL;
+ if (FRAME_FP (frame) == frame_addr)
+ return frame;
+ }
+}
+
struct varobj *
varobj_create (char *objname,
char *expression, CORE_ADDR frame, enum varobj_type type)
@@ -422,6 +443,12 @@ varobj_create (char *objname,
if ((type == USE_CURRENT_FRAME) || (type == USE_SELECTED_FRAME))
fi = selected_frame;
else
+ /* FIXME: cagney/2002-11-23: This code should be doing a
+ lookup using the frame ID and not just the frame's
+ ``address''. This, of course, means an interface change.
+ However, with out that interface change ISAs, such as the
+ ia64 with its two stacks, won't work. Similar goes for the
+ case where there is a frameless function. */
fi = find_frame_addr_in_frame_chain (frame);
/* frame = -2 means always use selected frame */