2005-09-27 Bob Rossi <bob@brasko.net>
[deliverable/binutils-gdb.git] / gdb / ia64-tdep.c
index ab9a3402a5e8898e04d40c6eb802bd86b34db977..ac43d26ad5632ccb89c3fb6a35fa46e7b32a115f 100644 (file)
@@ -673,14 +673,16 @@ rse_address_add(CORE_ADDR addr, int nslots)
 
 static void
 ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
-                           int regnum, void *buf)
+                           int regnum, gdb_byte *buf)
 {
   if (regnum >= V32_REGNUM && regnum <= V127_REGNUM)
     {
+#ifdef HAVE_LIBUNWIND_IA64_H
       /* First try and use the libunwind special reg accessor, otherwise fallback to
         standard logic.  */
       if (!libunwind_is_initialized ()
          || libunwind_get_reg_special (gdbarch, regnum, buf) != 0)
+#endif
        {
          /* The fallback position is to assume that r32-r127 are found sequentially
             in memory starting at $bof.  This isn't always true, but without libunwind,
@@ -791,7 +793,7 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
 
 static void
 ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
-                           int regnum, const void *buf)
+                           int regnum, const gdb_byte *buf)
 {
   if (regnum >= V32_REGNUM && regnum <= V127_REGNUM)
     {
@@ -912,7 +914,7 @@ ia64_convert_register_p (int regno, struct type *type)
 
 static void
 ia64_register_to_value (struct frame_info *frame, int regnum,
-                         struct type *valtype, void *out)
+                         struct type *valtype, gdb_byte *out)
 {
   char in[MAX_REGISTER_SIZE];
   frame_register_read (frame, regnum, in);
@@ -921,7 +923,7 @@ ia64_register_to_value (struct frame_info *frame, int regnum,
 
 static void
 ia64_value_to_register (struct frame_info *frame, int regnum,
-                         struct type *valtype, const void *in)
+                         struct type *valtype, const gdb_byte *in)
 {
   char out[MAX_REGISTER_SIZE];
   convert_typed_floating (in, valtype, out, builtin_type_ia64_ext);
@@ -1576,7 +1578,7 @@ static void
 ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
                          int regnum, int *optimizedp,
                          enum lval_type *lvalp, CORE_ADDR *addrp,
-                         int *realnump, void *valuep)
+                         int *realnump, gdb_byte *valuep)
 {
   struct ia64_frame_cache *cache =
     ia64_frame_cache (next_frame, this_cache);
@@ -1976,7 +1978,7 @@ ia64_sigtramp_frame_prev_register (struct frame_info *next_frame,
                                   void **this_cache,
                                   int regnum, int *optimizedp,
                                   enum lval_type *lvalp, CORE_ADDR *addrp,
-                                  int *realnump, void *valuep)
+                                  int *realnump, gdb_byte *valuep)
 {
   char dummy_valp[MAX_REGISTER_SIZE];
   char buf[MAX_REGISTER_SIZE];
@@ -2458,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)
@@ -2747,7 +2751,7 @@ ia64_libunwind_frame_prev_register (struct frame_info *next_frame,
                                    void **this_cache,
                                    int regnum, int *optimizedp,
                                    enum lval_type *lvalp, CORE_ADDR *addrp,
-                                   int *realnump, void *valuep)
+                                   int *realnump, gdb_byte *valuep)
 {
   int reg = regnum;
 
@@ -2885,7 +2889,7 @@ ia64_libunwind_sigtramp_frame_prev_register (struct frame_info *next_frame,
                                             void **this_cache,
                                             int regnum, int *optimizedp,
                                             enum lval_type *lvalp, CORE_ADDR *addrp,
-                                            int *realnump, void *valuep)
+                                            int *realnump, gdb_byte *valuep)
 
 {
   CORE_ADDR prev_ip, addr;
@@ -3497,7 +3501,8 @@ ia64_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 }
 
 static void
-ia64_store_return_value (struct type *type, struct regcache *regcache, const void *valbuf)
+ia64_store_return_value (struct type *type, struct regcache *regcache, 
+                       const gdb_byte *valbuf)
 {
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
This page took 0.025238 seconds and 4 git commands to generate.