[RFA/RFC] Replace call_ptrace and ptrace_wait in inf-ptrace.c

Andrew Cagney cagney@gnu.org
Mon Sep 20 19:37:00 GMT 2004


> This is another step in the direction of eliminating the need for both
> inf-ptrace.c and infptrace.c.  It eliminates the calls to call_ptrace
> and ptrace_wait.
> 
> Andrew has recently suggested that we'd want debugging support for the
> ptrace(2) interface, which could be implemented by using call_ptrace()
> unconditionally.

Having, again, spent some time debugging GNU/Linux threads, I'm pretty 
much certain of this.

 > That, however, is a bad idea, since this makes it
> impossible for the compiler to properly typecheck the arguments to
> ptrace().

How so?

I've noticed that ptrace can sometimes be declared with a variable 
number of arguments, but that just suggests there should be a 
gdb_ptrace4() and gdb_ptrace5() with explicitly 4 and 5 arguments.

Andrew




More information about the Gdb-patches mailing list