On 02/17/2015 08:54 AM, Bill Williams wrote:
> On 02/17/2015 07:05 AM, Xi Chen wrote:
>> Hi,
>> I recently try to debug the dynamic mode dyninst because I found the
>> result is inconsistent with the static rewrite. I basically want to
>> attach to mutatee process, and see how the instrumentation code be
>> executed. However, when I do that in GDB, it tell me the ptrace
>> operation is not permitted (I have teh yama/ptrace_scope as 0). I wonder
>> if there are any way I can attach to the mutatee's address space and
>> debug there?
>
> Not without detaching your mutator first; ptrace only allows one
> debugger at a time to be attached.
Stan Cox is working on a port of gdbserver to use dyninst:
https://sourceware.org/git/?p=archer.git;a=shortlog;h=refs/heads/scox/dyninst
Right now it's a standalone server, but someday this could be something
you load into your mutator, and then point "(gdb) target remote ..." at
it to share the mutatees with dyninst instrumentation.
> You can, however, use breakpoint snippets and the stack walking
> interface in BPatch_process for programmatic debugging. You can also
> enable DYNINST_DEBUG_RELOC and/or DYNINST_DEBUG_SPRINGBOARD in your
> environment to see what, exactly, we're generating for
> relocated/instrumented code and for branches that lead to it, respectively.
>
>> Thank you for your time and have a nice day
>> --
>> Best Regards
>> X.Chen
>>
>>
>>
>>
>> _______________________________________________
>> Dyninst-api mailing list
>> Dyninst-api@xxxxxxxxxxx
>> https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
>>
>
>
|