|
From: Yao Qi <qiy...@cn...> - 2005-11-06 10:18:46
|
Josef Weidendorfer wrote: > On Friday 04 November 2005 12:56, Yao Qi wrote: > > > > That reasoning is quite academic and not really helpful. > If you can read from client memory yourself, what is the purpose of > providing a function > char[] VG_(please_core_read_this_memory_for_me)(void* addr, int size) > ? Yes, this is what I want to do, and VG_(get_instruction) and VG_(memcpy) in Tom's suggestions may be applicable for me. > > It would be better if you can describe what you want to achieve. > Do you want to pass the guest instructions to some other tool? Or are > you only interested in analysing the guest instruction yourself? Yes, sorry for unclear description. What I want to do is to get every actual executed guest instruction *itself*, and trace them, if possible. I divide this functionality into two parts, just like "front end" and "back end". The "front end" is architecture independent, that just get the content and length of every guest instruction, and "back end" translate them into ASM language, which is architecture specific and more readable. Now, I could get the content of guest instruction with libbfd support, but I do not think it is a 'smart' way to achieve this objective, so I want to get every guest instruction with internal support of valgrind CORE. > Whatever the tool would do with the pure guest instruction, it most > probably would make the tool architecture dependent, which better > should be avoided (maintenance for each architecuture needed etc.) > > >>Maybe, VG_(describe_IP)(Addr eip, Char* buf, Int n_buf) > > > Your function name suggests that you want to have a description of > the guest instruction, and not the guest instruction itself. Why > not use the description that VEX provides about the guest instruction > (e.g. type of command, number of operands, type of operands and so on). > If you think that some description is missing it would be better > to enhance VEX to provide it. Yes, you are right. Thanks for your kind help. It is a great pity my unclear description. Really sorry for the trouble it brought. Now, It seems that I am not on a right track of considering VG_(describe_IP) improvement to add guest instruction in Char* buf. Your words takes me tumble to it and bring me out of a week's puzzle. > > Josef > > -- Regards, Yao Yao Qi |