Hi. Yet another clean-up patch. Compiling on i386 gave me following warnings:
[...]
strace.c: In function ‘handle_stopped_tcbs’:
strace.c:2539: warning: passing argument 4 of ‘ptrace’ makes integer from
pointer without a cast
strace.c:2566: warning: passing argument 4 of ‘ptrace’ makes integer from
pointer without a cast
[...]
util.c: In function ‘do_ptrace’:
util.c:260: warning: passing argument 4 of ‘ptrace’ makes integer from pointer
without a cast
util.c: In function ‘ptrace_restart’:
util.c:282: warning: passing argument 4 of ‘ptrace’ makes integer from pointer
without a cast
[...]
The thing is that the 'Linux/gl...@i386' prototype of ptrace() [1] is
different from the "expected" one from '<sys/ptrace.h>' [2].
The patch now #ifdefine-s the ptrace(...) functions according to
architecture. #ifdefine-s were roughly taken from 'defs.h' and
wired into the warnings-emitting code.
Anyway, I pretty wonder whether this part of the patch
[...]
+#endif /* !LINUX */
+#else /* !__STDC__ */
+ ptrace();
+#endif /* !__STDC__ */
`-------------------------------^^^^^^^^^
[...]
is of some use... (I obviously couldn't test it on current distros
with glibc.)
Michal
--
[1] defs.h: 159 extern long ptrace(int, int, char *, long);
[2] long ptrace(enum __ptrace_request request, pid_t pid,
void *addr, void *data);
strace-4.5.18-ptrace-pointer-cast.patch
Description: Binary data
------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
