This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: user kprobes vs debuggers


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]