This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] target.[ch] whitespace tweaks


OK Andrew?

2005-01-13  Michael Snyder  <msnyder@redhat.com>

	* target.[ch]: Whitespace tweaks.

Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.90
diff -p -r1.90 target.c
*** target.c	8 Oct 2004 20:29:55 -0000	1.90
--- target.c	14 Jan 2005 05:51:37 -0000
*************** static LONGEST default_xfer_partial (str
*** 81,88 ****
     partial transfers, try either target_read_memory_partial or
     target_write_memory_partial).  */
  
! static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
! 			       int write);
  
  static void init_dummy_target (void);
  
--- 81,88 ----
     partial transfers, try either target_read_memory_partial or
     target_write_memory_partial).  */
  
! static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr,
! 			       int len, int write);
  
  static void init_dummy_target (void);
  
*************** static void debug_to_store_registers (in
*** 108,115 ****
  
  static void debug_to_prepare_to_store (void);
  
! static int deprecated_debug_xfer_memory (CORE_ADDR, char *, int, int,
! 					 struct mem_attrib *,
  					 struct target_ops *);
  
  static void debug_to_files_info (struct target_ops *);
--- 108,115 ----
  
  static void debug_to_prepare_to_store (void);
  
! static int deprecated_debug_xfer_memory (CORE_ADDR, char *, int,
! 					 int, struct mem_attrib *,
  					 struct target_ops *);
  
  static void debug_to_files_info (struct target_ops *);
*************** static int debug_to_remove_watchpoint (C
*** 130,136 ****
  
  static int debug_to_stopped_by_watchpoint (void);
  
! static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
  
  static int debug_to_region_size_ok_for_hw_watchpoint (int);
  
--- 130,137 ----
  
  static int debug_to_stopped_by_watchpoint (void);
  
! static int debug_to_stopped_data_address (struct target_ops *,
! 					  CORE_ADDR *);
  
  static int debug_to_region_size_ok_for_hw_watchpoint (int);
  
*************** static void debug_to_stop (void);
*** 169,175 ****
  struct target_ops deprecated_child_ops;
  
  /* Pointer to array of target architecture structures; the size of the
!    array; the current index into the array; the allocated size of the 
     array.  */
  struct target_ops **target_structs;
  unsigned target_struct_size;
--- 170,176 ----
  struct target_ops deprecated_child_ops;
  
  /* Pointer to array of target architecture structures; the size of the
!    array; the current index into the array; the allocated size of the
     array.  */
  struct target_ops **target_structs;
  unsigned target_struct_size;
*************** static int
*** 270,277 ****
  nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
  	  struct target_ops *t)
  {
!   errno = EIO;			/* Can't read/write this location */
!   return 0;			/* No bytes handled */
  }
  
  static void
--- 271,278 ----
  nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
  	  struct target_ops *t)
  {
!   errno = EIO;		/* Can't read/write this location.  */
!   return 0;		/* No bytes handled.  */
  }
  
  static void
*************** noprocess (void)
*** 290,296 ****
  static int
  nosymbol (char *name, CORE_ADDR *addrp)
  {
!   return 1;			/* Symbol does not exist in target env */
  }
  
  static void
--- 291,297 ----
  static int
  nosymbol (char *name, CORE_ADDR *addrp)
  {
!   return 1;		/* Symbol does not exist in target env.  */
  }
  
  static void
*************** default_terminal_info (char *args, int f
*** 309,319 ****
    printf_unfiltered ("No saved terminal information.\n");
  }
  
! /* This is the default target_create_inferior and target_attach function.
!    If the current target is executing, it asks whether to kill it off.
!    If this function returns without calling error(), it has killed off
!    the target, and the operation should be attempted.  */
! 
  static void
  kill_or_be_killed (int from_tty)
  {
--- 310,320 ----
    printf_unfiltered ("No saved terminal information.\n");
  }
  
! /* This is the default target_create_inferior and target_attach
!    function.  If the current target is executing, it asks whether to
!    kill it off.  If this function returns without calling error(), it
!    has killed off the target, and the operation should be attempted.
! */
  static void
  kill_or_be_killed (int from_tty)
  {
*************** update_current_target (void)
*** 499,505 ****
  	    (void (*) (void)) 
  	    noprocess);
    de_fault (deprecated_xfer_memory, 
! 	    (int (*) (CORE_ADDR, char *, int, int, struct mem_attrib *, struct target_ops *)) 
  	    nomemory);
    de_fault (to_files_info, 
  	    (void (*) (struct target_ops *)) 
--- 500,507 ----
  	    (void (*) (void)) 
  	    noprocess);
    de_fault (deprecated_xfer_memory, 
! 	    (int (*) (CORE_ADDR, char *, int, int, 
! 		      struct mem_attrib *, struct target_ops *)) 
  	    nomemory);
    de_fault (to_files_info, 
  	    (void (*) (struct target_ops *)) 
*************** update_current_target (void)
*** 632,638 ****
  	    (int (*) (void)) 
  	    return_zero);
    de_fault (to_async, 
! 	    (void (*) (void (*) (enum inferior_event_type, void*), void*)) 
  	    tcomplain);
  #undef de_fault
  
--- 634,641 ----
  	    (int (*) (void)) 
  	    return_zero);
    de_fault (to_async, 
! 	    (void (*) (void (*) (enum inferior_event_type, 
! 				 void*), void*)) 
  	    tcomplain);
  #undef de_fault
  
*************** update_current_target (void)
*** 642,655 ****
    current_target.beneath = target_stack;
  }
  
! /* Push a new target type into the stack of the existing target accessors,
!    possibly superseding some of the existing accessors.
  
     Result is zero if the pushed target ended up on top of the stack,
     nonzero if at least one target is on top of it.
  
!    Rather than allow an empty stack, we always have the dummy target at
!    the bottom stratum, so we can call the function vectors without
     checking them.  */
  
  int
--- 645,658 ----
    current_target.beneath = target_stack;
  }
  
! /* Push a new target type into the stack of the existing target
!    accessors, possibly superseding some of the existing accessors.
  
     Result is zero if the pushed target ended up on top of the stack,
     nonzero if at least one target is on top of it.
  
!    Rather than allow an empty stack, we always have the dummy target
!    at the bottom stratum, so we can call the function vectors without
     checking them.  */
  
  int
*************** push_target (struct target_ops *t)
*** 664,670 ****
        fprintf_unfiltered (gdb_stderr,
  			  "Magic number of %s target struct wrong\n",
  			  t->to_shortname);
!       internal_error (__FILE__, __LINE__, "failed internal consistency check");
      }
  
    /* Find the proper stratum to install this target in.  */
--- 667,674 ----
        fprintf_unfiltered (gdb_stderr,
  			  "Magic number of %s target struct wrong\n",
  			  t->to_shortname);
!       internal_error (__FILE__, __LINE__, 
! 		      "failed internal consistency check");
      }
  
    /* Find the proper stratum to install this target in.  */
*************** unpush_target (struct target_ops *t)
*** 710,716 ****
    struct target_ops *tmp;
  
    /* Look for the specified target.  Note that we assume that a target
!      can only occur once in the target stack. */
  
    for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath)
      {
--- 714,720 ----
    struct target_ops *tmp;
  
    /* Look for the specified target.  Note that we assume that a target
!      can only occur once in the target stack.  */
  
    for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath)
      {
*************** unpush_target (struct target_ops *t)
*** 719,725 ****
      }
  
    if ((*cur) == NULL)
!     return 0;			/* Didn't find target_ops, quit now */
  
    /* NOTE: cagney/2003-12-06: In '94 the close call was made
       unconditional by moving it to before the above check that the
--- 723,729 ----
      }
  
    if ((*cur) == NULL)
!     return 0;		/* Didn't find target_ops, quit now.  */
  
    /* NOTE: cagney/2003-12-06: In '94 the close call was made
       unconditional by moving it to before the above check that the
*************** pop_target (void)
*** 749,765 ****
    fprintf_unfiltered (gdb_stderr,
  		      "pop_target couldn't find target %s\n",
  		      current_target.to_shortname);
!   internal_error (__FILE__, __LINE__, "failed internal consistency check");
  }
  
  #undef	MIN
  #define MIN(A, B) (((A) <= (B)) ? (A) : (B))
  
! /* target_read_string -- read a null terminated string, up to LEN bytes,
!    from MEMADDR in target.  Set *ERRNOP to the errno code, or 0 if successful.
!    Set *STRING to a pointer to malloc'd memory containing the data; the caller
!    is responsible for freeing it.  Return the number of bytes successfully
!    read.  */
  
  int
  target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop)
--- 753,770 ----
    fprintf_unfiltered (gdb_stderr,
  		      "pop_target couldn't find target %s\n",
  		      current_target.to_shortname);
!   internal_error (__FILE__, __LINE__, 
! 		  "failed internal consistency check");
  }
  
  #undef	MIN
  #define MIN(A, B) (((A) <= (B)) ? (A) : (B))
  
