Date: Fri, 14 May 2010 06:51:19 -0400 From: John Baldwin <jhb@FreeBSD.org> To: Ali Polatel <alip@exherbo.org> Cc: Kostik Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org Subject: Re: Ability to tell the difference between normal and syscall traps Message-ID: <4BED2B27.2020902@FreeBSD.org> In-Reply-To: <20100511103500.GH8186@harikalardiyari> References: <20100508111509.GB8186@harikalardiyari> <20100508123626.GC83316@deviant.kiev.zoral.com.ua> <20100509053303.GD8186@harikalardiyari> <20100509135807.GH83316@deviant.kiev.zoral.com.ua> <20100509182851.GE8186@harikalardiyari> <20100509214359.GJ83316@deviant.kiev.zoral.com.ua> <20100510164847.GF8186@harikalardiyari> <20100510170947.GP83316@deviant.kiev.zoral.com.ua> <20100511103500.GH8186@harikalardiyari>
next in thread | previous in thread | raw e-mail | index | archive | help
Ali Polatel wrote: > Kostik Belousov yazmış: >> On Mon, May 10, 2010 at 07:48:47PM +0300, Ali Polatel wrote: >>> Another question is how hard is it to implement PL_EVENT_EXEC? >>> This could be useful for truss as it updates the execution type of the >>> process after successful execve() calls afaict. >> Is this needed ? The question is not rhetorical, I am trying to >> understand what prevents use of PT_TO_SCE and checking the syscall >> number ? You would screen for SYS_execve or SYS_fexecve and >> reset the debugger state on SIGTRAP that is supplied to the debugger >> before first instruction of new image is executed. >> > > Not really needed, just cleaner imo. As system call numbers may be > different for different execution types and you need to look it up from > a table using a string as argument which is slow. I agree that this would be cleaner. Having worked on the ptrace/procfs stuff in other tools like strace and truss, exec truly is an important event to a debugger aside from just being another system call as it signals that the address space has been changed. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BED2B27.2020902>