x86: Remove empty X86_FEATURE_1_AND property
[deliverable/binutils-gdb.git] / gdb / spu-tdep.c
index 80458ab38e0f76cc902608cfdcd25868cf90146f..6ae37f58c7a46754b45bee6664ef5404a1c52260 100644 (file)
@@ -198,7 +198,7 @@ spu_pseudo_register_read_spu (readable_regcache *regcache, const char *regname,
     return status;
   xsnprintf (annex, sizeof annex, "%d/%s", (int) id, regname);
   memset (reg, 0, sizeof reg);
-  target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
               reg, 0, sizeof reg);
 
   ul = strtoulst ((char *) reg, NULL, 16);
@@ -229,7 +229,7 @@ spu_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
       if (status != REG_VALID)
        return status;
       xsnprintf (annex, sizeof annex, "%d/fpcr", (int) id);
-      target_read (target_stack, TARGET_OBJECT_SPU, annex, buf, 0, 16);
+      target_read (current_top_target (), TARGET_OBJECT_SPU, annex, buf, 0, 16);
       return status;
 
     case SPU_SRR0_REGNUM:
@@ -263,7 +263,7 @@ spu_pseudo_register_write_spu (struct regcache *regcache, const char *regname,
   xsnprintf (annex, sizeof annex, "%d/%s", (int) id, regname);
   xsnprintf (reg, sizeof reg, "0x%s",
             phex_nz (extract_unsigned_integer (buf, 4, byte_order), 4));
-  target_write (target_stack, TARGET_OBJECT_SPU, annex,
+  target_write (current_top_target (), TARGET_OBJECT_SPU, annex,
                (gdb_byte *) reg, 0, strlen (reg));
 }
 
@@ -286,7 +286,7 @@ spu_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
     case SPU_FPSCR_REGNUM:
       regcache_raw_read_unsigned (regcache, SPU_ID_REGNUM, &id);
       xsnprintf (annex, sizeof annex, "%d/fpcr", (int) id);
-      target_write (target_stack, TARGET_OBJECT_SPU, annex, buf, 0, 16);
+      target_write (current_top_target (), TARGET_OBJECT_SPU, annex, buf, 0, 16);
       break;
 
     case SPU_SRR0_REGNUM:
@@ -1596,14 +1596,14 @@ spu_memory_remove_breakpoint (struct gdbarch *gdbarch,
      -- this is not the correct behaviour.
 
      The workaround is to check whether the PID we are asked to remove this
-     breakpoint from (i.e. ptid_get_pid (inferior_ptid)) is different from the
+     breakpoint from (i.e. inferior_ptid.pid ()) is different from the
      PID of the current inferior (i.e. current_inferior ()->pid).  This is only
      true in the context of detach_breakpoints.  If so, we simply do nothing.
      [ Note that for the fork child process, it does not matter if breakpoints
      remain inserted, because those SPU contexts are not runnable anyway --
      the Linux kernel allows only the original process to invoke spu_run.  */
 
-  if (ptid_get_pid (inferior_ptid) != current_inferior ()->pid) 
+  if (inferior_ptid.pid () != current_inferior ()->pid) 
     return 0;
 
   return default_memory_remove_breakpoint (gdbarch, bp_tgt);
@@ -1820,8 +1820,8 @@ spu_get_overlay_table (struct objfile *objfile)
     {
       CORE_ADDR vma  = extract_unsigned_integer (ovly_table + 16*i + 0,
                                                 4, byte_order);
-      CORE_ADDR size = extract_unsigned_integer (ovly_table + 16*i + 4,
-                                                4, byte_order);
+      /* Note that this skips the "size" entry, which is at offset
+        4.  */
       CORE_ADDR pos  = extract_unsigned_integer (ovly_table + 16*i + 8,
                                                 4, byte_order);
       CORE_ADDR buf  = extract_unsigned_integer (ovly_table + 16*i + 12,
@@ -2079,7 +2079,7 @@ info_spu_event_command (const char *args, int from_tty)
   id = get_frame_register_unsigned (frame, SPU_ID_REGNUM);
 
   xsnprintf (annex, sizeof annex, "%d/event_status", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, (sizeof (buf) - 1));
   if (len <= 0)
     error (_("Could not read event_status."));
@@ -2087,7 +2087,7 @@ info_spu_event_command (const char *args, int from_tty)
   event_status = strtoulst ((char *) buf, NULL, 16);
  
   xsnprintf (annex, sizeof annex, "%d/event_mask", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, (sizeof (buf) - 1));
   if (len <= 0)
     error (_("Could not read event_mask."));
@@ -2127,7 +2127,8 @@ info_spu_signal_command (const char *args, int from_tty)
   id = get_frame_register_unsigned (frame, SPU_ID_REGNUM);
 
   xsnprintf (annex, sizeof annex, "%d/signal1", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex, buf, 0, 4);
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU,
+                    annex, buf, 0, 4);
   if (len < 0)
     error (_("Could not read signal1."));
   else if (len == 4)
@@ -2137,7 +2138,7 @@ info_spu_signal_command (const char *args, int from_tty)
     }
     
   xsnprintf (annex, sizeof annex, "%d/signal1_type", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, (sizeof (buf) - 1));
   if (len <= 0)
     error (_("Could not read signal1_type."));
@@ -2145,7 +2146,8 @@ info_spu_signal_command (const char *args, int from_tty)
   signal1_type = strtoulst ((char *) buf, NULL, 16);
 
   xsnprintf (annex, sizeof annex, "%d/signal2", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex, buf, 0, 4);
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU,
+                    annex, buf, 0, 4);
   if (len < 0)
     error (_("Could not read signal2."));
   else if (len == 4)
@@ -2155,7 +2157,7 @@ info_spu_signal_command (const char *args, int from_tty)
     }
     
   xsnprintf (annex, sizeof annex, "%d/signal2_type", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, (sizeof (buf) - 1));
   if (len <= 0)
     error (_("Could not read signal2_type."));
@@ -2243,7 +2245,7 @@ info_spu_mailbox_command (const char *args, int from_tty)
   ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoMailbox");
 
   xsnprintf (annex, sizeof annex, "%d/mbox_info", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, sizeof buf);
   if (len < 0)
     error (_("Could not read mbox_info."));
@@ -2252,7 +2254,7 @@ info_spu_mailbox_command (const char *args, int from_tty)
                         "mbox", "SPU Outbound Mailbox");
 
   xsnprintf (annex, sizeof annex, "%d/ibox_info", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, sizeof buf);
   if (len < 0)
     error (_("Could not read ibox_info."));
