This is the mail archive of the gdb-patches@sourceware.org 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]

[OBV] Fix arm-tdep.c compilation for cygwin gcc 3.4.4


  Cygwin GCC 3.4.4 (legacy 1.5 version)
chokes on arm-tdep.c compilation
about the use of a possibly unset local
variable found_stack_adjust.
  Examining the source, I found that this warning
is correct, despite the fact that it apparently
does not show up for later versions of gcc,
like gcc 4.3.4 of the Cygwin 1.7 version.

  I committed the following patch 
under the obvious rule, after testing
on GCC compile farm x86_64-unknown-linux-gnu machine.


Pierre Muller
GDB pascal language maintainer

2010-11-14  Pierre Muller  <muller@ics.u-strasbg.fr>

	* arm-tdep.c (arm_in_function_epilogue_p): Fix code to avoid
	possible used of uninitialized variable.

Index: src/gdb/arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.311
diff -u -p -r1.311 arm-tdep.c
--- src/gdb/arm-tdep.c	19 Oct 2010 21:30:54 -0000	1.311
+++ src/gdb/arm-tdep.c	14 Nov 2010 07:36:59 -0000
@@ -2233,6 +2233,7 @@ arm_in_function_epilogue_p (struct gdbar
   if (pc < func_start + 4)
     return 0;
 
+  found_stack_adjust = 0;
   insn = read_memory_unsigned_integer (pc - 4, 4, byte_order_for_code);
   if (bits (insn, 28, 31) != INST_NV)
     {


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