gdb/doc: Remove duplicate description of lookup_global_symbol
[deliverable/binutils-gdb.git] / gdb / target.c
index 599e22a724ceddbcd96deeeb5fac146505dbcbc8..5a3764e5e8b47aabf1a073ec1768d81372912ad1 100644 (file)
@@ -140,7 +140,7 @@ static int show_memory_breakpoints = 0;
 
 /* These globals control whether GDB attempts to perform these
    operations; they are useful for targets that need to prevent
-   inadvertant disruption, such as in non-stop mode.  */
+   inadvertent disruption, such as in non-stop mode.  */
 
 bool may_write_registers = true;
 
@@ -562,11 +562,7 @@ target_stack::push (target_ops *t)
   strata stratum = t->stratum ();
 
   if (m_stack[stratum] != NULL)
-    {
-      target_ops *prev = m_stack[stratum];
-      m_stack[stratum] = NULL;
-      target_close (prev);
-    }
+    unpush (m_stack[stratum]);
 
   /* Now add the new one.  */
   m_stack[stratum] = t;
@@ -1042,9 +1038,7 @@ memory_xfer_partial_1 (struct target_ops *ops, enum target_object object,
 
       secp = target_section_by_addr (ops, memaddr);
       if (secp != NULL
-         && (bfd_get_section_flags (secp->the_bfd_section->owner,
-                                    secp->the_bfd_section)
-             & SEC_READONLY))
+         && (bfd_section_flags (secp->the_bfd_section) & SEC_READONLY))
        {
          table = target_get_section_table (ops);
          return section_table_xfer_memory_partial (readbuf, writebuf,
This page took 0.025328 seconds and 4 git commands to generate.