From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21319 invoked by alias); 3 Feb 2006 16:12:09 -0000 Received: (qmail 21311 invoked by uid 22791); 3 Feb 2006 16:12:08 -0000 X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e6.ny.us.ibm.com (HELO e6.ny.us.ibm.com) (32.97.182.146) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 03 Feb 2006 16:12:07 +0000 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id k13GC5d1018814 for ; Fri, 3 Feb 2006 11:12:05 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id k13GC58n205538 for ; Fri, 3 Feb 2006 11:12:05 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11/8.13.3) with ESMTP id k13GC5bi012685 for ; Fri, 3 Feb 2006 11:12:05 -0500 Received: from [127.0.0.1] (sig-9-65-25-113.mts.ibm.com [9.65.25.113]) by d01av02.pok.ibm.com (8.12.11/8.12.11) with ESMTP id k13GC24Z012542; Fri, 3 Feb 2006 11:12:03 -0500 Message-ID: <43E380D0.3000905@us.ibm.com> Date: Fri, 03 Feb 2006 16:12:00 -0000 From: Vara Prasad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mathieu Lacage CC: "Frank Ch. Eigler" , systemtap@sources.redhat.com Subject: Re: user kprobes vs debuggers References: <20060202192231.GA29179@redhat.com> <43E2FA1E.5070901@us.ibm.com> <1138953635.3886.85.camel@chronos> In-Reply-To: <1138953635.3886.85.camel@chronos> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00378.txt.bz2 Mathieu Lacage wrote: >On Thu, 2006-02-02 at 22:37 -0800, Vara Prasad wrote: > > > >>I think this mechanism should handle applications that have breakpoints >>builtin as well because i am thinking they are going to use ptrace >>interface as well to register the breakpoint, is that correct. >> >> > >No, such applications (at least, mine) are going to insert int3 by hand >in the code (yes, I know, this is evil but it is possible). > > I did a cursory glance of the code that handles the signals looks like in this case OS thinks there is no process tracing and there will be no probes hence code will work as of today which is to deliver the signal to the process who put the int3. The only complication is if a user wants to add a userspace probe at this address then we need to check if the instruction being replaced is int3 in which case we don't really need to replace the instruction instead we should just record there are multiple breakpoints one for userspace probes and one for userspace application. After we run the userspace probes handler we need to deliver the signal to the application, there may be some complications in making a clean code to achieve this but i have not spent enough time to address this at this time. Mathieu, do you know what behavior you get today if you try to put a breakpoint using gdb at the same address you have added int3? >If you are interested, it is some sort of profiler/tracer available from >there: http://www-sop.inria.fr/dream/personnel/Mathieu.Lacage/bozo- >profiler/ > >regards, >Mathieu > >