@@ -2261,7 +2263,7 @@ info_spu_mailbox_command (const char *args, int from_tty)
                         "ibox", "SPU Outbound Interrupt Mailbox");
 
   xsnprintf (annex, sizeof annex, "%d/wbox_info", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, sizeof buf);
   if (len < 0)
     error (_("Could not read wbox_info."));
@@ -2473,7 +2475,7 @@ info_spu_dma_command (const char *args, int from_tty)
   id = get_frame_register_unsigned (frame, SPU_ID_REGNUM);
 
   xsnprintf (annex, sizeof annex, "%d/dma_info", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, 40 + 16 * 32);
   if (len <= 0)
     error (_("Could not read dma_info."));
@@ -2550,7 +2552,7 @@ info_spu_proxydma_command (const char *args, int from_tty)
   id = get_frame_register_unsigned (frame, SPU_ID_REGNUM);
 
   xsnprintf (annex, sizeof annex, "%d/proxydma_info", id);
-  len = target_read (target_stack, TARGET_OBJECT_SPU, annex,
+  len = target_read (current_top_target (), TARGET_OBJECT_SPU, annex,
                     buf, 0, 24 + 8 * 32);
   if (len <= 0)
     error (_("Could not read proxydma_info."));
This page took 0.026716 seconds and 4 git commands to generate.