From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10795 invoked by alias); 29 Nov 2004 21:33:44 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10772 invoked from network); 29 Nov 2004 21:33:41 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 29 Nov 2004 21:33:41 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iATLXatR031313 for ; Mon, 29 Nov 2004 16:33:41 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iATLXar14147 for ; Mon, 29 Nov 2004 16:33:36 -0500 Received: from localhost.localdomain (vpn50-34.rdu.redhat.com [172.16.50.34]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id iATLXZQB023456 for ; Mon, 29 Nov 2004 16:33:36 -0500 Received: from ironwood.lan (ironwood.lan [192.168.64.8]) by localhost.localdomain (8.12.11/8.12.10) with SMTP id iATLXUVX016877 for ; Mon, 29 Nov 2004 14:33:30 -0700 Date: Mon, 29 Nov 2004 21:33:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: [RFA] xstormy16-tdep.c: Initialize temporary frame cache in xstormy16_skip_prologue() Message-ID: <20041129143330.47cd39e6.kevinb@redhat.com> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00527.txt.bz2 The patch below clears the frame cache for the call to xstormy16_analyze_prologue(). If this initialization is not performed, then the ``if (!cache.uses_fp)'' test following the call in question will reference an uninitialized value. Okay? * xstormy16-tdep.c (xstormy16_skip_prologue): Clear/initialize the frame cache. Index: xstormy16-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v retrieving revision 1.84 diff -u -p -r1.84 xstormy16-tdep.c --- xstormy16-tdep.c 31 Oct 2004 20:36:34 -0000 1.84 +++ xstormy16-tdep.c 29 Nov 2004 21:25:19 -0000 @@ -414,6 +414,8 @@ xstormy16_skip_prologue (CORE_ADDR pc) struct symbol *sym; struct xstormy16_frame_cache cache; + memset (&cache, 0, sizeof cache); + /* Don't trust line number debug info in frameless functions. */ CORE_ADDR plg_end = xstormy16_analyze_prologue (func_addr, func_end, &cache, NULL);