! /* target_read_string -- read a null terminated string, up to LEN
!    bytes, from MEMADDR in target.  Set *ERRNOP to the errno code, or 0
!    if successful.  Set *STRING to a pointer to malloc'd memory
!    containing the data; the caller is responsible for freeing it.
!    Return the number of bytes successfully read.  */
  
  int
  target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop)
*************** target_read_string (CORE_ADDR memaddr, c
*** 787,795 ****
        errcode = target_read_memory (memaddr & ~3, buf, 4);
        if (errcode != 0)
  	{
! 	  /* The transfer request might have crossed the boundary to an
! 	     unallocated region of memory. Retry the transfer, requesting
! 	     a single byte.  */
  	  tlen = 1;
  	  offset = 0;
  	  errcode = target_read_memory (memaddr, buf, 1);
--- 792,800 ----
        errcode = target_read_memory (memaddr & ~3, buf, 4);
        if (errcode != 0)
  	{
! 	  /* The transfer request might have crossed the boundary to
! 	     an unallocated region of memory. Retry the transfer,
! 	     requesting a single byte.  */
  	  tlen = 1;
  	  offset = 0;
  	  errcode = target_read_memory (memaddr, buf, 1);
*************** target_xfer_partial (struct target_ops *
*** 861,868 ****
    LONGEST retval;
  
    gdb_assert (ops->to_xfer_partial != NULL);
!   retval = ops->to_xfer_partial (ops, object, annex, readbuf, writebuf,
! 				 offset, len);
    if (targetdebug)
      {
        const unsigned char *myaddr = NULL;
--- 866,873 ----
    LONGEST retval;
  
    gdb_assert (ops->to_xfer_partial != NULL);
!   retval = ops->to_xfer_partial (ops, object, annex, readbuf,
! 				 writebuf, offset, len);
    if (targetdebug)
      {
        const unsigned char *myaddr = NULL;
*************** target_xfer_partial (struct target_ops *
*** 873,879 ****
  			  (int) object,
  			  (annex ? annex : "(null)"),
  			  (long) readbuf, (long) writebuf,
! 			  paddr_nz (offset), paddr_d (len), paddr_d (retval));
  
        if (readbuf)
  	myaddr = readbuf;
--- 878,885 ----
  			  (int) object,
  			  (annex ? annex : "(null)"),
  			  (long) readbuf, (long) writebuf,
! 			  paddr_nz (offset), paddr_d (len),
! 			  paddr_d (retval));
  
        if (readbuf)
  	myaddr = readbuf;
*************** xfer_using_stratum (enum target_object o
*** 984,998 ****
      }
  }
  
! /* Read LEN bytes of target memory at address MEMADDR, placing the results in
!    GDB's memory at MYADDR.  Returns either 0 for success or an errno value
!    if any error occurs.
! 
!    If an error occurs, no guarantee is made about the contents of the data at
!    MYADDR.  In particular, the caller should not depend upon partial reads
!    filling the buffer with good data.  There is no way for the caller to know
!    how much good data might have been transfered anyway.  Callers that can
!    deal with partial reads should call target_read_memory_partial. */
  
  int
  target_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
--- 990,1005 ----
      }
  }
  
! /* Read LEN bytes of target memory at address MEMADDR, placing the
!    results in GDB's memory at MYADDR.  Returns either 0 for success or
!    an errno value if any error occurs.
! 
!    If an error occurs, no guarantee is made about the contents of the
!    data at MYADDR.  In particular, the caller should not depend upon
!    partial reads filling the buffer with good data.  There is no way
!    for the caller to know how much good data might have been
!    transfered anyway.  Callers that can deal with partial reads should
!    call target_read_memory_partial.  */
  
  int
  target_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
*************** static int trust_readonly = 0;
*** 1037,1044 ****
     Result is -1 on error, or the number of bytes transfered.  */
  
  int
! do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
! 		struct mem_attrib *attrib)
  {
    int res;
    int done = 0;
--- 1044,1051 ----
     Result is -1 on error, or the number of bytes transfered.  */
  
  int
! do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
! 		int write, struct mem_attrib *attrib)
  {
    int res;
    int done = 0;
*************** do_xfer_memory (CORE_ADDR memaddr, char 
*** 1048,1055 ****
    if (len == 0)
      return 0;
  
!   /* deprecated_xfer_memory is not guaranteed to set errno, even when
!      it returns 0.  */
    errno = 0;
  
    if (!write && trust_readonly)
--- 1055,1062 ----
    if (len == 0)
      return 0;
  
!   /* deprecated_xfer_memory is not guaranteed to set errno,
!      even when it returns 0.  */
    errno = 0;
  
    if (!write && trust_readonly)
*************** do_xfer_memory (CORE_ADDR memaddr, char 
*** 1062,1075 ****
        if (secp != NULL
  	  && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section)
  	      & SEC_READONLY))
! 	return xfer_memory (memaddr, myaddr, len, 0, attrib, &current_target);
      }
  
    /* The quick case is that the top target can handle the transfer.  */
    res = current_target.deprecated_xfer_memory
      (memaddr, myaddr, len, write, attrib, &current_target);
  
!   /* If res <= 0 then we call it again in the loop.  Ah well. */
    if (res <= 0)
      {
        for (t = target_stack; t != NULL; t = t->beneath)
--- 1069,1083 ----
        if (secp != NULL
  	  && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section)
  	      & SEC_READONLY))
! 	return xfer_memory (memaddr, myaddr, len, 0, 
! 			    attrib, &current_target);
      }
  
    /* The quick case is that the top target can handle the transfer.  */
    res = current_target.deprecated_xfer_memory
      (memaddr, myaddr, len, write, attrib, &current_target);
  
!   /* If res <= 0 then we call it again in the loop.  Ah well.  */
    if (res <= 0)
      {
        for (t = target_stack; t != NULL; t = t->beneath)
*************** do_xfer_memory (CORE_ADDR memaddr, char 
*** 1077,1085 ****
  	  if (!t->to_has_memory)
  	    continue;
  
! 	  res = t->deprecated_xfer_memory (memaddr, myaddr, len, write, attrib, t);
  	  if (res > 0)
! 	    break;		/* Handled all or part of xfer */
  	  if (t->to_has_all_memory)
  	    break;
  	}
--- 1085,1094 ----
  	  if (!t->to_has_memory)
  	    continue;
  
! 	  res = t->deprecated_xfer_memory (memaddr, myaddr, len, 
! 					   write, attrib, t);
  	  if (res > 0)
! 	    break;		/* Handled all or part of xfer.  */
  	  if (t->to_has_all_memory)
  	    break;
  	}
*************** target_xfer_memory (CORE_ADDR memaddr, c
*** 1134,1150 ****
        while (reg_len > 0)
  	{
  	  if (region->attrib.cache)
! 	    res = dcache_xfer_memory (target_dcache, memaddr, myaddr,
! 				     reg_len, write);
  	  else
! 	    res = do_xfer_memory (memaddr, myaddr, reg_len, write,
! 				 &region->attrib);
  	      
  	  if (res <= 0)
  	    {
  	      /* If this address is for nonexistent memory, read zeros
  		 if reading, or do nothing if writing.  Return
! 		 error. */
  	      if (!write)
  		memset (myaddr, 0, len);
  	      if (errno == 0)
--- 1143,1159 ----
        while (reg_len > 0)
  	{
  	  if (region->attrib.cache)
! 	    res = dcache_xfer_memory (target_dcache, memaddr,
! 				      myaddr, reg_len, write);
  	  else
! 	    res = do_xfer_memory (memaddr, myaddr, reg_len,
! 				  write, &region->attrib);
  	      
  	  if (res <= 0)
  	    {
  	      /* If this address is for nonexistent memory, read zeros
  		 if reading, or do nothing if writing.  Return
! 		 error.  */
  	      if (!write)
  		memset (myaddr, 0, len);
  	      if (errno == 0)
*************** target_xfer_memory (CORE_ADDR memaddr, c
*** 1160,1166 ****
  	}
      }
    
!   return 0;			/* We managed to cover it all somehow. */
  }
  
  
--- 1169,1175 ----
  	}
      }
    
!   return 0;		/* We managed to cover it all somehow.  */
  }
  
  
