Learn to collect dynamic instruction tracking

42 views
Skip to first unread message

hi JK

unread,
Aug 3, 2022, 2:10:42 PM8/3/22
to DynamoRIO Users
Hi, 
I'm approaching DBI for the first time and I'm facing difficulties with dynamoRIO apis. I tried to use instrace_ simple.C dynamically tracks the jump instructions of the executable file and finds that the number of instructions collected is much higher than the number of instructions after decompiling the executable file. Why?
Thanks

Derek Bruening

unread,
Aug 3, 2022, 11:43:24 PM8/3/22
to hi JK, DynamoRIO Users
You're asking why a dynamic instruction trace which has a separate entry for each instance of each instruction and thus has many entries for repeatedly executed instructions in loops might have more total instruction entries than the static count of instructions in the executable?

--
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/5793eb43-d505-44b7-92ba-c596240cd59fn%40googlegroups.com.

hi JK

unread,
Aug 4, 2022, 12:21:21 AM8/4/22
to DynamoRIO Users
Yes, but in fact, in executable files without loops, the number of instructions tracked is still more than the static count of executable files. I don't understand why
What is the difference between tracked instructions and static instructions?

Derek Bruening

unread,
Aug 4, 2022, 12:35:56 AM8/4/22
to hi JK, DynamoRIO Users
On Linux, DynamoRIO runs every user-mode instruction, starting with the dynamic loader.  Thousands of instructions will be executed before the application executable is even reached.  If you want a truly tiny app you have to write it in assembly and link it as pure-static.

hi JK

unread,
Aug 4, 2022, 12:43:09 AM8/4/22
to DynamoRIO Users
Thank you! I'll try it later
Reply all
Reply to author
Forward
0 new messages