Re: [DynInst_API:] Tracing from a thread?


Date: Thu, 4 Jun 2015 22:25:47 -0400
From: Tony Zhang <yifanyzhang@xxxxxxxxx>
Subject: Re: [DynInst_API:] Tracing from a thread?
Thanks for the insight. I’m playing around with the idea of a debugger that would “live” completely inside the program being debugged. The advantage is that this eliminates inter process communication overhead. Of course the caveat is that the debugger itself is vulnerable to data corruption. 

To this end, I want to see if DynInst can be used/modified/hacked to instrument other threads in the same process.

> On Jun 2, 2015, at 4:06 PM, Bill Williams <bill@xxxxxxxxxxx> wrote:
> 
> On 06/02/2015 02:57 PM, Tony Zhang wrote:
>> Hello,
>> 
>> Is it possible to use DynInst from a different thread within a process?
>> For example, a program would create multiplepthreads, and one of them (a
>> master) then attempts to control the execution of all other threads in
>> the program.
>> 
> This isn't directly supported (assuming I understand your question), and I know I haven't tested any of the ways that you could in theory try to force this to work. (Self-attach I don't *think* will work, and likewise attaching to the child LWPs individually seems like a bad idea. You could insert instrumentation either statically or dynamically that has the effect of controlling a bunch of worker threads from a master one, but I don't think that's what you're trying to do here.)
> 
> Can you share a bit of context on your problem? That may suggest actually-supported ways to achieve what you want.
> 
>> Thanks
>> Tony
>> 
>> 
>> _______________________________________________
>> Dyninst-api mailing list
>> Dyninst-api@xxxxxxxxxxx
>> https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
>> 
> 
> 
> -- 
> --bw
> 
> Bill Williams
> Paradyn Project
> bill@xxxxxxxxxxx


[← Prev in Thread] Current Thread [Next in Thread→]