*************** target_xfer_memory (CORE_ADDR memaddr, c
*** 1169,1176 ****
     Result is -1 on error, or the number of bytes transfered.  */
  
  static int
! target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr, int len,
! 			    int write_p, int *err)
  {
    int res;
    int reg_len;
--- 1178,1185 ----
     Result is -1 on error, or the number of bytes transfered.  */
  
  static int
! target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr,
! 			    int len, int write_p, int *err)
  {
    int res;
    int reg_len;
*************** target_xfer_memory_partial (CORE_ADDR me
*** 1209,1219 ****
      }
  
    if (region->attrib.cache)
!     res = dcache_xfer_memory (target_dcache, memaddr, myaddr,
! 			      reg_len, write_p);
    else
!     res = do_xfer_memory (memaddr, myaddr, reg_len, write_p,
! 			  &region->attrib);
        
    if (res <= 0)
      {
--- 1218,1228 ----
      }
  
    if (region->attrib.cache)
!     res = dcache_xfer_memory (target_dcache, memaddr,
! 			      myaddr, reg_len, write_p);
    else
!     res = do_xfer_memory (memaddr, myaddr, reg_len,
! 			  write_p, &region->attrib);
        
    if (res <= 0)
      {
*************** target_xfer_memory_partial (CORE_ADDR me
*** 1230,1250 ****
  }
  
  int
! target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
  {
    if (target_xfer_partial_p ())
!     return target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY, NULL,
! 				buf, NULL, memaddr, len);
    else
      return target_xfer_memory_partial (memaddr, buf, len, 0, err);
  }
  
  int
! target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
  {
    if (target_xfer_partial_p ())
!     return target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY, NULL,
! 				NULL, buf, memaddr, len);
    else
      return target_xfer_memory_partial (memaddr, buf, len, 1, err);
  }
--- 1239,1261 ----
  }
  
  int
! target_read_memory_partial (CORE_ADDR memaddr, char *buf,
! 			    int len, int *err)
  {
    if (target_xfer_partial_p ())
!     return target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY,
! 				NULL, buf, NULL, memaddr, len);
    else
      return target_xfer_memory_partial (memaddr, buf, len, 0, err);
  }
  
  int
! target_write_memory_partial (CORE_ADDR memaddr, char *buf, 
! 			     int len, int *err)
  {
    if (target_xfer_partial_p ())
!     return target_xfer_partial (target_stack, TARGET_OBJECT_MEMORY,
! 				NULL, NULL, buf, memaddr, len);
    else
      return target_xfer_memory_partial (memaddr, buf, len, 1, err);
  }
