shensq04 / EKLAVYA

56 stars 16 forks source link

Can you share the python code to extract the argument counts and types? #5

Open qingbol opened 4 years ago

qingbol commented 4 years ago

Can you share the python code to extract the argument counts and types? I appreciate it if you can.

bbaker1229 commented 4 years ago

Yes. I would also be interested in the python code used to create the pickle files.

melynx commented 4 years ago

I'm sorry, what do you mean the argument counts and types? You can just obtain the tensor from the model and evaluate it.

tforhan commented 4 years ago

I don't know for sure if this is what the original commenter wanted, but I and some colleagues were hoping to get the code that was used to parse binaries and create the pickles for them. We would like to be able to compile our own binaries with other compilers (but still include the DWARF information) and then create pickles for them that can be used to train/evaluate the neural network.

FantaXuan commented 1 month ago

Same as tforhan, I'm curious about the code that can get argument counts and types from binary using pyelftools. I guess there are so many complex and corner cases even only for C program.

bbaker1229 commented 1 month ago

I was also stuck on this for a project that I did for school a few years ago. I ended up writing this program after reverse engineering the pickle file structure used for this neural network. I have not used it since so I can not speak for the function of it but maybe it will help you.

https://gist.githubusercontent.com/bbaker1229/a0002fa30c1cbee908faac0791adfa7c/raw/2849c65e7d8ab8a0329fa60bc4cf11276c2a76a4/gccbinary2pickle.py