summaryrefslogtreecommitdiff
path: root/gdb/dummy-frame.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-08-02 03:36:24 +0000
committerAndrew Cagney <cagney@redhat.com>2004-08-02 03:36:24 +0000
commitb76fc32f8a134508d49b6a5e0feefeec988a532c (patch)
tree8fdf45748f77c288099e91a0498b1b9e8fb0abbc /gdb/dummy-frame.c
parent78483b0fd99f5b0c671825cf2809f931862abd6b (diff)
downloadgdb-b76fc32f8a134508d49b6a5e0feefeec988a532c.tar.gz
2004-08-01 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_save_as_regcache): Declare. * frame.c (frame_save_as_regcache): New function. (do_frame_read_register): Replace do_frame_unwind_register. (frame_pop): Use frame_save_as_regcache. * dummy-frame.c (generic_push_dummy_frame): Use frame_save_as_regcache.
Diffstat (limited to 'gdb/dummy-frame.c')
-rw-r--r--gdb/dummy-frame.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 635c835dc24..d901214c37c 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -161,12 +161,11 @@ generic_push_dummy_frame (void)
dummy_frame = dummy_frame->next;
dummy_frame = xmalloc (sizeof (struct dummy_frame));
- dummy_frame->regcache = regcache_xmalloc (current_gdbarch);
+ dummy_frame->regcache = frame_save_as_regcache (get_current_frame ());
dummy_frame->pc = read_pc ();
dummy_frame->top = 0;
dummy_frame->id = get_frame_id (get_current_frame ());
- regcache_cpy (dummy_frame->regcache, current_regcache);
dummy_frame->next = dummy_frame_stack;
dummy_frame_stack = dummy_frame;
}