4bf80fb
2005-01-25  Jeff Johnston  <jjohnstn@redhat.com>
4bf80fb
4bf80fb
	* ia64-tdep.c (getunwind_table): Call the low-level xfer
4bf80fb
	unwind table syscall to support backtracing from syscalls in
4bf80fb
	a corefile.
4bf80fb
9231e41
Index: gdb-6.5/gdb/ia64-tdep.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/ia64-tdep.c	2006-04-18 16:20:06.000000000 -0300
9231e41
+++ gdb-6.5/gdb/ia64-tdep.c	2006-07-07 02:18:40.000000000 -0300
9231e41
@@ -2470,8 +2470,17 @@ getunwind_table (void *buf, size_t len)
9231e41
      we want to preserve fall back to the running kernel's table, then
9231e41
      we should find a way to override the corefile layer's
9231e41
      xfer_partial method.  */
9231e41
+#if 0
9231e41
   x = target_read_partial (&current_target, TARGET_OBJECT_UNWIND_TABLE, NULL,
9231e41
 			   buf, 0, len);
9231e41
+#endif
4bf80fb
+  /* FIXME: This is a temporary solution to backtracing syscalls in corefiles.
4bf80fb
+            To do this properly, the AUXV section should be used.  This
4bf80fb
+	    fix will work as long as the kernel used to generate the corefile
4bf80fb
+	    is equivalent to the kernel used to debug the corefile.  */
9231e41
+  x = ia64_linux_xfer_unwind_table (&current_target,
4bf80fb
+		  		    TARGET_OBJECT_UNWIND_TABLE, NULL,
4bf80fb
+			   	    buf, NULL, 0, len);
4bf80fb
 
4bf80fb
   return (int)x;
4bf80fb
 }