People from the future, for your benefit:
I think I found a solution for this particular problem. I debugged
the
goldfish kernel and saw that the data it was dumping tto the
goldfish_trace
device was indeed correct. But after translation, when qemu tries to
execute this store instruction
it is unable to map the guest virtual address to host physical
address. Because of this,
the actual data written to the qtrace* file was incorrect.
This happens because of the call:
vstrcpy() in qemu/hw/goldfish_trace.c
Instead using (as hinted by one of the comments below in that file):
memcheck_get_guest_kernel_string()
helped me get over this issue. Thus the path names are recorded
correctly
and I dont get the "Cannot read ELF header " errors.
That apart, my native code profiling is still broken. I am seeing
several
bad basic blocks recorded!
Thanks,
Vikram
Graduate Student
Department of Computer Science and Engineering
University of California, San Diego
http://www.cse.ucsd.edu/~vibhatt