*************** target_write_memory_partial (CORE_ADDR m
*** 1252,1260 ****
  /* More generic transfers.  */
  
  static LONGEST
! default_xfer_partial (struct target_ops *ops, enum target_object object,
  		      const char *annex, void *readbuf, 
! 		      const void *writebuf, ULONGEST offset, LONGEST len)
  {
    if (object == TARGET_OBJECT_MEMORY
        && ops->deprecated_xfer_memory != NULL)
--- 1263,1273 ----
  /* More generic transfers.  */
  
  static LONGEST
! default_xfer_partial (struct target_ops *ops, 
! 		      enum target_object object,
  		      const char *annex, void *readbuf, 
! 		      const void *writebuf, 
! 		      ULONGEST offset, LONGEST len)
  {
    if (object == TARGET_OBJECT_MEMORY
        && ops->deprecated_xfer_memory != NULL)
*************** default_xfer_partial (struct target_ops 
*** 1268,1279 ****
  	  void *buffer = xmalloc (len);
  	  struct cleanup *cleanup = make_cleanup (xfree, buffer);
  	  memcpy (buffer, writebuf, len);
! 	  xfered = ops->deprecated_xfer_memory (offset, buffer, len,
! 						1/*write*/, NULL, ops);
  	  do_cleanups (cleanup);
  	}
        if (readbuf != NULL)
! 	xfered = ops->deprecated_xfer_memory (offset, readbuf, len, 0/*read*/,
  					      NULL, ops);
        if (xfered > 0)
  	return xfered;
--- 1281,1294 ----
  	  void *buffer = xmalloc (len);
  	  struct cleanup *cleanup = make_cleanup (xfree, buffer);
  	  memcpy (buffer, writebuf, len);
! 	  xfered = ops->deprecated_xfer_memory (offset, buffer,
! 						len, 1 /* write */,
! 						NULL, ops);
  	  do_cleanups (cleanup);
  	}
        if (readbuf != NULL)
! 	xfered = ops->deprecated_xfer_memory (offset, readbuf,
! 					      len, 0 /* read */,
  					      NULL, ops);
        if (xfered > 0)
  	return xfered;
*************** target_write (struct target_ops *ops,
*** 1349,1355 ****
      {
        LONGEST xfer = target_write_partial (ops, object, annex,
  					   (bfd_byte *) buf + xfered,
! 					   offset + xfered, len - xfered);
        /* Call an observer, notifying them of the xfer progress?  */
        if (xfer <= 0)
  	/* Call memory_error?  */
--- 1364,1371 ----
      {
        LONGEST xfer = target_write_partial (ops, object, annex,
  					   (bfd_byte *) buf + xfered,
! 					   offset + xfered, 
! 					   len - xfered);
        /* Call an observer, notifying them of the xfer progress?  */
        if (xfer <= 0)
  	/* Call memory_error?  */
*************** target_write (struct target_ops *ops,
*** 1363,1373 ****
  /* Memory transfer methods.  */
  
  void
! get_target_memory (struct target_ops *ops, CORE_ADDR addr, void *buf,
! 		   LONGEST len)
  {
!   if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len)
!       != len)
      memory_error (EIO, addr);
  }
  
--- 1379,1389 ----
  /* Memory transfer methods.  */
  
  void
! get_target_memory (struct target_ops *ops, CORE_ADDR addr,
! 		   void *buf, LONGEST len)
  {
!   if (target_read (ops, TARGET_OBJECT_MEMORY, 
! 		   NULL, buf, addr, len) != len)
      memory_error (EIO, addr);
  }
  
*************** target_link (char *modname, CORE_ADDR *t
*** 1451,1457 ****
      {
        (current_target.to_lookup_symbol) (modname, t_reloc);
        if (*t_reloc == 0)
! 	error ("Unable to link to %s and get relocation in rombug", modname);
      }
    else
      *t_reloc = (CORE_ADDR) -1;
--- 1467,1474 ----
      {
        (current_target.to_lookup_symbol) (modname, t_reloc);
        if (*t_reloc == 0)
! 	error ("Unable to link to %s and get relocation in rombug", 
! 	       modname);
      }
    else
      *t_reloc = (CORE_ADDR) -1;
*************** find_default_attach (char *args, int fro
*** 1507,1514 ****
  }
  
  void
! find_default_create_inferior (char *exec_file, char *allargs, char **env,
! 			      int from_tty)
  {
    struct target_ops *t;
  
--- 1524,1531 ----
  }
  
  void
! find_default_create_inferior (char *exec_file, char *allargs,
! 			      char **env, int from_tty)
  {
    struct target_ops *t;
  
*************** target_resize_to_sections (struct target
*** 1572,1578 ****
    target->to_sections_end = target->to_sections + (num_added + old_count);
  
    /* Check to see if anyone else was pointing to this structure.
!      If old_value was null, then no one was. */
       
    if (old_value)
      {
--- 1589,1595 ----
    target->to_sections_end = target->to_sections + (num_added + old_count);
  
    /* Check to see if anyone else was pointing to this structure.
!      If old_value was null, then no one was.  */
       
    if (old_value)
      {
*************** target_resize_to_sections (struct target
*** 1585,1592 ****
  	      (*t)->to_sections_end = target->to_sections_end;
  	    }
  	}
!       /* There is a flattened view of the target stack in current_target,
! 	 so its to_sections pointer might also need updating. */
        if (current_target.to_sections == old_value)
  	{
  	  current_target.to_sections = target->to_sections;
--- 1602,1609 ----
  	      (*t)->to_sections_end = target->to_sections_end;
  	    }
  	}
!       /* There is a flattened view of the target stack in current_target, 
! 	 so its to_sections pointer might also need updating.  */
        if (current_target.to_sections == old_value)
  	{
  	  current_target.to_sections = target->to_sections;
*************** generic_mourn_inferior (void)
*** 1708,1715 ****
  
    /* It is confusing to the user for ignore counts to stick around
       from previous runs of the inferior.  So clear them.  */
!   /* However, it is more confusing for the ignore counts to disappear when
!      using hit counts.  So don't clear them if we're counting hits.  */
    if (!show_breakpoint_hit_counts)
      breakpoint_clear_ignore_counts ();
  
--- 1725,1733 ----
  
    /* It is confusing to the user for ignore counts to stick around
       from previous runs of the inferior.  So clear them.  */
!   /* However, it is more confusing for the ignore counts to disappear
!      when using hit counts.  So don't clear them if we're counting
!      hits.  */
    if (!show_breakpoint_hit_counts)
      breakpoint_clear_ignore_counts ();
  
*************** generic_mourn_inferior (void)
*** 1717,1725 ****
      deprecated_detach_hook ();
  }
  
! /* Helper function for child_wait and the Lynx derivatives of child_wait.
!    HOSTSTATUS is the waitstatus from wait() or the equivalent; store our
!    translation of that in OURSTATUS.  */
  void
  store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus)
  {
--- 1735,1743 ----
      deprecated_detach_hook ();
  }
  
! /* Helper function for child_wait and the Lynx derivatives of
!    child_wait.  HOSTSTATUS is the waitstatus from wait() or the
!    equivalent; store our translation of that in OURSTATUS.  */
  void
  store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus)
  {
*************** store_waitstatus (struct target_waitstat
*** 1738,1749 ****
    else if (!WIFSTOPPED (hoststatus))
      {
        ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
!       ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus));
      }
    else
      {
        ourstatus->kind = TARGET_WAITKIND_STOPPED;
!       ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus));
      }
  }
  
--- 1756,1769 ----
    else if (!WIFSTOPPED (hoststatus))
      {
        ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
!       ourstatus->value.sig = 
! 	target_signal_from_host (WTERMSIG (hoststatus));
      }
    else
      {
        ourstatus->kind = TARGET_WAITKIND_STOPPED;
!       ourstatus->value.sig = 
! 	target_signal_from_host (WSTOPSIG (hoststatus));
      }
  }
  
*************** store_waitstatus (struct target_waitstat
*** 1751,1758 ****
  int (*target_activity_function) (void);
  int target_activity_fd;
  
! /* Convert a normal process ID to a string.  Returns the string in a static
!    buffer.  */
  
  char *
  normal_pid_to_str (ptid_t ptid)
--- 1771,1778 ----
  int (*target_activity_function) (void);
  int target_activity_fd;
  
! /* Convert a normal process ID to a string.  Returns the string in a
!    static buffer.  */
  
  char *
  normal_pid_to_str (ptid_t ptid)
*************** debug_to_open (char *args, int from_tty)
*** 1801,1807 ****
  {
    debug_target.to_open (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", args, from_tty);
  }
  
  static void
--- 1821,1828 ----
  {
    debug_target.to_open (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", 
! 		      args, from_tty);
  }
  
  static void
*************** debug_to_attach (char *args, int from_tt
*** 1825,1831 ****
  {
    debug_target.to_attach (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty);
  }
  
  
--- 1846,1853 ----
  {
    debug_target.to_attach (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", 
! 		      args, from_tty);
  }
  
  
*************** debug_to_detach (char *args, int from_tt
*** 1842,1848 ****
  {
    debug_target.to_detach (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty);
  }
  
  static void
--- 1864,1871 ----
  {
    debug_target.to_detach (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", 
! 		      args, from_tty);
  }
  
  static void
*************** debug_to_resume (ptid_t ptid, int step, 
*** 1859,1866 ****
  {
    debug_target.to_resume (ptid, step, siggnal);
  
!   fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", PIDGET (ptid),
! 		      step ? "step" : "continue",
  		      target_signal_to_name (siggnal));
  }
  
--- 1882,1889 ----
  {
    debug_target.to_resume (ptid, step, siggnal);
  
!   fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", 
! 		      PIDGET (ptid), step ? "step" : "continue",
  		      target_signal_to_name (siggnal));
  }
  
*************** debug_to_wait (ptid_t ptid, struct targe
*** 1872,1879 ****
    retval = debug_target.to_wait (ptid, status);
  
    fprintf_unfiltered (gdb_stdlog,
! 		      "target_wait (%d, status) = %d,   ", PIDGET (ptid),
! 		      PIDGET (retval));
    fprintf_unfiltered (gdb_stdlog, "status->kind = ");
    switch (status->kind)
      {
--- 1895,1902 ----
    retval = debug_target.to_wait (ptid, status);
  
    fprintf_unfiltered (gdb_stdlog,
! 		      "target_wait (%d, status) = %d,   ",
! 		      PIDGET (ptid), PIDGET (retval));
    fprintf_unfiltered (gdb_stdlog, "status->kind = ");
    switch (status->kind)
      {
*************** debug_print_register (const char * func,
*** 1917,1923 ****
  {
    fprintf_unfiltered (gdb_stdlog, "%s ", func);
    if (regno >= 0 && regno < NUM_REGS + NUM_PSEUDO_REGS
!       && REGISTER_NAME (regno) != NULL && REGISTER_NAME (regno)[0] != '\0')
      fprintf_unfiltered (gdb_stdlog, "(%s)", REGISTER_NAME (regno));
    else
      fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
--- 1940,1947 ----
  {
    fprintf_unfiltered (gdb_stdlog, "%s ", func);
    if (regno >= 0 && regno < NUM_REGS + NUM_PSEUDO_REGS
!       && REGISTER_NAME (regno) != NULL 
!       && REGISTER_NAME (regno)[0] != '\0')
      fprintf_unfiltered (gdb_stdlog, "(%s)", REGISTER_NAME (regno));
    else
      fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
*************** debug_to_prepare_to_store (void)
*** 1965,1978 ****
  }
  
  static int
! deprecated_debug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
! 			      int write, struct mem_attrib *attrib,
  			      struct target_ops *target)
  {
    int retval;
  
!   retval = debug_target.deprecated_xfer_memory (memaddr, myaddr, len, write,
! 						attrib, target);
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d",
--- 1989,2003 ----
  }
  
  static int
! deprecated_debug_xfer_memory (CORE_ADDR memaddr, char *myaddr,
! 			      int len, int write,
! 			      struct mem_attrib *attrib,
  			      struct target_ops *target)
  {
    int retval;
  
!   retval = debug_target.deprecated_xfer_memory (memaddr, myaddr, len,
! 						write, attrib, target);
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d",
*************** debug_to_insert_watchpoint (CORE_ADDR ad
*** 2135,2141 ****
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
! 		      (unsigned long) addr, len, type, (unsigned long) retval);
    return retval;
  }
  
--- 2160,2167 ----
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
! 		      (unsigned long) addr, len, 
! 		      type, (unsigned long) retval);
    return retval;
  }
  
*************** debug_to_remove_watchpoint (CORE_ADDR ad
*** 2148,2154 ****
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
! 		      (unsigned long) addr, len, type, (unsigned long) retval);
    return retval;
  }
  
--- 2174,2181 ----
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
! 		      (unsigned long) addr, len, 
! 		      type, (unsigned long) retval);
    return retval;
  }
  
*************** debug_to_terminal_ours_for_output (void)
*** 2173,2179 ****
  {
    debug_target.to_terminal_ours_for_output ();
  
!   fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n");
  }
  
  static void
--- 2200,2207 ----
  {
    debug_target.to_terminal_ours_for_output ();
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_terminal_ours_for_output ()\n");
  }
  
  static void
*************** debug_to_terminal_info (char *arg, int f
*** 2197,2204 ****
  {
    debug_target.to_terminal_info (arg, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n", arg,
! 		      from_tty);
  }
  
  static void
--- 2225,2232 ----
  {
    debug_target.to_terminal_info (arg, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n",
! 		      arg, from_tty);
  }
  
  static void
*************** debug_to_load (char *args, int from_tty)
*** 2214,2220 ****
  {
    debug_target.to_load (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty);
  }
  
  static int
--- 2242,2249 ----
  {
    debug_target.to_load (args, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n",
! 		      args, from_tty);
  }
  
  static int
*************** debug_to_lookup_symbol (char *name, CORE
*** 2224,2230 ****
  
    retval = debug_target.to_lookup_symbol (name, addrp);
  
!   fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name);
  
    return retval;
  }
--- 2253,2260 ----
  
    retval = debug_target.to_lookup_symbol (name, addrp);
  
!   fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n",
! 		      name);
  
    return retval;
  }
*************** debug_to_create_inferior (char *exec_fil
*** 2235,2241 ****
  {
    debug_target.to_create_inferior (exec_file, args, env, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx, %d)\n",
  		      exec_file, args, from_tty);
  }
  
--- 2265,2272 ----
  {
    debug_target.to_create_inferior (exec_file, args, env, from_tty);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_create_inferior (%s, %s, xxx, %d)\n",
  		      exec_file, args, from_tty);
  }
  
