This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] xstormy16-tdep.c: Initialize temporary frame cache inxstormy16_skip_prologue()
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Corinna Vinschen <vinschen at redhat dot com>
- Date: Tue, 14 Dec 2004 13:00:26 -0700
- Subject: [RFA] xstormy16-tdep.c: Initialize temporary frame cache inxstormy16_skip_prologue()
- Organization: Red Hat
[Corinna requested that I resend this patch...]
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);