*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / target.c
index 2aff5a617115bf0acd7ba56861c46aa43a6123ff..231a6bb0e929d2108336e1c780b50b3b5dfc796b 100644 (file)
@@ -385,8 +385,8 @@ update_current_target (void)
       INHERIT (to_shortname, t);
       INHERIT (to_longname, t);
       INHERIT (to_doc, t);
-      INHERIT (to_open, t);
-      INHERIT (to_close, t);
+      /* Do not inherit to_open.  */
+      /* Do not inherit to_close.  */
       INHERIT (to_attach, t);
       INHERIT (to_post_attach, t);
       INHERIT (to_attach_no_wait, t);
@@ -784,7 +784,7 @@ unpush_target (struct target_ops *t)
 void
 pop_target (void)
 {
-  target_close (&current_target, 0);   /* Let it clean up */
+  target_close (target_stack, 0);      /* Let it clean up */
   if (unpush_target (target_stack) == 1)
     return;
 
@@ -799,12 +799,12 @@ pop_all_targets_above (enum strata above_stratum, int quitting)
 {
   while ((int) (current_target.to_stratum) > (int) above_stratum)
     {
-      target_close (&current_target, quitting);
+      target_close (target_stack, quitting);
       if (!unpush_target (target_stack))
        {
          fprintf_unfiltered (gdb_stderr,
                              "pop_all_targets couldn't find target %s\n",
-                             current_target.to_shortname);
+                             target_stack->to_shortname);
          internal_error (__FILE__, __LINE__,
                          _("failed internal consistency check"));
          break;
@@ -826,7 +826,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
   volatile CORE_ADDR addr = 0;
 
   if (target_get_thread_local_address_p ()
-      && gdbarch_fetch_tls_load_module_address_p (current_gdbarch))
+      && gdbarch_fetch_tls_load_module_address_p (target_gdbarch))
     {
       ptid_t ptid = inferior_ptid;
       volatile struct gdb_exception ex;
@@ -836,7 +836,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
          CORE_ADDR lm_addr;
          
          /* Fetch the load module address for this objfile.  */
-         lm_addr = gdbarch_fetch_tls_load_module_address (current_gdbarch,
+         lm_addr = gdbarch_fetch_tls_load_module_address (target_gdbarch,
                                                           objfile);
          /* If it's 0, throw the appropriate exception.  */
          if (lm_addr == 0)
@@ -1026,7 +1026,7 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf
   /* Likewise for accesses to unmapped overlay sections.  */
   if (readbuf != NULL && overlay_debugging)
     {
-      asection *section = find_pc_overlay (memaddr);
+      struct obj_section *section = find_pc_overlay (memaddr);
       if (pc_in_unmapped_range (memaddr, section))
        return xfer_memory (memaddr, readbuf, len, 0, NULL, ops);
     }
@@ -1168,12 +1168,13 @@ target_xfer_partial (struct target_ops *ops,
       const unsigned char *myaddr = NULL;
 
       fprintf_unfiltered (gdb_stdlog,
-                         "%s:target_xfer_partial (%d, %s, 0x%lx,  0x%lx,  0x%s, %s) = %s",
+                         "%s:target_xfer_partial (%d, %s, 0x%lx,  0x%lx,  %s, %s) = %s",
                          ops->to_shortname,
                          (int) object,
                          (annex ? annex : "(null)"),
                          (long) readbuf, (long) writebuf,
-                         paddr_nz (offset), paddr_d (len), paddr_d (retval));
+                         core_addr_to_string_nz (offset),
+                         plongest (len), plongest (retval));
 
       if (readbuf)
        myaddr = readbuf;
@@ -2152,7 +2153,7 @@ target_supports_non_stop ()
 static int
 default_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
 {
-  return (len <= TYPE_LENGTH (builtin_type_void_data_ptr));
+  return (len <= gdbarch_ptr_bit (target_gdbarch) / TARGET_CHAR_BIT);
 }
 
 static int
@@ -2565,8 +2566,8 @@ debug_print_register (const char * func,
       if (size <= sizeof (LONGEST))
        {
          ULONGEST val = extract_unsigned_integer (buf, size);
-         fprintf_unfiltered (gdb_stdlog, " 0x%s %s",
-                             paddr_nz (val), paddr_d (val));
+         fprintf_unfiltered (gdb_stdlog, " %s %s",
+                             core_addr_to_string_nz (val), plongest (val));
        }
     }
   fprintf_unfiltered (gdb_stdlog, "\n");
This page took 0.025207 seconds and 4 git commands to generate.