*************** debug_to_post_startup_inferior (ptid_t p
*** 2244,2250 ****
  {
    debug_target.to_post_startup_inferior (ptid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n",
  		      PIDGET (ptid));
  }
  
--- 2275,2282 ----
  {
    debug_target.to_post_startup_inferior (ptid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_post_startup_inferior (%d)\n",
  		      PIDGET (ptid));
  }
  
*************** debug_to_acknowledge_created_inferior (i
*** 2253,2259 ****
  {
    debug_target.to_acknowledge_created_inferior (pid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n",
  		      pid);
  }
  
--- 2285,2292 ----
  {
    debug_target.to_acknowledge_created_inferior (pid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_acknowledge_created_inferior (%d)\n",
  		      pid);
  }
  
*************** debug_to_insert_fork_catchpoint (int pid
*** 2264,2270 ****
  
    retval = debug_target.to_insert_fork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
--- 2297,2304 ----
  
    retval = debug_target.to_insert_fork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_insert_fork_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
*************** debug_to_remove_fork_catchpoint (int pid
*** 2277,2283 ****
  
    retval = debug_target.to_remove_fork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
--- 2311,2318 ----
  
    retval = debug_target.to_remove_fork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_remove_fork_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
*************** debug_to_insert_vfork_catchpoint (int pi
*** 2290,2296 ****
  
    retval = debug_target.to_insert_vfork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n",
  		      pid, retval);
  
    return retval;
--- 2325,2332 ----
  
    retval = debug_target.to_insert_vfork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_insert_vfork_catchpoint (%d)= %d\n",
  		      pid, retval);
  
    return retval;
*************** debug_to_remove_vfork_catchpoint (int pi
*** 2303,2309 ****
  
    retval = debug_target.to_remove_vfork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
--- 2339,2346 ----
  
    retval = debug_target.to_remove_vfork_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_remove_vfork_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
*************** debug_to_insert_exec_catchpoint (int pid
*** 2327,2333 ****
  
    retval = debug_target.to_insert_exec_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
--- 2364,2371 ----
  
    retval = debug_target.to_insert_exec_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_insert_exec_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
*************** debug_to_remove_exec_catchpoint (int pid
*** 2340,2346 ****
  
    retval = debug_target.to_remove_exec_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
--- 2378,2385 ----
  
    retval = debug_target.to_remove_exec_catchpoint (pid);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_remove_exec_catchpoint (%d) = %d\n",
  		      pid, retval);
  
    return retval;
*************** debug_to_reported_exec_events_per_exec_c
*** 2351,2357 ****
  {
    int reported_exec_events;
  
!   reported_exec_events = debug_target.to_reported_exec_events_per_exec_call ();
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_reported_exec_events_per_exec_call () = %d\n",
--- 2390,2397 ----
  {
    int reported_exec_events;
  
!   reported_exec_events = 
!     debug_target.to_reported_exec_events_per_exec_call ();
  
    fprintf_unfiltered (gdb_stdlog,
  		      "target_reported_exec_events_per_exec_call () = %d\n",
*************** debug_to_has_exited (int pid, int wait_s
*** 2365,2373 ****
  {
    int has_exited;
  
!   has_exited = debug_target.to_has_exited (pid, wait_status, exit_status);
  
!   fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n",
  		      pid, wait_status, *exit_status, has_exited);
  
    return has_exited;
--- 2405,2415 ----
  {
    int has_exited;
  
!   has_exited = debug_target.to_has_exited (pid, wait_status, 
! 					   exit_status);
  
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target_has_exited (%d, %d, %d) = %d\n",
  		      pid, wait_status, *exit_status, has_exited);
  
    return has_exited;
*************** debug_to_rcmd (char *command,
*** 2440,2446 ****
  }
  
  static struct symtab_and_line *
! debug_to_enable_exception_callback (enum exception_event_kind kind, int enable)
  {
    struct symtab_and_line *result;
    result = debug_target.to_enable_exception_callback (kind, enable);
--- 2482,2489 ----
  }
  
  static struct symtab_and_line *
! debug_to_enable_exception_callback (enum exception_event_kind kind,
! 				    int enable)
  {
    struct symtab_and_line *result;
    result = debug_target.to_enable_exception_callback (kind, enable);
*************** debug_to_get_current_exception_event (vo
*** 2455,2461 ****
  {
    struct exception_event_record *result;
    result = debug_target.to_get_current_exception_event ();
!   fprintf_unfiltered (gdb_stdlog, "target get_current_exception_event ()\n");
    return result;
  }
  
--- 2498,2505 ----
  {
    struct exception_event_record *result;
    result = debug_target.to_get_current_exception_event ();
!   fprintf_unfiltered (gdb_stdlog, 
! 		      "target get_current_exception_event ()\n");
    return result;
  }
  
*************** setup_target_debug (void)
*** 2499,2508 ****
    current_target.to_remove_watchpoint = debug_to_remove_watchpoint;
    current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
    current_target.to_stopped_data_address = debug_to_stopped_data_address;
!   current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint;
    current_target.to_terminal_init = debug_to_terminal_init;
    current_target.to_terminal_inferior = debug_to_terminal_inferior;
!   current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output;
    current_target.to_terminal_ours = debug_to_terminal_ours;
    current_target.to_terminal_save_ours = debug_to_terminal_save_ours;
    current_target.to_terminal_info = debug_to_terminal_info;
--- 2543,2554 ----
    current_target.to_remove_watchpoint = debug_to_remove_watchpoint;
    current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
    current_target.to_stopped_data_address = debug_to_stopped_data_address;
!   current_target.to_region_size_ok_for_hw_watchpoint = 
!     debug_to_region_size_ok_for_hw_watchpoint;
    current_target.to_terminal_init = debug_to_terminal_init;
    current_target.to_terminal_inferior = debug_to_terminal_inferior;
!   current_target.to_terminal_ours_for_output = 
!     debug_to_terminal_ours_for_output;
    current_target.to_terminal_ours = debug_to_terminal_ours;
    current_target.to_terminal_save_ours = debug_to_terminal_save_ours;
    current_target.to_terminal_info = debug_to_terminal_info;
*************** setup_target_debug (void)
*** 2511,2517 ****
    current_target.to_lookup_symbol = debug_to_lookup_symbol;
    current_target.to_create_inferior = debug_to_create_inferior;
    current_target.to_post_startup_inferior = debug_to_post_startup_inferior;
!   current_target.to_acknowledge_created_inferior = debug_to_acknowledge_created_inferior;
    current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint;
    current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint;
    current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint;
--- 2557,2564 ----
    current_target.to_lookup_symbol = debug_to_lookup_symbol;
    current_target.to_create_inferior = debug_to_create_inferior;
    current_target.to_post_startup_inferior = debug_to_post_startup_inferior;
!   current_target.to_acknowledge_created_inferior = 
!     debug_to_acknowledge_created_inferior;
    current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint;
    current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint;
    current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint;
*************** setup_target_debug (void)
*** 2519,2525 ****
    current_target.to_follow_fork = debug_to_follow_fork;
    current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint;
    current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint;
!   current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call;
    current_target.to_has_exited = debug_to_has_exited;
    current_target.to_mourn_inferior = debug_to_mourn_inferior;
    current_target.to_can_run = debug_to_can_run;
--- 2566,2573 ----
    current_target.to_follow_fork = debug_to_follow_fork;
    current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint;
    current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint;
!   current_target.to_reported_exec_events_per_exec_call = 
!     debug_to_reported_exec_events_per_exec_call;
    current_target.to_has_exited = debug_to_has_exited;
    current_target.to_mourn_inferior = debug_to_mourn_inferior;
    current_target.to_can_run = debug_to_can_run;
*************** setup_target_debug (void)
*** 2528,2535 ****
    current_target.to_find_new_threads = debug_to_find_new_threads;
    current_target.to_stop = debug_to_stop;
    current_target.to_rcmd = debug_to_rcmd;
!   current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
!   current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
    current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file;
  
  }
--- 2576,2585 ----
    current_target.to_find_new_threads = debug_to_find_new_threads;
    current_target.to_stop = debug_to_stop;
    current_target.to_rcmd = debug_to_rcmd;
!   current_target.to_enable_exception_callback = 
!     debug_to_enable_exception_callback;
!   current_target.to_get_current_exception_event = 
!     debug_to_get_current_exception_event;
    current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file;
  
  }
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.66
diff -p -r1.66 target.h
*** target.h	24 Dec 2004 22:54:02 -0000	1.66
--- target.h	14 Jan 2005 05:51:37 -0000
*************** struct target_ops;
*** 35,53 ****
     specific to the communications interface between us and the
     target.
  
!    A TARGET is an interface between the debugger and a particular
!    kind of file or process.  Targets can be STACKED in STRATA,
!    so that more than one target can potentially respond to a request.
!    In particular, memory accesses will walk down the stack of targets
!    until they find a target that is interested in handling that particular
!    address.  STRATA are artificial boundaries on the stack, within
!    which particular kinds of targets live.  Strata exist so that
!    people don't get confused by pushing e.g. a process target and then
!    a file target, and wondering why they can't see the current values
!    of variables any more (the file target is handling them and they
!    never get to the process target).  So when you push a file target,
!    it goes into the file stratum, which is always below the process
!    stratum.  */
  
  #include "bfd.h"
  #include "symtab.h"
--- 35,53 ----
     specific to the communications interface between us and the
     target.
  
!    A TARGET is an interface between the debugger and a particular kind
!    of file or process.  Targets can be STACKED in STRATA, so that more
!    than one target can potentially respond to a request.  In
!    particular, memory accesses will walk down the stack of targets
!    until they find a target that is interested in handling that
!    particular address.  STRATA are artificial boundaries on the stack,
!    within which particular kinds of targets live.  Strata exist so
!    that people don't get confused by pushing e.g. a process target and
!    then a file target, and wondering why they can't see the current
!    values of variables any more (the file target is handling them and
!    they never get to the process target).  So when you push a file
!    target, it goes into the file stratum, which is always below the
!    process stratum.  */
  
  #include "bfd.h"
  #include "symtab.h"
*************** enum strata
*** 66,74 ****
  
  enum thread_control_capabilities
    {
!     tc_none = 0,		/* Default: can't control thread execution.  */
!     tc_schedlock = 1,		/* Can lock the thread scheduler.  */
!     tc_switch = 2		/* Can switch the running thread on demand.  */
    };
  
  /* Stuff for target_wait.  */
--- 66,74 ----
  
  enum thread_control_capabilities
    {
!     tc_none = 0,	/* Default: can't control thread execution.  */
!     tc_schedlock = 1,	/* Can lock the thread scheduler.  */
!     tc_switch = 2	/* Can switch the running thread on demand.  */
    };
  
  /* Stuff for target_wait.  */
*************** enum target_waitkind
*** 87,94 ****
         value.sig.  */
      TARGET_WAITKIND_SIGNALLED,
  
!     /* The program is letting us know that it dynamically loaded something
!        (e.g. it called load(2) on AIX).  */
      TARGET_WAITKIND_LOADED,
  
      /* The program has forked.  A "related" process' ID is in
--- 87,94 ----
         value.sig.  */
      TARGET_WAITKIND_SIGNALLED,
  
!     /* The program is letting us know that it dynamically loaded
!        something (e.g. it called load(2) on AIX).  */
      TARGET_WAITKIND_LOADED,
  
      /* The program has forked.  A "related" process' ID is in
*************** enum target_waitkind
*** 114,122 ****
      TARGET_WAITKIND_SYSCALL_ENTRY,
      TARGET_WAITKIND_SYSCALL_RETURN,
  
!     /* Nothing happened, but we stopped anyway.  This perhaps should be handled
!        within target_wait, but I'm not sure target_wait should be resuming the
!        inferior.  */
      TARGET_WAITKIND_SPURIOUS,
  
      /* An event has occured, but we should wait again.
--- 114,122 ----
      TARGET_WAITKIND_SYSCALL_ENTRY,
      TARGET_WAITKIND_SYSCALL_RETURN,
  
!     /* Nothing happened, but we stopped anyway.  This perhaps should
!        be handled within target_wait, but I'm not sure target_wait
!        should be resuming the inferior.  */
      TARGET_WAITKIND_SPURIOUS,
  
      /* An event has occured, but we should wait again.
*************** enum inferior_event_type
*** 153,160 ****
    {
      /* There is a request to quit the inferior, abandon it.  */
      INF_QUIT_REQ,
!     /* Process a normal inferior event which will result in target_wait
!        being called.  */
      INF_REG_EVENT,
      /* Deal with an error on the inferior.  */
      INF_ERROR,
--- 153,160 ----
    {
      /* There is a request to quit the inferior, abandon it.  */
      INF_QUIT_REQ,
!     /* Process a normal inferior event which will result in
!        target_wait being called.  */
      INF_REG_EVENT,
      /* Deal with an error on the inferior.  */
      INF_ERROR,
*************** extern ULONGEST get_target_memory_unsign
*** 270,277 ****
  
  /* If certain kinds of activity happen, target_wait should perform
     callbacks.  */
! /* Right now we just call (*TARGET_ACTIVITY_FUNCTION) if I/O is possible
!    on TARGET_ACTIVITY_FD.  */
  extern int target_activity_fd;
  /* Returns zero to leave the inferior alone, one to interrupt it.  */
  extern int (*target_activity_function) (void);
--- 270,277 ----
  
  /* If certain kinds of activity happen, target_wait should perform
     callbacks.  */
! /* Right now we just call (*TARGET_ACTIVITY_FUNCTION) if I/O is
!    possible on TARGET_ACTIVITY_FD.  */
  extern int target_activity_fd;
  /* Returns zero to leave the inferior alone, one to interrupt it.  */
  extern int (*target_activity_function) (void);
*************** struct thread_info;		/* fwd decl for par
*** 281,291 ****
  struct target_ops
    {
      struct target_ops *beneath;	/* To the target under this one.  */
!     char *to_shortname;		/* Name this target type */
!     char *to_longname;		/* Name for printing */
!     char *to_doc;		/* Documentation.  Does not include trailing
! 				   newline, and starts with a one-line descrip-
! 				   tion (probably similar to to_longname).  */
      /* Per-target scratch pad.  */
      void *to_data;
      /* The open routine takes the rest of the parameters from the
--- 281,292 ----
  struct target_ops
    {
      struct target_ops *beneath;	/* To the target under this one.  */
!     char *to_shortname;		/* Name this target type.  */
!     char *to_longname;		/* Name for printing.  */
!     char *to_doc;		/* Documentation.  Does not include
! 				   trailing newline, and starts with a
! 				   one-line description (probably
! 				   similar to to_longname).  */
      /* Per-target scratch pad.  */
      void *to_data;
      /* The open routine takes the rest of the parameters from the
*************** struct target_ops
*** 309,322 ****
      void (*to_prepare_to_store) (void);
  
      /* Transfer LEN bytes of memory between GDB address MYADDR and
!        target address MEMADDR.  If WRITE, transfer them to the target, else
!        transfer them from the target.  TARGET is the target from which we
!        get this function.
  
         Return value, N, is one of the following:
  
!        0 means that we can't handle this.  If errno has been set, it is the
!        error which prevented us from doing it (FIXME: What about bfd_error?).
  
         positive (call it N) means that we have transferred N bytes
         starting at MEMADDR.  We might be able to handle more bytes
--- 310,324 ----
      void (*to_prepare_to_store) (void);
  
      /* Transfer LEN bytes of memory between GDB address MYADDR and
!        target address MEMADDR.  If WRITE, transfer them to the target,
!        else transfer them from the target.  TARGET is the target from
!        which we get this function.
  
         Return value, N, is one of the following:
  
!        0 means that we can't handle this.  If errno has been set, it
!        is the error which prevented us from doing it (FIXME: What
!        about bfd_error?).
  
         positive (call it N) means that we have transferred N bytes
         starting at MEMADDR.  We might be able to handle more bytes
*************** struct target_ops
*** 376,384 ****
      char *(*to_extra_thread_info) (struct thread_info *);
      void (*to_stop) (void);
      void (*to_rcmd) (char *command, struct ui_file *output);
!     struct symtab_and_line *(*to_enable_exception_callback) (enum
! 							     exception_event_kind,
! 							     int);
      struct exception_event_record *(*to_get_current_exception_event) (void);
      char *(*to_pid_to_exec_file) (int pid);
      enum strata to_stratum;
--- 378,385 ----
      char *(*to_extra_thread_info) (struct thread_info *);
      void (*to_stop) (void);
      void (*to_rcmd) (char *command, struct ui_file *output);
!     struct symtab_and_line *(*to_enable_exception_callback) 
! 	 (enum exception_event_kind, int);
      struct exception_event_record *(*to_get_current_exception_event) (void);
      char *(*to_pid_to_exec_file) (int pid);
      enum strata to_stratum;
*************** struct target_ops
*** 387,393 ****
      int to_has_stack;
      int to_has_registers;
      int to_has_execution;
!     int to_has_thread_control;	/* control thread execution */
      struct section_table
       *to_sections;
      struct section_table
--- 388,394 ----
      int to_has_stack;
      int to_has_registers;
      int to_has_execution;
!     int to_has_thread_control;	/* Control thread execution.  */
      struct section_table
       *to_sections;
      struct section_table
*************** struct target_ops
*** 395,401 ****
      /* ASYNC target controls */
      int (*to_can_async_p) (void);
      int (*to_is_async_p) (void);
!     void (*to_async) (void (*cb) (enum inferior_event_type, void *context),
  		      void *context);
      int to_async_mask_value;
      int (*to_find_memory_regions) (int (*) (CORE_ADDR,
--- 396,403 ----
      /* ASYNC target controls */
      int (*to_can_async_p) (void);
      int (*to_is_async_p) (void);
!     void (*to_async) (void (*cb) (enum inferior_event_type, 
! 				  void *context),
  		      void *context);
      int to_async_mask_value;
      int (*to_find_memory_regions) (int (*) (CORE_ADDR,
*************** struct target_ops
*** 405,413 ****
  				   void *);
      char * (*to_make_corefile_notes) (bfd *, int *);
  
!     /* Return the thread-local address at OFFSET in the
!        thread-local storage for the thread PTID and the shared library
!        or executable file given by OBJFILE.  If that block of
         thread-local storage hasn't been allocated yet, this function
         may return an error.  */
      CORE_ADDR (*to_get_thread_local_address) (ptid_t ptid,
--- 407,415 ----
  				   void *);
      char * (*to_make_corefile_notes) (bfd *, int *);
  
!     /* Return the thread-local address at OFFSET in the thread-local
!        storage for the thread PTID and the shared library or
!        executable file given by OBJFILE.  If that block of
         thread-local storage hasn't been allocated yet, this function
         may return an error.  */
      CORE_ADDR (*to_get_thread_local_address) (ptid_t ptid,
*************** struct target_ops
*** 415,430 ****
  					      CORE_ADDR offset);
  
      /* Perform partial transfers on OBJECT.  See target_read_partial
!        and target_write_partial for details of each variant.  One, and
!        only one, of readbuf or writebuf must be non-NULL.  */
      LONGEST (*to_xfer_partial) (struct target_ops *ops,
! 				enum target_object object, const char *annex,
! 				void *readbuf, const void *writebuf,
  				ULONGEST offset, LONGEST len);
  
      int to_magic;
!     /* Need sub-structure for target machine related rather than comm related?
!      */
    };
  
  /* Magic number for checking ops size.  If a struct doesn't end with this
--- 417,433 ----
  					      CORE_ADDR offset);
  
      /* Perform partial transfers on OBJECT.  See target_read_partial
!        and target_write_partial for details of each variant.  One,
!        and only one, of readbuf or writebuf must be non-NULL.  */
      LONGEST (*to_xfer_partial) (struct target_ops *ops,
! 				enum target_object object, 
! 				const char *annex, void *readbuf, 
! 				const void *writebuf,
  				ULONGEST offset, LONGEST len);
  
      int to_magic;
!     /* Need sub-structure for target machine related rather than comm
!        related?  */
    };
  
  /* Magic number for checking ops size.  If a struct doesn't end with this
*************** struct target_ops
*** 434,440 ****
  #define	OPS_MAGIC	3840
  
  /* The ops structure for our "current" target process.  This should
!    never be NULL.  If there is no target, it points to the dummy_target.  */
  
  extern struct target_ops current_target;
  
--- 437,444 ----
  #define	OPS_MAGIC	3840
  
  /* The ops structure for our "current" target process.  This should
!    never be NULL.  If there is no target, it points to the
!    dummy_target.  */
  
  extern struct target_ops current_target;
  
*************** void target_close (struct target_ops *ta
*** 473,484 ****
  #define target_post_attach(pid) \
       (*current_target.to_post_attach) (pid)
  
! /* Takes a program previously attached to and detaches it.
!    The program may resume execution (some targets do, some don't) and will
!    no longer stop on signals, etc.  We better not have left any breakpoints
!    in the program or it'll die when it hits one.  ARGS is arguments
!    typed by the user (e.g. a signal to send the process).  FROM_TTY
!    says whether to be verbose or not.  */
  
  extern void target_detach (char *, int);
  
--- 477,488 ----
  #define target_post_attach(pid) \
       (*current_target.to_post_attach) (pid)
  
! /* Takes a program previously attached to and detaches it.  The
!    program may resume execution (some targets do, some don't) and will
!    no longer stop on signals, etc.  We better not have left any
!    breakpoints in the program or it'll die when it hits one.  ARGS is
!    arguments typed by the user (e.g. a signal to send the process).
!    FROM_TTY says whether to be verbose or not.  */
  
  extern void target_detach (char *, int);
  
*************** extern void target_disconnect (char *, i
*** 509,522 ****
  #define	target_wait(ptid, status)		\
       (*current_target.to_wait) (ptid, status)
  
! /* Fetch at least register REGNO, or all regs if regno == -1.  No result.  */
  
  #define	target_fetch_registers(regno)	\
       (*current_target.to_fetch_registers) (regno)
  
! /* Store at least register REGNO, or all regs if REGNO == -1.
!    It can store as many registers as it wants to, so target_prepare_to_store
!    must have been previously called.  Calls error() if there are problems.  */
  
  #define	target_store_registers(regs)	\
       (*current_target.to_store_registers) (regs)
--- 513,528 ----
  #define	target_wait(ptid, status)		\
       (*current_target.to_wait) (ptid, status)
  
! /* Fetch at least register REGNO, or all regs if regno == -1.  
!    No result.  */
  
  #define	target_fetch_registers(regno)	\
       (*current_target.to_fetch_registers) (regno)
  
! /* Store at least register REGNO, or all regs if REGNO == -1.  It can
!    store as many registers as it wants to, so target_prepare_to_store
!    must have been previously called.  Calls error() if there are
!    problems.  */
  
  #define	target_store_registers(regs)	\
       (*current_target.to_store_registers) (regs)
*************** extern void target_disconnect (char *, i
*** 532,538 ****
  
  extern DCACHE *target_dcache;
  
! extern int do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
  			   struct mem_attrib *attrib);
  
  extern int target_read_string (CORE_ADDR, char **, int, int *);
--- 538,545 ----
  
  extern DCACHE *target_dcache;
  
! extern int do_xfer_memory (CORE_ADDR memaddr, char *myaddr, 
! 			   int len, int write,
  			   struct mem_attrib *attrib);
  
  extern int target_read_string (CORE_ADDR, char **, int, int *);
*************** extern int child_xfer_memory (CORE_ADDR,
*** 553,563 ****
     of bytes actually transfered is not defined) and ERR is set to a
     non-zero error indication.  */
  
! extern int target_read_memory_partial (CORE_ADDR addr, char *buf, int len,
! 				       int *err);
  
! extern int target_write_memory_partial (CORE_ADDR addr, char *buf, int len,
! 					int *err);
  
  extern char *child_pid_to_exec_file (int);
  
--- 560,570 ----
     of bytes actually transfered is not defined) and ERR is set to a
     non-zero error indication.  */
  
! extern int target_read_memory_partial (CORE_ADDR addr, char *buf,
! 				       int len, int *err);
  
! extern int target_write_memory_partial (CORE_ADDR addr, char *buf,
! 					int len, int *err);
  
  extern char *child_pid_to_exec_file (int);
  
*************** extern void target_load (char *arg, int 
*** 782,788 ****
  #define	target_mourn_inferior()	\
       (*current_target.to_mourn_inferior) ()
  
! /* Does target have enough data to do a run or attach command? */
  
  #define target_can_run(t) \
       ((t)->to_can_run) ()
--- 789,795 ----
  #define	target_mourn_inferior()	\
       (*current_target.to_mourn_inferior) ()
  
! /* Does target have enough data to do a run or attach command?  */
  
  #define target_can_run(t) \
       ((t)->to_can_run) ()
*************** extern void target_load (char *arg, int 
*** 818,827 ****
  
  /* Get the symbol information for a breakpointable routine called when
     an exception event occurs.
!    Intended mainly for C++, and for those
!    platforms/implementations where such a callback mechanism is available,
!    e.g. HP-UX with ANSI C++ (aCC).  Some compilers (e.g. g++) support
!    different mechanisms for debugging exceptions.  */
  
  #define target_enable_exception_callback(kind, enable) \
       (*current_target.to_enable_exception_callback) (kind, enable)
--- 825,835 ----
  
  /* Get the symbol information for a breakpointable routine called when
     an exception event occurs.
! 
!    Intended mainly for C++, and for those platforms/implementations
!    where such a callback mechanism is available, e.g. HP-UX with ANSI
!    C++ (aCC).  Some compilers (e.g. g++) support different mechanisms
!    for debugging exceptions.  */
  
  #define target_enable_exception_callback(kind, enable) \
       (*current_target.to_enable_exception_callback) (kind, enable)
*************** extern void target_load (char *arg, int 
*** 843,850 ****
  #define	target_has_memory	\
       (current_target.to_has_memory)
  
! /* Does the target have a stack?  (Exec files don't, VxWorks doesn't, until
!    we start a process.)  */
  
  #define	target_has_stack	\
       (current_target.to_has_stack)
--- 851,858 ----
  #define	target_has_memory	\
       (current_target.to_has_memory)
  
! /* Does the target have a stack?  (Exec files don't, VxWorks doesn't,
!    until we start a process.)  */
  
  #define	target_has_stack	\
       (current_target.to_has_stack)
*************** extern void target_load (char *arg, int 
*** 874,886 ****
  #define target_can_switch_threads \
       (current_target.to_has_thread_control & tc_switch)
  
! /* Can the target support asynchronous execution? */
  #define target_can_async_p() (current_target.to_can_async_p ())
  
! /* Is the target in asynchronous execution mode? */
  #define target_is_async_p() (current_target.to_is_async_p())
  
! /* Put the target in async mode with the specified callback function. */
  #define target_async(CALLBACK,CONTEXT) \
       (current_target.to_async((CALLBACK), (CONTEXT)))
  
--- 882,894 ----
  #define target_can_switch_threads \
       (current_target.to_has_thread_control & tc_switch)
  
! /* Can the target support asynchronous execution?  */
  #define target_can_async_p() (current_target.to_can_async_p ())
  
! /* Is the target in asynchronous execution mode?  */
  #define target_is_async_p() (current_target.to_is_async_p())
  
! /* Put the target in async mode with the specified callback function.  */
  #define target_async(CALLBACK,CONTEXT) \
       (current_target.to_async((CALLBACK), (CONTEXT)))
  
*************** extern void (*deprecated_target_new_objf
*** 993,1000 ****
  #define target_get_thread_local_address_p() \
      (target_get_thread_local_address != NULL)
  
! /* Hook to call target dependent code just after inferior target process has
!    started.  */
  
  #ifndef TARGET_CREATE_INFERIOR_HOOK
  #define TARGET_CREATE_INFERIOR_HOOK(PID)
--- 1001,1008 ----
  #define target_get_thread_local_address_p() \
      (target_get_thread_local_address != NULL)
  
! /* Hook to call target dependent code just after inferior target
!    process has started.  */
  
  #ifndef TARGET_CREATE_INFERIOR_HOOK
  #define TARGET_CREATE_INFERIOR_HOOK(PID)
*************** extern void (*deprecated_target_new_objf
*** 1002,1009 ****
  
  /* Hardware watchpoint interfaces.  */
  
! /* Returns non-zero if we were stopped by a hardware watchpoint (memory read or
!    write).  */
  
  #ifndef STOPPED_BY_WATCHPOINT
  #define STOPPED_BY_WATCHPOINT(w) \
--- 1010,1017 ----
  
  /* Hardware watchpoint interfaces.  */
  
! /* Returns non-zero if we were stopped by a hardware watchpoint
!    (memory read or write).  */
  
  #ifndef STOPPED_BY_WATCHPOINT
  #define STOPPED_BY_WATCHPOINT(w) \
*************** extern void (*deprecated_target_new_objf
*** 1022,1031 ****
  /* If the *_hw_beakpoint functions have not been defined
     elsewhere use the definitions in the target vector.  */
  
! /* Returns non-zero if we can set a hardware watchpoint of type TYPE.  TYPE is
!    one of bp_hardware_watchpoint, bp_read_watchpoint, bp_write_watchpoint, or
!    bp_hardware_breakpoint.  CNT is the number of such watchpoints used so far
!    (including this one?).  OTHERTYPE is who knows what...  */
  
  #ifndef TARGET_CAN_USE_HARDWARE_WATCHPOINT
  #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE,CNT,OTHERTYPE) \
--- 1030,1040 ----
  /* If the *_hw_beakpoint functions have not been defined
     elsewhere use the definitions in the target vector.  */
  
! /* Returns non-zero if we can set a hardware watchpoint of type TYPE.
!    TYPE is one of bp_hardware_watchpoint, bp_read_watchpoint,
!    bp_write_watchpoint, or bp_hardware_breakpoint.  CNT is the number
!    of such watchpoints used so far (including this one?).  OTHERTYPE
!    is who knows what...  */
  
  #ifndef TARGET_CAN_USE_HARDWARE_WATCHPOINT
  #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE,CNT,OTHERTYPE) \
*************** extern void (*deprecated_target_new_objf
*** 1038,1046 ****
  #endif
  
  
! /* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes.  TYPE is 0
!    for write, 1 for read, and 2 for read/write accesses.  Returns 0 for
!    success, non-zero for failure.  */
  
  #ifndef target_insert_watchpoint
  #define	target_insert_watchpoint(addr, len, type)	\
--- 1047,1055 ----
  #endif
  
  
! /* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes.
!    TYPE is 0 for write, 1 for read, and 2 for read/write accesses.
!    Returns 0 for success, non-zero for failure.  */
  
  #ifndef target_insert_watchpoint
  #define	target_insert_watchpoint(addr, len, type)	\
*************** extern int target_stopped_data_address_p
*** 1068,1090 ****
  #define target_stopped_data_address_p(CURRENT_TARGET) (1)
  #endif
  
! /* This will only be defined by a target that supports catching vfork events,
!    such as HP-UX.
  
!    On some targets (such as HP-UX 10.20 and earlier), resuming a newly vforked
!    child process after it has exec'd, causes the parent process to resume as
!    well.  To prevent the parent from running spontaneously, such targets should
!    define this to a function that prevents that from happening.  */
  #if !defined(ENSURE_VFORKING_PARENT_REMAINS_STOPPED)
  #define ENSURE_VFORKING_PARENT_REMAINS_STOPPED(PID) (0)
  #endif
  
! /* This will only be defined by a target that supports catching vfork events,
!    such as HP-UX.
  
!    On some targets (such as HP-UX 10.20 and earlier), a newly vforked child
!    process must be resumed when it delivers its exec event, before the parent
!    vfork event will be delivered to us.  */
  
  #if !defined(RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK)
  #define RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK() (0)
--- 1077,1100 ----
  #define target_stopped_data_address_p(CURRENT_TARGET) (1)
  #endif
  
! /* This will only be defined by a target that supports catching vfork
!    events, such as HP-UX.
  
!    On some targets (such as HP-UX 10.20 and earlier), resuming a newly
!    vforked child process after it has exec'd, causes the parent
!    process to resume as well.  To prevent the parent from running
!    spontaneously, such targets should define this to a function that
!    prevents that from happening.  */
  #if !defined(ENSURE_VFORKING_PARENT_REMAINS_STOPPED)
  #define ENSURE_VFORKING_PARENT_REMAINS_STOPPED(PID) (0)
  #endif
  
! /* This will only be defined by a target that supports catching vfork
!    events, such as HP-UX.
  
!    On some targets (such as HP-UX 10.20 and earlier), a newly vforked
!    child process must be resumed when it delivers its exec event,
!    before the parent vfork event will be delivered to us.  */
  
  #if !defined(RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK)
  #define RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK() (0)
*************** extern int target_stopped_data_address_p
*** 1094,1103 ****
  
     add_target:   Add a target to the list of all possible targets.
  
!    push_target:  Make this target the top of the stack of currently used
!    targets, within its particular stratum of the stack.  Result
!    is 0 if now atop the stack, nonzero if not on top (maybe
!    should warn user).
  
     unpush_target: Remove this from the stack of currently used targets,
     no matter where it is on the list.  Returns 0 if no
--- 1104,1113 ----
  
     add_target:   Add a target to the list of all possible targets.
  
!    push_target: Make this target the top of the stack of currently
!    used targets, within its particular stratum of the stack.  Result
!    is 0 if now atop the stack, nonzero if not on top (maybe should
!    warn user).
  
     unpush_target: Remove this from the stack of currently used targets,
     no matter where it is on the list.  Returns 0 if no
*************** extern void target_preopen (int);
*** 1116,1123 ****
  extern void pop_target (void);
  
  /* Struct section_table maps address ranges to file sections.  It is
!    mostly used with BFD files, but can be used without (e.g. for handling
!    raw disks, or files not in formats handled by BFD).  */
  
  struct section_table
    {
--- 1126,1133 ----
  extern void pop_target (void);
  
  /* Struct section_table maps address ranges to file sections.  It is
!    mostly used with BFD files, but can be used without (e.g. for
!    handling raw disks, or files not in formats handled by BFD).  */
  
  struct section_table
    {
*************** extern void remove_target_sections (bfd 
*** 1169,1181 ****
  
  /* Stuff that should be shared among the various remote targets.  */
  
! /* Debugging level.  0 is off, and non-zero values mean to print some debug
!    information (higher values, more information).  */
  extern int remote_debug;
  
  /* Speed in bits per second, or -1 which means don't mess with the speed.  */
  extern int baud_rate;
! /* Timeout limit for response from target. */
  extern int remote_timeout;
  
  
--- 1179,1191 ----
  
  /* Stuff that should be shared among the various remote targets.  */
  
! /* Debugging level.  0 is off, and non-zero values mean to print some
!    debug information (higher values, more information).  */
  extern int remote_debug;
  
  /* Speed in bits per second, or -1 which means don't mess with the speed.  */
  extern int baud_rate;
! /* Timeout limit for response from target.  */
  extern int remote_timeout;
  
  
*************** extern int target_signal_to_host (enum t
*** 1209,1220 ****
  /* Convert from a number used in a GDB command to an enum target_signal.  */
  extern enum target_signal target_signal_from_command (int);
  
! /* Any target can call this to switch to remote protocol (in remote.c). */
  extern void push_remote_target (char *name, int from_tty);
  
! /* Imported from machine dependent code */
  
! /* Blank target vector entries are initialized to target_ignore. */
  void target_ignore (void);
  
  extern struct target_ops deprecated_child_ops;
--- 1219,1230 ----
  /* Convert from a number used in a GDB command to an enum target_signal.  */
  extern enum target_signal target_signal_from_command (int);
  
! /* Any target can call this to switch to remote protocol (in remote.c).  */
  extern void push_remote_target (char *name, int from_tty);
  
! /* Imported from machine dependent code.  */
  
! /* Blank target vector entries are initialized to target_ignore.  */
  void target_ignore (void);
  
  extern struct target_ops deprecated_child_ops;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]