[RFA] xstormy16-tdep.c: Initialize temporary frame cache in xstormy16_skip_prologue()

Kevin Buettner kevinb@redhat.com
Tue Dec 14 22:47:00 GMT 2004

[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.


	* 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);

More information about the Gdb-patches mailing list