This is the mail archive of the gdb-patches@sourceware.cygnus.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]

Re: [RFA] Don't talk about ptrace when there's none


Chris Faylor writes:
 > On Thu, Apr 06, 2000 at 10:19:16AM -0400, Eli Zaretskii wrote:
 > >Ideally, HAVE_PTRACE and CANT_FORK would be enough in this case.  But
 > >the former doesn't seem to exist, while the latter is used
 > >sporadically in a couple of source files, but doesn't appear to be a
 > >legit global symbol that we could use.
 > >
 > >> maybe HAVE_PTRACE exists in config.h?
 > >
 > >I cannot find it there.
 > >
 > >> I ask because we don't have ptrace on BeOS either, and i don't think
 > >> we want to have more than one ifdef.
 > >
 > >We could have some OS-specific ifdefs at the top of infrun.c, if no
 > >other good options exist, but that's ugly.
 > 
 > Yeah.  Cygwin doesn't need this either, FWIW.
 > 
 > Isn't there a define that is specific to ptrace somewhere that we could
 > use to control the definition of a HAVE_PTRACE?  Or, alternatively, couldn't
 > we just add HAVE_PTRACE to the appropriate target headers?
 > 
 > cgf

All you would need to do it this, to get HAVE_PTRACE, if that's what
you want.  

Elena

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.15
diff -c -r1.15 configure.in
*** configure.in        2000/04/04 02:08:52     1.15
--- configure.in        2000/04/06 16:08:24
***************
*** 98,104 ****
  
  AC_C_CONST
  
! AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
  AC_FUNC_ALLOCA
  
  dnl See if ptrace.h provides the PTRACE_GETREGS request.
--- 98,104 ----
  
  AC_C_CONST
  
! AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll ptrace sigprocmask)
  AC_FUNC_ALLOCA
  
  dnl See if ptrace.h provides the PTRACE_GETREGS request.
Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/configure,v
retrieving revision 1.14
diff -c -r1.14 configure
*** configure   2000/04/04 02:08:52     1.14
--- configure   2000/04/06 16:09:12
***************
*** 3432,3438 ****
  fi
  
  
! for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  echo "configure:3439: checking for $ac_func" >&5
--- 3432,3438 ----
  fi
  
  
! for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll ptrace sigprocmask
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  echo "configure:3439: checking for $ac_func" >&5
Index: config.in
===================================================================
RCS file: /cvs/src/src/gdb/config.in,v
retrieving revision 1.5
diff -c -r1.5 config.in
*** config.in   2000/03/28 00:03:57     1.5
--- config.in   2000/04/06 16:09:34
***************
*** 159,164 ****
--- 159,167 ----
  /* Define if you have the poll function.  */
  #undef HAVE_POLL
  
+ /* Define if you have the ptrace function.  */
+ #undef HAVE_PTRACE
+ 
  /* Define if you have the putenv function.  */
  #undef HAVE_PUTENV


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