On Mon, Oct 24, 2011 at 5:09 AM, Aziz <[email protected]> wrote:

> Hello,
>
> I need to obtain instruction trace for the simulation run. I checked the
> email archive, but defining TRACE_RIP only gives me hex coded instructions,
> where I need the instruction, registers, and memory addresses as in "add
> eax, 0xf4". Is there any way to obtain this?
>
> Its little tricky because the simulator translate the instructions to
micro-ops and keep a hash of RIP to micro-op buffers. So once instruction is
decoded into micro-ops, we don't keep track of original instruction.  In
order to create a trace file, you'll need to add a new hash-table that keeps
track of RIP address to its original instruction.  Then you can use that in
pipeline to dump the trace along with register values and memory addresses.

Also I could not make the trace_to_func.py file which Avadh gave. It says
> its usage as "trace_to_func.py [options] trace_file outputfile". I
> use ptl_rip_trace as trace_file and leave the options empty, but it always
> gives the same Usage message.
>
> Did you specify the 'outputfile' ?


> Also is there any way to follow control registers like cr3?
>
> Take a look at 'assist_write_cr3' in  'ptlsim/x86/decode-complex.cpp' file.
All updates to CR3 register in simulation mode is done via this function.

- Avadh

I just joined marss community, thus these newbie questions arise.
>
>
Best,
> Aziz
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to