Saturday, March 6, 2010

Break goals

Its semester break! And what better to do than to hammer at this project?
In preparation for the FLIRT tools, one of the things I've been meaning to do for a while is begin to rework the configuration into something more proper. My plans are to move the opcode configuration into using libconfig ( However, of higher priority is reworking the argument parsing. I'm moving to a property based approach like what Java, Mozilla products, and others do. Ex: There will still be long and short forms for some arguments that will map to property values. This allows a more organized hierarchy and better transistion to config files. Finally, this new structure allows better scaling of the argument parsing to multiple executables.
The biggest work done this far involved seperating code into the decompiler library and the main executable as well as creating skeleton projects for each of the tools I want to develop this semester. Let the coding madness begin! I've already coded up the argument parsing core.
The argument parsing style is somewhat modeled after a product I reverse engineered which I probably shouldn't disclose for legal reasons. They used a structure like this:

struct/class argument {
error handler function pointer
prev pointer
next pointer
argument name
number expected arguments
argument description

And would iterate over the linked list for each argument found. I'm using a similar structure, but have a richer need for argument flexibility (ie they only supported /argkey [argval]), so doing an individual argument preparse followed by some decoder logic to make things scale a little better.

No comments:

Post a Comment