This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]