|
From: Josef W. <Jos...@gm...> - 2005-11-04 12:15:30
|
On Friday 04 November 2005 12:56, Yao Qi wrote: > > Well if you've got the address and the length then just read it > > from that address! > > I have considered this solution previously, and it is an effective way to > read every guest instruction in '.text' section from the client. However, > it will break the integrity and encapsulation of the CLIENT--CORE--TOOL > orgnization of valgrind. 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) ? 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? 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. Josef |