I printed the application instruction opcode executed into filethe rep_stosb or rep_stosq instructions appears only once,not continous
--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/ff907574-d166-4cf3-9b93-b2355dd9fe66%40googlegroups.com.
sorry for not saying clearlyI wrote a client , print the app instruction executed ,the executed app is very simple,wrote by c,#include <stdio.h>int main(){int i=0,j=2,k;k=i+j;return 0;}client as follows:drmgr_register_bb_instrumentation_event(NULL /*analysis_func*/,event_app_instruction, NULL);event_app_instruction{instrument_instr();if (drmgr_is_first_instr(drcontext, instr)){dr_insert_clean_call(drcontext, bb, instr, (void *)clean_call, false, 0);}}
in function instrace(),I log instr opcode into filefprintf(data->logf,"%s\n",decode_opcode_name(ins_ref->opcode));I compare the output with pin's,I also upload the excel recording their diffrence.instructions like rep_stosb/rep_stosq is continous in pin's result,but dynamorio only once .how is this inplemented in dynamorio?there is another diffrences,sheet"diffrence discription" is the row number index for sheet"instr sequence"for example , row num:811, pin has more loop"add - cmp - jnz" than dynamorioI don't know how is these diffrence come from .thanks very much for your reply在 2020年2月25日星期二 UTC+8下午5:55:22,ganlanzhi写道:
sorry for not saying clearlyI wrote a client , print the app instruction executed ,the executed app is very simple,wrote by c,#include <stdio.h>int main(){int i=0,j=2,k;k=i+j;return 0;}client as follows:drmgr_register_bb_instrumentation_event(NULL /*analysis_func*/,event_app_instruction, NULL);event_app_instruction{instrument_instr();if (drmgr_is_first_instr(drcontext, instr)){dr_insert_clean_call(drcontext, bb, instr, (void *)clean_call, false, 0);}}clean_call(){instrace()}
in function instrace(),I log instr opcode into filefprintf(data->logf,"%s\n",decode_opcode_name(ins_ref->opcode));
I compare the output with pin's,sorry I cannot upload the excel recording their diffrence.
drmgr_unregister_bb_app2app_event(event_bb_app2app);
static dr_emit_flags_t
event_bb_app2app(void *drcontext, void *tag, instrlist_t *bb, bool for_trace,
bool translating)
{
if (!drutil_expand_rep_string(drcontext, bb)) {
DR_ASSERT(false);
/* in release build, carry on: we'll just miss per-iter refs */
}
return DR_EMIT_DEFAULT;
}
but it does not work, rep_stos instructions logged in file are stil not continous
--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/5aba860e-8489-44dd-9e72-4a09e380bdb6%40googlegroups.com.