File fix-gdb-backtrace.diff of Package gdb

Index: gdb/i386-tdep.c
===================================================================
--- gdb/i386-tdep.c.orig	2009-08-06 12:26:45.000000000 +0200
+++ gdb/i386-tdep.c	2009-08-06 12:27:37.000000000 +0200
@@ -1394,12 +1394,14 @@ i386_frame_cache (struct frame_info *thi
 	  /* This will be added back below.  */
 	  cache->saved_regs[I386_EIP_REGNUM] -= cache->base;
 	}
-      else
+      else if (cache->pc)
 	{
 	  get_frame_register (this_frame, I386_ESP_REGNUM, buf);
 	  cache->base = extract_unsigned_integer (buf, 4, byte_order)
 			+ cache->sp_offset;
 	}
+      else
+	cache->saved_regs[I386_EBP_REGNUM] = 0;
     }
 
   /* Now that we have the base address for the stack frame we can
openSUSE Build Service is sponsored by