Re: [DynInst_API:] status of dyninstRTExport.h


Date: Thu, 23 Aug 2012 16:32:55 -0500
From: Andrew Bernat <bernat@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] status of dyninstRTExport.h
On Aug 23, 2012, at 3:34 PM, Josh Stone <jistone@xxxxxxxxxx> wrote:

Sounds good.  I'll start experimenting with DYNINSTuserMessage to see
how it works for me.  And I'd still appreciate suggestions on the best
way to send such messages in reverse, mutator->mutatee.

If you just need to push data, just write memory. Either allocate (BPatch_addressSpace::malloc) or look up an existing variable, and use writeValue on the resulting BPatch_variableExpr. 

If you need to run code, use a oneTimeCode. It'll be slower than writeValue, though. 

Or see if the sharedMem component in the valueAdded subdirectory works for you. 

I'm somewhat interested in the dyninst_lock_t too, so I can avoid
drawing in pthreads, but I'm not thrilled that tc_lock_lock() uses a
busy loop.  Would you be open to an implementation on futexes for Linux?

Sure thing. Though it's likely you'll already have pthreads anyway; as I recall, gcc loves pulling that in to everything. 

Drew




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