From: Michael Snyder Date: Thu, 17 May 2001 20:04:46 +0000 (+0000) Subject: 2001-05-17 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=736d0890a9cee610492c37b707eca3f41301a16e;p=binutils-gdb.git 2001-05-17 Michael Snyder * blockframe.c (create_new_frame): Zero all the fields via memset, rather than zeroing them one by one. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ab8f59e5825..76dba305265 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-05-17 Michael Snyder + + * blockframe.c (create_new_frame): Zero all the fields via memset, + rather than zeroing them one by one. + 2001-05-17 Eli Zaretskii * top.c (user_args): Remove unused declaration. diff --git a/gdb/blockframe.c b/gdb/blockframe.c index d35c24a9efb..2f520d99b4d 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -219,10 +219,9 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc) obstack_alloc (&frame_cache_obstack, sizeof (struct frame_info)); - /* Arbitrary frame */ - fi->saved_regs = NULL; - fi->next = NULL; - fi->prev = NULL; + /* Zero all fields by default. */ + memset (fi, 0, sizeof (struct frame_info)); + fi->frame = addr; fi->pc = pc; find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);