freebsd-skq/sys/amd64
Konstantin Belousov 5b1162b964 For PT_TO_SCE stop that stops the ptraced process upon syscall entry,
syscall arguments are collected before ptracestop() is called. As a
consequence, debugger cannot modify syscall or its arguments.

For i386, amd64 and ia32 on amd64 MD syscall(), reread syscall number
and arguments after ptracestop(), if debugger modified anything in the
process environment. Since procfs stopeven requires number of syscall
arguments in p_xstat, this cannot be solved by moving stop/trace point
before argument fetching.

Move the code to read arguments into separate function
fetch_syscall_args() to avoid code duplication. Note that ktrace point
for modified syscall is intentionally recorded twice, once with original
arguments, and second time with the arguments set by debugger.

PT_TO_SCX stop is executed after cpu_syscall_set_retval() already.

Reported by:	Ali Polatel <alip exherbo org>
Briefly discussed with:	jhb
MFC after:	3 weeks
2010-01-23 11:45:35 +00:00
..
acpica Simplify a macro not to generate unncessary symbols. 2009-12-08 22:38:42 +00:00
amd64 For PT_TO_SCE stop that stops the ptraced process upon syscall entry, 2010-01-23 11:45:35 +00:00
compile
conf Move the examples for the 'hints' and 'env' keywords from various GENERIC 2010-01-19 17:20:34 +00:00
ia32 For PT_TO_SCE stop that stops the ptraced process upon syscall entry, 2010-01-23 11:45:35 +00:00
include Handling all the three clocks (hardclock, softclock, profclock) with the 2010-01-15 16:04:30 +00:00
isa Handling all the three clocks (hardclock, softclock, profclock) with the 2010-01-15 16:04:30 +00:00
linux32 Fix some problems with effective mmap() offsets > 32 bits. This was 2009-10-28 20:17:54 +00:00
pci number of cleanups in i386 and amd64 pci md code 2009-09-24 07:11:23 +00:00
Makefile Adjustments to make a tags file a bit more suitable to amd64. 2008-12-01 14:15:10 +00:00