* sparc-linux-tdep.c (sparc32_linux_init_abi): Append
[deliverable/binutils-gdb.git] / gdb / ia64-tdep.c
index 0e1968382eb30f7684128846c3371cc1245a8389..f78f1fc2c42c7e1ded6e6e8d88ec3653fbb3772f 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the IA-64 for GDB, the GNU debugger.
 
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
    Foundation, Inc.
 
    This file is part of GDB.
@@ -17,8 +17,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "inferior.h"
@@ -324,7 +324,7 @@ ia64_dwarf_reg_to_regnum (int reg)
 }
 
 static int
-floatformat_valid (const struct floatformat *fmt, const char *from)
+floatformat_valid (const struct floatformat *fmt, const void *from)
 {
   return 1;
 }
@@ -2460,17 +2460,19 @@ getunwind_table (void *buf, size_t len)
 {
   LONGEST x;
 
-  /* FIXME: This is a temporary solution to backtracing syscalls in corefiles.
-            To do this properly, the AUXV section should be used.  This
-           fix will work as long as the kernel used to generate the corefile
-           is equivalent to the kernel used to debug the corefile.  */
-  x = ia64_linux_xfer_unwind_table (&current_target, 
-                                   TARGET_OBJECT_UNWIND_TABLE, NULL,
-                                   buf, NULL, 0, len);
+  /* FIXME drow/2005-09-10: This code used to call
+     ia64_linux_xfer_unwind_table directly to fetch the unwind table
+     for the currently running ia64-linux kernel.  That data should
+     come from the core file and be accessed via the auxv vector; if
+     we want to preserve fall back to the running kernel's table, then
+     we should find a way to override the corefile layer's
+     xfer_partial method.  */
+  x = target_read_partial (&current_target, TARGET_OBJECT_UNWIND_TABLE, NULL,
+                          buf, 0, len);
 
   return (int)x;
 }
-       
+
 /* Get the kernel unwind table.  */                             
 static int
 get_kernel_table (unw_word_t ip, unw_dyn_info_t *di)
@@ -2730,7 +2732,8 @@ ia64_libunwind_frame_this_id (struct frame_info *next_frame, void **this_cache,
      and don't want to unwind past this frame.  We return a null frame_id to
      indicate this.  */
   libunwind_frame_prev_register (next_frame, this_cache, IA64_IP_REGNUM, 
-                                &optimized, &lval, &addr, &realnum, &prev_ip);
+                                &optimized, &lval, &addr, &realnum, buf);
+  prev_ip = extract_unsigned_integer (buf, 8);
 
   if (prev_ip != 0)
     (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp);
@@ -2890,6 +2893,7 @@ ia64_libunwind_sigtramp_frame_prev_register (struct frame_info *next_frame,
                                             int *realnump, gdb_byte *valuep)
 
 {
+  gdb_byte buf[8];
   CORE_ADDR prev_ip, addr;
   int realnum, optimized;
   enum lval_type lval;
@@ -2898,7 +2902,8 @@ ia64_libunwind_sigtramp_frame_prev_register (struct frame_info *next_frame,
   /* If the previous frame pc value is 0, then we want to use the SIGCONTEXT
      method of getting previous registers.  */
   libunwind_frame_prev_register (next_frame, this_cache, IA64_IP_REGNUM, 
-                                &optimized, &lval, &addr, &realnum, &prev_ip);
+                                &optimized, &lval, &addr, &realnum, buf);
+  prev_ip = extract_unsigned_integer (buf, 8);
 
   if (prev_ip == 0)
     {
This page took 0.024674 seconds and 4 git commands to generate.