diff mbox

[commit] Fix overly strict check in arm_skip_stack_protector

Message ID 201103041639.p24Gdb8f006438@d06av02.portsmouth.uk.ibm.com
State Accepted
Headers show

Commit Message

Ulrich Weigand March 4, 2011, 4:39 p.m. UTC
http://sourceware.org/ml/gdb-patches/2011-02/msg00047.html


ChangeLog:

	* arm-tdep.c (arm_skip_stack_protector): Accept any symbol that
	starts with __stack_chk_guard as stack guard symbol.
diff mbox

Patch

diff -urNp gdb-orig/gdb/arm-tdep.c gdb-head/gdb/arm-tdep.c
--- gdb-orig/gdb/arm-tdep.c	2011-02-02 19:44:56.000000000 +0000
+++ gdb-head/gdb/arm-tdep.c	2011-02-03 17:52:22.000000000 +0000
@@ -1296,7 +1296,8 @@  arm_skip_stack_protector(CORE_ADDR pc, s
      instruction sequence is not for stack protector.  If symbol is
      removed, we conservatively think this sequence is for stack protector.  */
   if (stack_chk_guard
-      && strcmp (SYMBOL_LINKAGE_NAME(stack_chk_guard), "__stack_chk_guard"))
+      && strncmp (SYMBOL_LINKAGE_NAME (stack_chk_guard), "__stack_chk_guard",
+		  strlen ("__stack_chk_guard")) != 0)
    return pc;
 
   if (is_thumb)