How to maintain opcode/modrbym/sib tables



How to maintain opcode/modrbym/sib tables
***************************************************
Hi,
Im writing a disassembler for PE files in C. I have almost
understood how to do the disassembling but i dont know how to store the
necessary information for decoding . The information inculdes opcodes,
modrbym and sib tables.
I have two strategies.
One is to store everything in different arrays within the programs
itself and search within it while disassembling.
Second is to store these info in text files and search in them while
disassembling.
Both has adv and disadv. The first stratgey is good since everythin is
in mem and faster access but will take lot of memory. The second
strategy is good since it will take less memory but will have lot of
disk i/o and will slow down the program.Please tell which one is good.

If anybody has a better method of doing it thats also welcome.

Regards
Anand

.



Relevant Pages