From bb30608f107644f1e73d94f5933edebde881bce3 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 11 Dec 2000 21:10:15 +0000 Subject: 2000-12-11 Michael Snyder * blockframe.c (get_prev_frame): Zero all fields of prev by default using memset (instead of one at a time). --- gdb/ChangeLog | 5 +++++ gdb/blockframe.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5cd0fb9..e9c5051 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2000-12-11 Michael Snyder + + * blockframe.c (get_prev_frame): Zero all fields of prev by + default using memset (instead of one at a time). + 2000-12-11 Michael Snyder * sh-tdep.c (sh_extract_struct_value_address): For consistancy, diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 747911c..730c651 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -393,13 +393,13 @@ get_prev_frame (struct frame_info *next_frame) obstack_alloc (&frame_cache_obstack, sizeof (struct frame_info)); - prev->saved_regs = NULL; + /* Zero all fields by default. */ + memset (prev, 0, sizeof (struct frame_info); + if (next_frame) next_frame->prev = prev; prev->next = next_frame; - prev->prev = (struct frame_info *) 0; prev->frame = address; - prev->signal_handler_caller = 0; /* This change should not be needed, FIXME! We should determine whether any targets *need* INIT_FRAME_PC to happen -- cgit v1.1